All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] json-c: add BBCLASSEXTEND for native and nativesdk
@ 2016-10-04 15:37 Ross Burton
  2016-10-04 15:37 ` [PATCH 2/2] systemtap: rationalise dependencies Ross Burton
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2016-10-04 15:37 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-devtools/json-c/json-c_0.12.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/json-c/json-c_0.12.bb b/meta/recipes-devtools/json-c/json-c_0.12.bb
index d8c76db..a15455c 100644
--- a/meta/recipes-devtools/json-c/json-c_0.12.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.12.bb
@@ -28,3 +28,5 @@ do_configure_prepend() {
     # Clean up autoconf cruft that should not be in the tarball
     rm -f ${S}/config.status
 }
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.8.1



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

* [PATCH 2/2] systemtap: rationalise dependencies
  2016-10-04 15:37 [PATCH 1/2] json-c: add BBCLASSEXTEND for native and nativesdk Ross Burton
@ 2016-10-04 15:37 ` Ross Burton
  2016-10-04 17:03   ` Martin Jansa
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2016-10-04 15:37 UTC (permalink / raw)
  To: openembedded-core

Boost is an optional dependency but avoid build non-determinism by adding it as
DEPENDS.  It is only for the shared pointer types so can be disabled explicitly
if required.

Turn sqlite into a PACKAGECONFIG.

Add a patch for the "monitor" feature to control the optional dependencies on
ncurses and json-c. Previously this was enabled for target only but enable it
everwhere now that json-c is available for native/nativesdk.

Of course all of this was predicated about systemtap needing systemtap-native to
be built, but it turns out that this dependency is due to oe-core 507bd2 which
adds systemtap-native as DEPENDS for convenience.  Remove this dependency, if
the user wants systemtap-native then they can build it explicitly.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 .../systemtap/systemtap/monitor-option.patch       | 28 ++++++++++++++++++++++
 meta/recipes-kernel/systemtap/systemtap_git.bb     |  8 +++----
 meta/recipes-kernel/systemtap/systemtap_git.inc    |  1 +
 3 files changed, 33 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/monitor-option.patch

diff --git a/meta/recipes-kernel/systemtap/systemtap/monitor-option.patch b/meta/recipes-kernel/systemtap/systemtap/monitor-option.patch
new file mode 100644
index 0000000..7d43a79
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/monitor-option.patch
@@ -0,0 +1,28 @@
+Add an option to explicitly disable the monitor (and therefore the dependency on
+json-c and ncurses).
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index cd781a2..e56079a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -570,13 +574,16 @@ dnl See if we have enough libraries and tools to build the virt server
+ fi
+ AM_CONDITIONAL([BUILD_VIRT], [test "${have_libvirt}" == "yes" -a "${have_libxml2}" == "yes" -a "$enable_virt" != "no"])
+
++AC_ARG_ENABLE([monitor], AS_HELP_STRING([--disable-monitor],[Disable monitor]))
++if test "$enable_monitor" != "no"; then
+ dnl Check for presence of json-c and ncurses for use in monitor mode
+ PKG_CHECK_MODULES([jsonc], [json-c], [have_jsonc=yes], [have_jsonc=no])
+ PKG_CHECK_MODULES([ncurses], [ncurses], [have_ncurses=yes], [have_ncurses=no])
+-AM_CONDITIONAL([HAVE_MONITOR_LIBS], [test "${have_jsonc}" == "yes" -a "${have_ncurses}" == "yes"])
+ if test "${have_jsonc}" == "yes" -a "${have_ncurses}" == yes; then
+   AC_DEFINE([HAVE_MONITOR_LIBS],[1],[Define to 1 if json-c and ncurses libraries are installed])
+ fi
++fi
++AM_CONDITIONAL([HAVE_MONITOR_LIBS], [test "${have_jsonc}" == "yes" -a "${have_ncurses}" == "yes" -a "$enable_monitor" != "no"])
+
+ AC_CACHE_CHECK([for assembler .section "?" flags support], stap_cv_sectionq, [
+ old_CFLAGS="$CFLAGS"
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index da30fa5..43bf69e 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -2,9 +2,7 @@ SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Lin
 
 require systemtap_git.inc
 
-DEPENDS = "elfutils sqlite3 systemtap-native ncurses json-c"
-DEPENDS_class-native = "elfutils-native sqlite3-native gettext-native"
-DEPENDS_class-nativesdk = "nativesdk-elfutils nativesdk-sqlite3 nativesdk-gettext"
+DEPENDS = "boost elfutils"
 
 RDEPENDS_${PN} += "python3-core bash"
 
@@ -19,8 +17,10 @@ STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
 
 EXTRA_OECONF += "${STAP_DOCS} "
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "sqlite monitor"
 PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
+PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
+PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
 
 inherit autotools gettext pkgconfig
 
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index ce976ed..304eb99 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -8,6 +8,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git \
            file://system_map_location.patch \
            file://configure-allow-to-disable-libvirt.patch \
            file://x32_abi_time.patch \
+           file://monitor-option.patch \
           "
 
 # systemtap doesn't support mips
-- 
2.8.1



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

* Re: [PATCH 2/2] systemtap: rationalise dependencies
  2016-10-04 15:37 ` [PATCH 2/2] systemtap: rationalise dependencies Ross Burton
@ 2016-10-04 17:03   ` Martin Jansa
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2016-10-04 17:03 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 5150 bytes --]

On Tue, Oct 04, 2016 at 04:37:53PM +0100, Ross Burton wrote:
> Boost is an optional dependency but avoid build non-determinism by adding it as
> DEPENDS.  It is only for the shared pointer types so can be disabled explicitly
> if required.
> 
> Turn sqlite into a PACKAGECONFIG.
> 
> Add a patch for the "monitor" feature to control the optional dependencies on
> ncurses and json-c. Previously this was enabled for target only but enable it
> everwhere now that json-c is available for native/nativesdk.
> 
> Of course all of this was predicated about systemtap needing systemtap-native to
> be built, but it turns out that this dependency is due to oe-core 507bd2 which
> adds systemtap-native as DEPENDS for convenience.  Remove this dependency, if
> the user wants systemtap-native then they can build it explicitly.

Thanks!

Acked-by: Martin Jansa <Martin.Jansa@gmail.com>

> 
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  .../systemtap/systemtap/monitor-option.patch       | 28 ++++++++++++++++++++++
>  meta/recipes-kernel/systemtap/systemtap_git.bb     |  8 +++----
>  meta/recipes-kernel/systemtap/systemtap_git.inc    |  1 +
>  3 files changed, 33 insertions(+), 4 deletions(-)
>  create mode 100644 meta/recipes-kernel/systemtap/systemtap/monitor-option.patch
> 
> diff --git a/meta/recipes-kernel/systemtap/systemtap/monitor-option.patch b/meta/recipes-kernel/systemtap/systemtap/monitor-option.patch
> new file mode 100644
> index 0000000..7d43a79
> --- /dev/null
> +++ b/meta/recipes-kernel/systemtap/systemtap/monitor-option.patch
> @@ -0,0 +1,28 @@
> +Add an option to explicitly disable the monitor (and therefore the dependency on
> +json-c and ncurses).
> +
> +Upstream-Status: Pending
> +Signed-off-by: Ross Burton <ross.burton@intel.com>
> +
> +diff --git a/configure.ac b/configure.ac
> +index cd781a2..e56079a 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -570,13 +574,16 @@ dnl See if we have enough libraries and tools to build the virt server
> + fi
> + AM_CONDITIONAL([BUILD_VIRT], [test "${have_libvirt}" == "yes" -a "${have_libxml2}" == "yes" -a "$enable_virt" != "no"])
> +
> ++AC_ARG_ENABLE([monitor], AS_HELP_STRING([--disable-monitor],[Disable monitor]))
> ++if test "$enable_monitor" != "no"; then
> + dnl Check for presence of json-c and ncurses for use in monitor mode
> + PKG_CHECK_MODULES([jsonc], [json-c], [have_jsonc=yes], [have_jsonc=no])
> + PKG_CHECK_MODULES([ncurses], [ncurses], [have_ncurses=yes], [have_ncurses=no])
> +-AM_CONDITIONAL([HAVE_MONITOR_LIBS], [test "${have_jsonc}" == "yes" -a "${have_ncurses}" == "yes"])
> + if test "${have_jsonc}" == "yes" -a "${have_ncurses}" == yes; then
> +   AC_DEFINE([HAVE_MONITOR_LIBS],[1],[Define to 1 if json-c and ncurses libraries are installed])
> + fi
> ++fi
> ++AM_CONDITIONAL([HAVE_MONITOR_LIBS], [test "${have_jsonc}" == "yes" -a "${have_ncurses}" == "yes" -a "$enable_monitor" != "no"])
> +
> + AC_CACHE_CHECK([for assembler .section "?" flags support], stap_cv_sectionq, [
> + old_CFLAGS="$CFLAGS"
> diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
> index da30fa5..43bf69e 100644
> --- a/meta/recipes-kernel/systemtap/systemtap_git.bb
> +++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
> @@ -2,9 +2,7 @@ SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Lin
>  
>  require systemtap_git.inc
>  
> -DEPENDS = "elfutils sqlite3 systemtap-native ncurses json-c"
> -DEPENDS_class-native = "elfutils-native sqlite3-native gettext-native"
> -DEPENDS_class-nativesdk = "nativesdk-elfutils nativesdk-sqlite3 nativesdk-gettext"
> +DEPENDS = "boost elfutils"
>  
>  RDEPENDS_${PN} += "python3-core bash"
>  
> @@ -19,8 +17,10 @@ STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
>  
>  EXTRA_OECONF += "${STAP_DOCS} "
>  
> -PACKAGECONFIG ??= ""
> +PACKAGECONFIG ??= "sqlite monitor"
>  PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
> +PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
> +PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
>  
>  inherit autotools gettext pkgconfig
>  
> diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
> index ce976ed..304eb99 100644
> --- a/meta/recipes-kernel/systemtap/systemtap_git.inc
> +++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
> @@ -8,6 +8,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git \
>             file://system_map_location.patch \
>             file://configure-allow-to-disable-libvirt.patch \
>             file://x32_abi_time.patch \
> +           file://monitor-option.patch \
>            "
>  
>  # systemtap doesn't support mips
> -- 
> 2.8.1
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 169 bytes --]

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

end of thread, other threads:[~2016-10-04 17:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-04 15:37 [PATCH 1/2] json-c: add BBCLASSEXTEND for native and nativesdk Ross Burton
2016-10-04 15:37 ` [PATCH 2/2] systemtap: rationalise dependencies Ross Burton
2016-10-04 17:03   ` Martin Jansa

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.