All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] systemtap: support usrmerge
@ 2019-10-23 20:25 Alessio Igor Bogani
  2019-10-23 20:44 ` Mark Hatle
  2019-10-23 21:16 ` [PATCH] " akuster808
  0 siblings, 2 replies; 4+ messages in thread
From: Alessio Igor Bogani @ 2019-10-23 20:25 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alessio Igor Bogani

Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu>
---
 meta/recipes-kernel/systemtap/systemtap_git.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index 6ee3e1c0f7..2efba2e06f 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -52,10 +52,13 @@ do_install_append () {
    fi
 
    # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
-   install -d `dirname ${D}${systemd_unitdir}`
-   mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
+   if not ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
+      install -d `dirname ${D}${systemd_unitdir}`
+      mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
+   fi
    rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty
 
+
    # Ensure correct ownership for files copied in
    chown root:root ${D}${sysconfdir}/stap-exporter/* -R
 }
-- 
2.17.1



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

* Re: [PATCH] systemtap: support usrmerge
  2019-10-23 20:25 [PATCH] systemtap: support usrmerge Alessio Igor Bogani
@ 2019-10-23 20:44 ` Mark Hatle
  2019-10-25 14:01   ` [PATCH v2] " Alessio Igor Bogani
  2019-10-23 21:16 ` [PATCH] " akuster808
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Hatle @ 2019-10-23 20:44 UTC (permalink / raw)
  To: Alessio Igor Bogani, openembedded-core



On 10/23/19 3:25 PM, Alessio Igor Bogani wrote:
> Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu>
> ---
>  meta/recipes-kernel/systemtap/systemtap_git.bb | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
> index 6ee3e1c0f7..2efba2e06f 100644
> --- a/meta/recipes-kernel/systemtap/systemtap_git.bb
> +++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
> @@ -52,10 +52,13 @@ do_install_append () {
>     fi
>  
>     # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
> -   install -d `dirname ${D}${systemd_unitdir}`
> -   mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
> +   if not ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
> +      install -d `dirname ${D}${systemd_unitdir}`
> +      mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
> +   fi
>     rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty

A better check out be:

if [ {D}${prefix}/lib/systemd != `dirname ${D}${systemd_unitdir}` ]; then
   install -d `dirname ${D}${systemd_unitdir}`
   mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
   rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty
fi

This way the issue is resolved even if usrmerge isn't enabled, but the user
manually manipulated the paths.
> +
>     # Ensure correct ownership for files copied in
>     chown root:root ${D}${sysconfdir}/stap-exporter/* -R
>  }
> 


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

* Re: [PATCH] systemtap: support usrmerge
  2019-10-23 20:25 [PATCH] systemtap: support usrmerge Alessio Igor Bogani
  2019-10-23 20:44 ` Mark Hatle
@ 2019-10-23 21:16 ` akuster808
  1 sibling, 0 replies; 4+ messages in thread
From: akuster808 @ 2019-10-23 21:16 UTC (permalink / raw)
  To: Alessio Igor Bogani, openembedded-core



On 10/23/19 1:25 PM, Alessio Igor Bogani wrote:
> Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu>

Thanks for the patch.  Could you comment on this open Yocto bug?
https://bugzilla.yoctoproject.org/show_bug.cgi?id=4442

I think its fixed but would like someone who is using it to comment.


- armin
> ---
>  meta/recipes-kernel/systemtap/systemtap_git.bb | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
> index 6ee3e1c0f7..2efba2e06f 100644
> --- a/meta/recipes-kernel/systemtap/systemtap_git.bb
> +++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
> @@ -52,10 +52,13 @@ do_install_append () {
>     fi
>  
>     # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
> -   install -d `dirname ${D}${systemd_unitdir}`
> -   mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
> +   if not ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
> +      install -d `dirname ${D}${systemd_unitdir}`
> +      mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
> +   fi
>     rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty
>  
> +
>     # Ensure correct ownership for files copied in
>     chown root:root ${D}${sysconfdir}/stap-exporter/* -R
>  }



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

* [PATCH v2] systemtap: support usrmerge
  2019-10-23 20:44 ` Mark Hatle
@ 2019-10-25 14:01   ` Alessio Igor Bogani
  0 siblings, 0 replies; 4+ messages in thread
From: Alessio Igor Bogani @ 2019-10-25 14:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alessio Igor Bogani

Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu>
---
 meta/recipes-kernel/systemtap/systemtap_git.bb | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index 6ee3e1c0f7..1c9f2aed16 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -51,10 +51,13 @@ do_install_append () {
       rm ${D}${libexecdir}/${PN}/stap-env
    fi
 
-   # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
-   install -d `dirname ${D}${systemd_unitdir}`
-   mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
-   rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty
+   if [ ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then
+      # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
+      # without usrmerge distro feature enabled
+      install -d `dirname ${D}${systemd_unitdir}`
+      mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
+      rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty
+   fi
 
    # Ensure correct ownership for files copied in
    chown root:root ${D}${sysconfdir}/stap-exporter/* -R
-- 
2.17.1



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

end of thread, other threads:[~2019-10-25 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 20:25 [PATCH] systemtap: support usrmerge Alessio Igor Bogani
2019-10-23 20:44 ` Mark Hatle
2019-10-25 14:01   ` [PATCH v2] " Alessio Igor Bogani
2019-10-23 21:16 ` [PATCH] " akuster808

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.