* [PATCH] systemtap: Fix issues from 4.0 upgrade
@ 2018-10-16 19:25 Richard Purdie
2018-10-17 8:29 ` Martin Hundebøll
0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2018-10-16 19:25 UTC (permalink / raw)
To: openembedded-core
4.0 adds systemd support but installs the unit files in the wrong location.
Fix this in do_install and inherit systemd to package them correctly.
Also fix ownership of files manually copied in to root:root to avoid QA warnings.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/recipes-kernel/systemtap/systemtap_git.bb | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index 0b7833e901b..3c45bfa9374 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -25,7 +25,7 @@ PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native"
-inherit autotools gettext pkgconfig distutils3-base
+inherit autotools gettext pkgconfig distutils3-base systemd
do_configure_prepend () {
# Improve reproducibility for c++ object files
@@ -39,6 +39,14 @@ do_install_append () {
rm -rf ${D}${datadir}/${PN}
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
+
+ # Ensure correct ownership for files copied in
+ chown root.root ${D}${sysconfdir}/stap-exporter/* -R
}
BBCLASSEXTEND = "nativesdk"
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] systemtap: Fix issues from 4.0 upgrade
2018-10-16 19:25 [PATCH] systemtap: Fix issues from 4.0 upgrade Richard Purdie
@ 2018-10-17 8:29 ` Martin Hundebøll
2018-10-17 12:40 ` richard.purdie
0 siblings, 1 reply; 3+ messages in thread
From: Martin Hundebøll @ 2018-10-17 8:29 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
Hi Richard,
On 16/10/2018 21.25, Richard Purdie wrote:
> 4.0 adds systemd support but installs the unit files in the wrong location.
> Fix this in do_install and inherit systemd to package them correctly.
>
> Also fix ownership of files manually copied in to root:root to avoid QA warnings.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> meta/recipes-kernel/systemtap/systemtap_git.bb | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
> index 0b7833e901b..3c45bfa9374 100644
> --- a/meta/recipes-kernel/systemtap/systemtap_git.bb
> +++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
> @@ -25,7 +25,7 @@ PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
> PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
> PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native"
>
> -inherit autotools gettext pkgconfig distutils3-base
> +inherit autotools gettext pkgconfig distutils3-base systemd
>
> do_configure_prepend () {
> # Improve reproducibility for c++ object files
> @@ -39,6 +39,14 @@ do_install_append () {
> rm -rf ${D}${datadir}/${PN}
> 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
> +
> + # Ensure correct ownership for files copied in
> + chown root.root ${D}${sysconfdir}/stap-exporter/* -R
root:root ?
> }
>
> BBCLASSEXTEND = "nativesdk"
>
--
Kind regards,
Martin Hundebøll
Embedded Linux Consultant
+45 61 65 54 61
martin@geanix.com
Geanix IVS
https://geanix.com
DK39600706
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] systemtap: Fix issues from 4.0 upgrade
2018-10-17 8:29 ` Martin Hundebøll
@ 2018-10-17 12:40 ` richard.purdie
0 siblings, 0 replies; 3+ messages in thread
From: richard.purdie @ 2018-10-17 12:40 UTC (permalink / raw)
To: Martin Hundebøll, openembedded-core
On Wed, 2018-10-17 at 10:29 +0200, Martin Hundebøll wrote:
> On 16/10/2018 21.25, Richard Purdie wrote:
> > +
> > + # 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
> > +
> > + # Ensure correct ownership for files copied in
> > + chown root.root ${D}${sysconfdir}/stap-exporter/* -R
>
> root:root ?
Well spotted, thanks!
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-17 12:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-16 19:25 [PATCH] systemtap: Fix issues from 4.0 upgrade Richard Purdie
2018-10-17 8:29 ` Martin Hundebøll
2018-10-17 12:40 ` richard.purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox