[PATCH 1/4] configure: Allow to disable libvirt

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/4] configure: Allow to disable libvirt

Richard Purdie-2
From: Wenzong Fan <[hidden email]>

Rather than just autodetecting libvirt allow it to be explictly disabled even
if present (important for reproducibile builds).

Signed-off-by: Wenzong Fan <[hidden email]>
Signed-off-by: Richard Purdie <[hidden email]>
---
 configure.ac | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index d3dbc0277..171c5bcf0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -706,10 +706,15 @@ AC_ARG_ENABLE([virt],
 
 dnl We require libvirt >= 1.0.2 because stapvirt relies on the
 dnl virDomainOpenChannel function, which was implemented in 1.0.2.
-PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [
-   have_libvirt=yes
-   AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed])
-   ], [have_libvirt=no])
+AC_ARG_ENABLE([libvirt],
+  AS_HELP_STRING([--disable-libvirt], [Do not use libvirt even if present]))
+
+if test "$enable_libvirt" != no; then
+  PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [
+     have_libvirt=yes
+     AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed])
+     ], [have_libvirt=no])
+fi
 AM_CONDITIONAL([HAVE_LIBVIRT], [test "${have_libvirt}" = "yes"])
 PKG_CHECK_MODULES([libxml2], [libxml-2.0], [
    have_libxml2=yes
--
2.17.1

Reply | Threaded
Open this post in threaded view
|

[PATCH 2/4] configure: Allow explicit configuration of the monitor

Richard Purdie-2
From: Ross Burton <[hidden email]>

Add an option to explicitly disable the monitor (and therefore the dependency on
json-c and ncurses) with the aim of deterministic builds.

Signed-off-by: Ross Burton <[hidden email]>
Signed-off-by: Richard Purdie <[hidden email]>
---
 configure.ac | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 171c5bcf0..1a6eb1874 100644
--- a/configure.ac
+++ b/configure.ac
@@ -801,13 +801,16 @@ dnl We want either (or both) python probe support.
 AM_CONDITIONAL([HAVE_PYTHON_PROBES],
   [test "x$have_python2_support" = "xyes" -o "x$have_python3_support" = "xyes"])
 
+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 >= 0.11], [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"
--
2.17.1

Reply | Threaded
Open this post in threaded view
|

[PATCH 3/4] configure: Remove explicit msgfmt check

Richard Purdie-2
In reply to this post by Richard Purdie-2
From: Ross Burton <[hidden email]>

There is no need to explicitly check that msgfmt was found as the gettext macros
handle this for us if NLS is enabled.

Signed-off-by: Ross Burton <[hidden email]>
Signed-off-by: Richard Purdie <[hidden email]>
---
 configure.ac | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1a6eb1874..96c5c9db7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,10 +36,6 @@ AC_CHECK_FUNCS(openat)
 AM_GNU_GETTEXT(external)
 AM_GNU_GETTEXT_VERSION([0.19.4])
 
-if test "x$GMSGFMT" = "x:"; then
-   AC_MSG_ERROR([missing gnu /usr/bin/msgfmt])
-fi
-
 # We want the 'PYTHON' varible to be python version 2. We also want
 # our custom 'PYTHON3' varible to be python version 3.
 #
--
2.17.1

Reply | Threaded
Open this post in threaded view
|

[PATCH 4/4] cache.cxx: Fix errors on x32 builds

Richard Purdie-2
In reply to this post by Richard Purdie-2
Fix time_t print because in x32 ABI is long long int instead of long int.

Signed-off-by: Aníbal Limón <[hidden email]>
Signed-off-by: Richard Purdie <[hidden email]>
---
 cache.cxx | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/cache.cxx b/cache.cxx
index 3546b3037..19c77ca0c 100644
--- a/cache.cxx
+++ b/cache.cxx
@@ -294,7 +294,11 @@ clean_cache(systemtap_session& s)
         {
           //interval not passed, don't continue
           if (s.verbose > 1)
+#if defined(__x86_64__) && defined (__ILP32__)
+            clog << _F("Cache cleaning skipped, interval not reached %lld s / %lu s.",
+#else
             clog << _F("Cache cleaning skipped, interval not reached %lu s / %lu s.",
+#endif
                        (current_time.tv_sec-sb.st_mtime), cache_clean_interval)  << endl;
           return;
         }
@@ -302,7 +306,11 @@ clean_cache(systemtap_session& s)
         {
           //interval reached, continue
           if (s.verbose > 1)
+#if defined(__x86_64__) && defined (__ILP32__)
+            clog << _F("Cleaning cache, interval reached %lld s > %lu s.",
+#else
             clog << _F("Cleaning cache, interval reached %lu s > %lu s.",
+#endif
                        (current_time.tv_sec-sb.st_mtime), cache_clean_interval)  << endl;
         }
 
--
2.17.1