diff options
-rw-r--r-- | ChangeLog | 40 | ||||
-rw-r--r-- | Makefile.am | 20 | ||||
-rw-r--r-- | Makefile.in | 70 | ||||
-rw-r--r-- | buildrun.cxx | 7 | ||||
-rwxr-xr-x | configure | 341 | ||||
-rw-r--r-- | configure.ac | 70 | ||||
-rw-r--r-- | doc/ChangeLog | 11 | ||||
-rw-r--r-- | doc/Makefile.in | 1 | ||||
-rw-r--r-- | doc/SystemTap_Tapset_Reference/Makefile.am | 23 | ||||
-rw-r--r-- | doc/SystemTap_Tapset_Reference/Makefile.in | 42 | ||||
-rw-r--r-- | runtime/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/autoconf-task-uid.c | 6 | ||||
-rw-r--r-- | runtime/transport/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/transport/transport.c | 7 | ||||
-rw-r--r-- | stap.1.in | 2 | ||||
-rw-r--r-- | systemtap.spec | 3 | ||||
-rw-r--r-- | tapset/ChangeLog | 5 | ||||
-rw-r--r-- | tapset/context.stp | 18 | ||||
-rw-r--r-- | tapset/task.stp | 35 | ||||
-rw-r--r-- | testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | testsuite/systemtap.context/backtrace.tcl | 2 |
21 files changed, 510 insertions, 208 deletions
@@ -36,6 +36,46 @@ evidence that the server is listening. * Makefile.in: Regenerated. +2009-01-08 William Cohen <wcohen@redhat.com> + + * configure.ac: Check for xmlto that generates pdf. + * configure: Regenerated. + +2009-01-07 William Cohen <wcohen@redhat.com> + + * configure.ac: Add --enable-refdocs configure option and + set check for xmlto + * Makefile.in: Regenerated. + * aclocal.m4: Likewise. + * configure: Likewise. + +2009-01-07 Mark Wielaard <mjw@redhat.com> + + * configure.ac: Warn when not building docs because tools not found. + * configure: Regenerated. + +2009-01-07 Mark Wielaard <mjw@redhat.com> + + * configure.ac: Add --enable-server configure option and + set BUILD_SERVER appropriately. + * Makefile.am (man_MANS, bin_PROGRAMS, bin_SCRIPTS): Only add + stap-server and friends when BUILD_SERVER set.A + * Makefile.in: Regenerated. + * aclocal.m4: Likewise. + * configure: Likewise. + +2009-01-06 Frank Ch. Eigler <fche@elastic.org> + + PR9699. + * buildrun.cxx (compile_pass): Add $(LINUXINCLUDES) to autoconf + trial builds. Add new autoconf test for task_struct uid->cred switch. + +2009-01-06 Dave Brolley <brolley@redhat.com> + + * systemtap.spec (stap-client): Add stap-add-server-cert, + stap-client-connect. + (stap-server): Add stap-server-connect. + 2009-01-05 Dave Brolley <brolley@redhat.com> PR9702 diff --git a/Makefile.am b/Makefile.am index 76968a49..38a2edaf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,12 +10,18 @@ AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DPKGDATADIR='"${pkgdatadir}"' -DPKGLIBDIR= AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W AM_CXXFLAGS = -Wall -Werror -man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 stap-server.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5 +man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5 # see also configure.ac -bin_PROGRAMS = stap staprun stap-client-connect stap-server-connect -bin_SCRIPTS = stap-client stap-serverd stap-server stap-find-servers stap-start-server stap-find-or-start-server stap-stop-server \ - stap-gen-server-cert stap-add-server-cert stap-report +bin_PROGRAMS = stap staprun +bin_SCRIPTS = stap-report +if BUILD_SERVER +man_MANS += stap-server.8 +bin_PROGRAMS += stap-client-connect stap-server-connect +bin_SCRIPTS += stap-client stap-serverd stap-server stap-find-servers \ + stap-start-server stap-find-or-start-server stap-stop-server \ + stap-gen-server-cert stap-add-server-cert +endif stap_SOURCES = main.cxx \ parse.cxx staptree.cxx elaborate.cxx translate.cxx \ tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \ @@ -69,9 +75,11 @@ stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ staprun_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ stapio_CPPFLAGS = $(AM_CPPFLAGS) stapio_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ + +if BUILD_SERVER stap_client_connect_LDFLAGS = $(AM_LDFLAGS) stap_server_connect_LDFLAGS = $(AM_LDFLAGS) - +endif PHONIES = if BUILD_ELFUTILS @@ -119,6 +127,7 @@ stapio_SOURCES = runtime/staprun/stapio.c \ stapio_CFLAGS = @PROCFLAGS@ $(AM_CFLAGS) -fno-strict-aliasing stapio_LDADD = @PROCFLAGS@ -lpthread +if BUILD_SERVER stap_client_connect_SOURCES = stap-client-connect.c stap_client_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) stap_client_connect_LDADD = -lssl3 @@ -126,6 +135,7 @@ stap_client_connect_LDADD = -lssl3 stap_server_connect_SOURCES = stap-server-connect.c stap_server_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) stap_server_connect_LDADD = -lssl3 +endif install-exec-hook: if [ `id -u` -eq 0 ]; then chmod 04111 "$(DESTDIR)$(bindir)/staprun"; fi diff --git a/Makefile.in b/Makefile.in index c1791c84..37afdcdc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -34,16 +34,21 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -bin_PROGRAMS = stap$(EXEEXT) staprun$(EXEEXT) \ - stap-client-connect$(EXEEXT) stap-server-connect$(EXEEXT) -@BUILD_ELFUTILS_TRUE@am__append_1 = -Iinclude-elfutils -@BUILD_ELFUTILS_TRUE@am__append_2 = -Llib-elfutils -Wl,-rpath-link,lib-elfutils \ +bin_PROGRAMS = stap$(EXEEXT) staprun$(EXEEXT) $(am__EXEEXT_1) +@BUILD_SERVER_TRUE@am__append_1 = stap-server.8 +@BUILD_SERVER_TRUE@am__append_2 = stap-client-connect stap-server-connect +@BUILD_SERVER_TRUE@am__append_3 = stap-client stap-serverd stap-server stap-find-servers \ +@BUILD_SERVER_TRUE@ stap-start-server stap-find-or-start-server stap-stop-server \ +@BUILD_SERVER_TRUE@ stap-gen-server-cert stap-add-server-cert + +@BUILD_ELFUTILS_TRUE@am__append_4 = -Iinclude-elfutils +@BUILD_ELFUTILS_TRUE@am__append_5 = -Llib-elfutils -Wl,-rpath-link,lib-elfutils \ @BUILD_ELFUTILS_TRUE@ -Wl,--enable-new-dtags,-rpath,$(pkglibdir) -@BUILD_ELFUTILS_TRUE@am__append_3 = stamp-elfutils -@BUILD_ELFUTILS_TRUE@am__append_4 = stamp-elfutils -@BUILD_ELFUTILS_TRUE@am__append_5 = lib-elfutils/libdw.so -@BUILD_ELFUTILS_TRUE@am__append_6 = install-elfutils +@BUILD_ELFUTILS_TRUE@am__append_6 = stamp-elfutils +@BUILD_ELFUTILS_TRUE@am__append_7 = stamp-elfutils +@BUILD_ELFUTILS_TRUE@am__append_8 = lib-elfutils/libdw.so +@BUILD_ELFUTILS_TRUE@am__append_9 = install-elfutils pkglibexec_PROGRAMS = stapio$(EXEEXT) noinst_PROGRAMS = loc2c-test$(EXEEXT) subdir = . @@ -101,6 +106,8 @@ libsduprobes_a_AR = $(AR) $(ARFLAGS) libsduprobes_a_LIBADD = @BUILD_ELFUTILS_TRUE@am_libsduprobes_a_OBJECTS = sduprobes.$(OBJEXT) libsduprobes_a_OBJECTS = $(am_libsduprobes_a_OBJECTS) +@BUILD_SERVER_TRUE@am__EXEEXT_1 = stap-client-connect$(EXEEXT) \ +@BUILD_SERVER_TRUE@ stap-server-connect$(EXEEXT) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) pkglibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(pkglibexec_PROGRAMS) @@ -121,14 +128,12 @@ am_stap_OBJECTS = stap-main.$(OBJEXT) stap-parse.$(OBJEXT) \ stap_OBJECTS = $(am_stap_OBJECTS) stap_LINK = $(CXXLD) $(stap_CXXFLAGS) $(CXXFLAGS) $(stap_LDFLAGS) \ $(LDFLAGS) -o $@ -am_stap_client_connect_OBJECTS = \ - stap_client_connect-stap-client-connect.$(OBJEXT) +@BUILD_SERVER_TRUE@am_stap_client_connect_OBJECTS = stap_client_connect-stap-client-connect.$(OBJEXT) stap_client_connect_OBJECTS = $(am_stap_client_connect_OBJECTS) stap_client_connect_DEPENDENCIES = stap_client_connect_LINK = $(CCLD) $(stap_client_connect_CFLAGS) \ $(CFLAGS) $(stap_client_connect_LDFLAGS) $(LDFLAGS) -o $@ -am_stap_server_connect_OBJECTS = \ - stap_server_connect-stap-server-connect.$(OBJEXT) +@BUILD_SERVER_TRUE@am_stap_server_connect_OBJECTS = stap_server_connect-stap-server-connect.$(OBJEXT) stap_server_connect_OBJECTS = $(am_stap_server_connect_OBJECTS) stap_server_connect_DEPENDENCIES = stap_server_connect_LINK = $(CCLD) $(stap_server_connect_CFLAGS) \ @@ -261,6 +266,7 @@ have_dvips = @have_dvips@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ +have_xmlto = @have_xmlto@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ @@ -297,10 +303,14 @@ pkglibexecdir = ${libexecdir}/${PACKAGE} AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DPKGDATADIR='"${pkgdatadir}"' -DPKGLIBDIR='"$(pkglibexecdir)"' AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W AM_CXXFLAGS = -Wall -Werror -man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 stap-server.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5 -bin_SCRIPTS = stap-client stap-serverd stap-server stap-find-servers stap-start-server stap-find-or-start-server stap-stop-server \ - stap-gen-server-cert stap-add-server-cert stap-report - +man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 \ + staprun.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 \ + man/stapprobes.nfs.5 man/stapprobes.nfsd.5 \ + man/stapprobes.pagefault.5 man/stapprobes.process.5 \ + man/stapprobes.rpc.5 man/stapprobes.scsi.5 \ + man/stapprobes.signal.5 man/stapprobes.socket.5 \ + man/stapprobes.tcp.5 man/stapprobes.udp.5 $(am__append_1) +bin_SCRIPTS = stap-report $(am__append_3) stap_SOURCES = main.cxx \ parse.cxx staptree.cxx elaborate.cxx translate.cxx \ tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \ @@ -316,19 +326,19 @@ stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ # of foo-bar.c if it is newer than the foo-bar.o file. Using noinst_foo_SOURCES # instead of foo_SOURCES prevents shipping git_version.h in dist tarballs, # which may cause false GIT_FOO readings. -BUILT_SOURCES = git_version.stamp $(am__append_3) -CLEANFILES = git_version.h $(am__append_4) $(pkglibexec_PROGRAMS) -stap_DEPENDENCIES = $(am__append_5) +BUILT_SOURCES = git_version.stamp $(am__append_6) +CLEANFILES = git_version.h $(am__append_7) $(pkglibexec_PROGRAMS) +stap_DEPENDENCIES = $(am__append_8) GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh stap_CXXFLAGS = $(AM_CXXFLAGS) -stap_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_1) -stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ $(am__append_2) +stap_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_4) +stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ $(am__append_5) staprun_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ stapio_CPPFLAGS = $(AM_CPPFLAGS) stapio_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ -stap_client_connect_LDFLAGS = $(AM_LDFLAGS) -stap_server_connect_LDFLAGS = $(AM_LDFLAGS) -PHONIES = $(am__append_6) dist-gzip +@BUILD_SERVER_TRUE@stap_client_connect_LDFLAGS = $(AM_LDFLAGS) +@BUILD_SERVER_TRUE@stap_server_connect_LDFLAGS = $(AM_LDFLAGS) +PHONIES = $(am__append_9) dist-gzip @BUILD_ELFUTILS_TRUE@pkglib_LIBRARIES = libsduprobes.a @BUILD_ELFUTILS_TRUE@libsduprobes_a_SOURCES = runtime/sduprobes.c staprun_SOURCES = runtime/staprun/staprun.c runtime/staprun/staprun_funcs.c\ @@ -344,12 +354,12 @@ stapio_SOURCES = runtime/staprun/stapio.c \ stapio_CFLAGS = @PROCFLAGS@ $(AM_CFLAGS) -fno-strict-aliasing stapio_LDADD = @PROCFLAGS@ -lpthread -stap_client_connect_SOURCES = stap-client-connect.c -stap_client_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) -stap_client_connect_LDADD = -lssl3 -stap_server_connect_SOURCES = stap-server-connect.c -stap_server_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) -stap_server_connect_LDADD = -lssl3 +@BUILD_SERVER_TRUE@stap_client_connect_SOURCES = stap-client-connect.c +@BUILD_SERVER_TRUE@stap_client_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_SERVER_TRUE@stap_client_connect_LDADD = -lssl3 +@BUILD_SERVER_TRUE@stap_server_connect_SOURCES = stap-server-connect.c +@BUILD_SERVER_TRUE@stap_server_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_SERVER_TRUE@stap_server_connect_LDADD = -lssl3 loc2c_test_SOURCES = loc2c-test.c loc2c.c loc2c_test_CPPFLAGS = $(stap_CPPFLAGS) loc2c_test_LDFLAGS = $(stap_LDFLAGS) diff --git a/buildrun.cxx b/buildrun.cxx index cef1b11a..c626cf2a 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -86,7 +86,7 @@ compile_pass (systemtap_session& s) o << "_KBUILD_CFLAGS := $(call flags,KBUILD_CFLAGS)" << endl; o << "stap_check_gcc = $(shell " << superverbose << " if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo \"$(1)\"; else echo \"$(2)\"; fi)" << endl; - o << "stap_check_build = $(shell " << superverbose << " if $(CC) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(_KBUILD_CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc $(1) " << redirecterrors << " ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl; + o << "stap_check_build = $(shell " << superverbose << " if $(CC) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(LINUXINCLUDE) $(_KBUILD_CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc $(1) " << redirecterrors << " ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl; o << "SYSTEMTAP_RUNTIME = \"" << s.runtime_path << "\"" << endl; @@ -102,6 +102,10 @@ compile_pass (systemtap_session& s) // but that path does not exist in an O= build tree. o << module_cflags << " += -Iinclude2/asm/mach-default" << endl; + // NB: don't try + // o << module_cflags << " += -Iusr/include" << endl; + // since such headers are cleansed of _KERNEL_ pieces that we need + o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-hrtimer-rel.c, -DSTAPCONF_HRTIMER_REL,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-hrtimer-getset-expires.c, -DSTAPCONF_HRTIMER_GETSET_EXPIRES,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-inode-private.c, -DSTAPCONF_INODE_PRIVATE,)" << endl; @@ -116,6 +120,7 @@ compile_pass (systemtap_session& s) o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-oneachcpu-retry.c, -DSTAPCONF_ONEACHCPU_RETRY,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-dpath-path.c, -DSTAPCONF_DPATH_PATH,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-synchronize-sched.c, -DSTAPCONF_SYNCHRONIZE_SCHED,)" << endl; + o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-task-uid.c, -DSTAPCONF_TASK_UID,)" << endl; #if 0 /* NB: For now, the performance hit of probe_kernel_read/write (vs. our @@ -716,11 +716,16 @@ have_ps2pdf have_latex2html BUILD_DOCS_TRUE BUILD_DOCS_FALSE +have_xmlto +BUILD_REFDOCS_TRUE +BUILD_REFDOCS_FALSE PKG_CONFIG nss_CFLAGS nss_LIBS nspr_CFLAGS nspr_LIBS +BUILD_SERVER_TRUE +BUILD_SERVER_FALSE BUILD_ELFUTILS_TRUE BUILD_ELFUTILS_FALSE elfutils_abs_srcdir @@ -1345,6 +1350,10 @@ Optional Features: location). --enable-docs enable building documentation (default on if latex etc. found). + --enable-refdocs enable building reference documentation (default on + if xmlto etc. found and other documentation built). + --enble-server enable building of stap-server/client (default on if + nss etc. found). Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -6229,6 +6238,7 @@ else fi +building_docs="no" # Check whether --enable-docs was given. if test "${enable_docs+set}" = set; then enableval=$enable_docs; enable_docs=$enableval @@ -6388,14 +6398,21 @@ echo "${ECHO_T}no" >&6; } fi -if test "$enable_docs" == "yes"; then - if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesyesyesyes"; then +if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesyesyesyes"; then + if test "$enable_docs" == "yes"; then { { echo "$as_me:$LINENO: error: cannot find all tools for building documentation" >&5 echo "$as_me: error: cannot find all tools for building documentation" >&2;} { (exit 1); exit 1; }; } fi + if test "$enable_docs" == "check"; then + { echo "$as_me:$LINENO: WARNING: will not build documentation, cannot find all tools" >&5 +echo "$as_me: WARNING: will not build documentation, cannot find all tools" >&2;} + fi +fi +if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"; then + building_docs="yes" fi - if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"; then + if test "$building_docs" == "yes"; then BUILD_DOCS_TRUE= BUILD_DOCS_FALSE='#' else @@ -6404,6 +6421,103 @@ else fi +building_refdocs="no" +# Check whether --enable-refdocs was given. +if test "${enable_refdocs+set}" = set; then + enableval=$enable_refdocs; enable_refdocs=$enableval +else + enable_refdocs="check" +fi + +if test "$building_docs" == "no" -a "$enable_refdocs" == "yes" ; then + { { echo "$as_me:$LINENO: error: must use --enable-docs with --enable-refdocs" >&5 +echo "$as_me: error: must use --enable-docs with --enable-refdocs" >&2;} + { (exit 1); exit 1; }; } +fi +# Extract the first word of "xmlto", so it can be a program name with args. +set dummy xmlto; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_have_xmlto+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$have_xmlto"; then + ac_cv_prog_have_xmlto="$have_xmlto" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_have_xmlto="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_have_xmlto" && ac_cv_prog_have_xmlto="no" +fi +fi +have_xmlto=$ac_cv_prog_have_xmlto +if test -n "$have_xmlto"; then + { echo "$as_me:$LINENO: result: $have_xmlto" >&5 +echo "${ECHO_T}$have_xmlto" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test "x${have_xmlto}" == "xyes"; then +{ echo "$as_me:$LINENO: checking for xmlto pdf support" >&5 +echo $ECHO_N "checking for xmlto pdf support... $ECHO_C" >&6; } +cat > conftest.$ac_ext << EOF +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" +"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" > + <book id="pdffromxml"> + </book> +EOF + xmlto pdf conftest.$ac_ext >& /dev/null + if test $? == 0; then + have_xmlto_pdf="yes" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi +fi +if test "$enable_refdocs" == "yes"; then + if test "x${have_xmlto}${have_xmlto_pdf}" != "xyesyes"; then + { { echo "$as_me:$LINENO: error: cannot find proper yxmlto for building reference documentation" >&5 +echo "$as_me: error: cannot find proper yxmlto for building reference documentation" >&2;} + { (exit 1); exit 1; }; } + fi +fi +if test "x${have_xmlto}${have_xmlto_pdf}" == "xyesyes" -a "$enable_refdocs" != "no" -a "${building_docs}" == "yes"; then + building_refdocs="yes" +fi + if test "$building_refdocs" == "yes"; then + BUILD_REFDOCS_TRUE= + BUILD_REFDOCS_FALSE='#' +else + BUILD_REFDOCS_TRUE='#' + BUILD_REFDOCS_FALSE= +fi + + +# Check whether --enable-server was given. +if test "${enable_server+set}" = set; then + enableval=$enable_server; enable_server=$enableval +else + enable_server="check" +fi + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then @@ -6529,11 +6643,10 @@ pkg_failed=no { echo "$as_me:$LINENO: checking for nss" >&5 echo $ECHO_N "checking for nss... $ECHO_C" >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$nss_CFLAGS"; then - pkg_cv_nss_CFLAGS="$nss_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$nss_CFLAGS"; then + pkg_cv_nss_CFLAGS="$nss_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss >= 3\"") >&5 ($PKG_CONFIG --exists --print-errors "nss >= 3") 2>&5 ac_status=$? @@ -6543,15 +6656,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$nss_LIBS"; then - pkg_cv_nss_LIBS="$nss_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$nss_LIBS"; then + pkg_cv_nss_LIBS="$nss_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss >= 3\"") >&5 ($PKG_CONFIG --exists --print-errors "nss >= 3") 2>&5 ac_status=$? @@ -6561,9 +6672,8 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -6576,75 +6686,34 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - nss_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "nss >= 3"` + nss_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "nss >= 3" 2>&1` else - nss_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nss >= 3"` + nss_PKG_ERRORS=`$PKG_CONFIG --print-errors "nss >= 3" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$nss_PKG_ERRORS" >&5 - { { echo "$as_me:$LINENO: error: Package requirements (nss >= 3) were not met: - -$nss_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables nss_CFLAGS -and nss_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -echo "$as_me: error: Package requirements (nss >= 3) were not met: - -$nss_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables nss_CFLAGS -and nss_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_nss=no elif test $pkg_failed = untried; then - { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables nss_CFLAGS -and nss_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see <http://pkg-config.freedesktop.org/>. -See \`config.log' for more details." >&5 -echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables nss_CFLAGS -and nss_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see <http://pkg-config.freedesktop.org/>. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + have_nss=no else nss_CFLAGS=$pkg_cv_nss_CFLAGS nss_LIBS=$pkg_cv_nss_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - : + have_nss=yes fi pkg_failed=no { echo "$as_me:$LINENO: checking for nspr" >&5 echo $ECHO_N "checking for nspr... $ECHO_C" >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$nspr_CFLAGS"; then - pkg_cv_nspr_CFLAGS="$nspr_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$nspr_CFLAGS"; then + pkg_cv_nspr_CFLAGS="$nspr_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nspr >= 4\"") >&5 ($PKG_CONFIG --exists --print-errors "nspr >= 4") 2>&5 ac_status=$? @@ -6654,15 +6723,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$nspr_LIBS"; then - pkg_cv_nspr_LIBS="$nspr_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$nspr_LIBS"; then + pkg_cv_nspr_LIBS="$nspr_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nspr >= 4\"") >&5 ($PKG_CONFIG --exists --print-errors "nspr >= 4") 2>&5 ac_status=$? @@ -6672,9 +6739,8 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -6687,65 +6753,44 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - nspr_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "nspr >= 4"` + nspr_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "nspr >= 4" 2>&1` else - nspr_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nspr >= 4"` + nspr_PKG_ERRORS=`$PKG_CONFIG --print-errors "nspr >= 4" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$nspr_PKG_ERRORS" >&5 - { { echo "$as_me:$LINENO: error: Package requirements (nspr >= 4) were not met: - -$nspr_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables nspr_CFLAGS -and nspr_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -echo "$as_me: error: Package requirements (nspr >= 4) were not met: - -$nspr_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables nspr_CFLAGS -and nspr_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_nspr=no elif test $pkg_failed = untried; then - { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables nspr_CFLAGS -and nspr_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see <http://pkg-config.freedesktop.org/>. -See \`config.log' for more details." >&5 -echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables nspr_CFLAGS -and nspr_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see <http://pkg-config.freedesktop.org/>. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + have_nspr=no else nspr_CFLAGS=$pkg_cv_nspr_CFLAGS nspr_LIBS=$pkg_cv_nspr_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - : + have_nspr=yes +fi +if test "x${have_nss}${have_nspr}" != "xyesyes"; then + if test "$enable_server" == "yes"; then + { { echo "$as_me:$LINENO: error: cannot find all libraries for stap-server" >&5 +echo "$as_me: error: cannot find all libraries for stap-server" >&2;} + { (exit 1); exit 1; }; } + fi + if test "$enable_server" == "check"; then + { echo "$as_me:$LINENO: WARNING: will not build stap-server, cannot find all libraries" >&5 +echo "$as_me: WARNING: will not build stap-server, cannot find all libraries" >&2;} + fi fi + if test "x${have_nss}${have_nspr}" == "xyesyes" -a "$enable_server" != "no"; then + BUILD_SERVER_TRUE= + BUILD_SERVER_FALSE='#' +else + BUILD_SERVER_TRUE='#' + BUILD_SERVER_FALSE= +fi + build_elfutils=no @@ -7679,6 +7724,20 @@ echo "$as_me: error: conditional \"BUILD_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${BUILD_REFDOCS_TRUE}" && test -z "${BUILD_REFDOCS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_REFDOCS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_REFDOCS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_SERVER_TRUE}" && test -z "${BUILD_SERVER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_SERVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_SERVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${BUILD_ELFUTILS_TRUE}" && test -z "${BUILD_ELFUTILS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"BUILD_ELFUTILS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -8383,11 +8442,16 @@ have_ps2pdf!$have_ps2pdf$ac_delim have_latex2html!$have_latex2html$ac_delim BUILD_DOCS_TRUE!$BUILD_DOCS_TRUE$ac_delim BUILD_DOCS_FALSE!$BUILD_DOCS_FALSE$ac_delim +have_xmlto!$have_xmlto$ac_delim +BUILD_REFDOCS_TRUE!$BUILD_REFDOCS_TRUE$ac_delim +BUILD_REFDOCS_FALSE!$BUILD_REFDOCS_FALSE$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim nss_CFLAGS!$nss_CFLAGS$ac_delim nss_LIBS!$nss_LIBS$ac_delim nspr_CFLAGS!$nspr_CFLAGS$ac_delim nspr_LIBS!$nspr_LIBS$ac_delim +BUILD_SERVER_TRUE!$BUILD_SERVER_TRUE$ac_delim +BUILD_SERVER_FALSE!$BUILD_SERVER_FALSE$ac_delim BUILD_ELFUTILS_TRUE!$BUILD_ELFUTILS_TRUE$ac_delim BUILD_ELFUTILS_FALSE!$BUILD_ELFUTILS_FALSE$ac_delim elfutils_abs_srcdir!$elfutils_abs_srcdir$ac_delim @@ -8400,7 +8464,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -8801,21 +8865,22 @@ echo "$as_me: $ac_file is unchanged" >&6;} fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. +_am_arg=$ac_file _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $ac_file | $ac_file:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || -$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| . 2>/dev/null || -echo X$ac_file | +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -8852,7 +8917,7 @@ echo "$as_me: executing $ac_file commands" >&6;} # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ diff --git a/configure.ac b/configure.ac index f979f8e4..7866fe96 100644 --- a/configure.ac +++ b/configure.ac @@ -145,6 +145,7 @@ AC_ARG_ENABLE([crash], AM_CONDITIONAL([BUILD_CRASHMOD], [test "$enable_crash" != "no"]) dnl Handle the option to build the documentation +building_docs="no" AC_ARG_ENABLE([docs], AS_HELP_STRING([--enable-docs], [enable building documentation (default on if latex etc. found).]), @@ -154,15 +155,74 @@ AC_CHECK_PROG(have_latex, latex, yes, no) AC_CHECK_PROG(have_dvips, dvips, yes, no) AC_CHECK_PROG(have_ps2pdf, ps2pdf, yes, no) AC_CHECK_PROG(have_latex2html, latex2html, yes, no) -if test "$enable_docs" == "yes"; then - if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesyesyesyes"; then +if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesyesyesyes"; then + if test "$enable_docs" == "yes"; then AC_MSG_ERROR([cannot find all tools for building documentation]) fi + if test "$enable_docs" == "check"; then + AC_MSG_WARN([will not build documentation, cannot find all tools]) + fi +fi +if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"; then + building_docs="yes" +fi +AM_CONDITIONAL([BUILD_DOCS], [test "$building_docs" == "yes"]) + +dnl Handle the option to build the reference documentation +building_refdocs="no" +AC_ARG_ENABLE([refdocs], + AS_HELP_STRING([--enable-refdocs], + [enable building reference documentation (default on if xmlto etc. found and other documentation built).]), + [enable_refdocs=$enableval], + [enable_refdocs="check"]) +if test "$building_docs" == "no" -a "$enable_refdocs" == "yes" ; then + AC_MSG_ERROR([must use --enable-docs with --enable-refdocs]) +fi +AC_CHECK_PROG(have_xmlto, xmlto, yes, no) +if test "x${have_xmlto}" == "xyes"; then +AC_MSG_CHECKING([for xmlto pdf support]) +cat > conftest.$ac_ext << EOF +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" +"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> + <book id="pdffromxml"> + </book> +EOF + xmlto pdf conftest.$ac_ext >& /dev/null + if test $? == 0; then + have_xmlto_pdf="yes" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi fi -AM_CONDITIONAL([BUILD_DOCS], [test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"]) +if test "$enable_refdocs" == "yes"; then + if test "x${have_xmlto}${have_xmlto_pdf}" != "xyesyes"; then + AC_MSG_ERROR([cannot find proper yxmlto for building reference documentation]) + fi +fi +if test "x${have_xmlto}${have_xmlto_pdf}" == "xyesyes" -a "$enable_refdocs" != "no" -a "${building_docs}" == "yes"; then + building_refdocs="yes" +fi +AM_CONDITIONAL([BUILD_REFDOCS], [test "$building_refdocs" == "yes"]) -PKG_CHECK_MODULES([nss],[nss >= 3]) -PKG_CHECK_MODULES([nspr],[nspr >= 4]) +dnl Handle the option to build the server setup. +AC_ARG_ENABLE([server], + AS_HELP_STRING([--enble-server], + [enable building of stap-server/client (default on if nss etc. found).]), + [enable_server=$enableval], + [enable_server="check"]) +PKG_CHECK_MODULES([nss],[nss >= 3], have_nss=yes, have_nss=no) +PKG_CHECK_MODULES([nspr],[nspr >= 4], have_nspr=yes, have_nspr=no) +if test "x${have_nss}${have_nspr}" != "xyesyes"; then + if test "$enable_server" == "yes"; then + AC_MSG_ERROR([cannot find all libraries for stap-server]) + fi + if test "$enable_server" == "check"; then + AC_MSG_WARN([will not build stap-server, cannot find all libraries]) + fi +fi +AM_CONDITIONAL([BUILD_SERVER], [test "x${have_nss}${have_nspr}" == "xyesyes" -a "$enable_server" != "no"]) dnl Handle elfutils. If '--with-elfutils=DIR' wasn't specified, used dnl the system's elfutils. diff --git a/doc/ChangeLog b/doc/ChangeLog index c05a0a0f..29721280 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,14 @@ +2009-01-07 William Cohen <wcohen@elastic.org> + + * S_T_R/Makefile.am: Use BUILD_REFDOCS. + * S_T_R/Makefile.in: Regenerated. + +2009-01-06 Frank Ch. Eigler <fche@elastic.org> + + * S_T_R/Makefile.am: Regenerate docs only as necessary, via + stamp-* files for html/man, and cmp for tapsets.xml. + * S_T_R/Makefile.in: Regenerated. + 2008-12-30 Dave Brolley <brolley@redhat.com> PR9692 diff --git a/doc/Makefile.in b/doc/Makefile.in index 4ab1ee2f..776381d8 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -134,6 +134,7 @@ have_dvips = @have_dvips@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ +have_xmlto = @have_xmlto@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ diff --git a/doc/SystemTap_Tapset_Reference/Makefile.am b/doc/SystemTap_Tapset_Reference/Makefile.am index 71f2cd55..9e7d2069 100644 --- a/doc/SystemTap_Tapset_Reference/Makefile.am +++ b/doc/SystemTap_Tapset_Reference/Makefile.am @@ -18,19 +18,26 @@ noinst_PROGRAMS = docproc SRCTREE=$(abs_top_srcdir)/ DOCPROC=$(abs_builddir)/docproc -if BUILD_DOCS -all: pdfdocs htmldocs mandocs -xmldocs: docproc - SRCTREE=$(SRCTREE) $(DOCPROC) doc $(abs_srcdir)/tapsets.tmpl > tapsets.xml - -htmldocs: xmldocs +if BUILD_REFDOCS +all: tapsets.pdf stamp-htmldocs stamp-mandocs +tapsets.xml: docproc $(shell find $(SRCTREE) -name '*.stp') + SRCTREE=$(SRCTREE) $(DOCPROC) doc $(abs_srcdir)/tapsets.tmpl > tapsets.xml.new + if cmp tapsets.xml.new tapsets.xml >/dev/null ; then \ + echo tapsets.xml unchanged; \ + else \ + mv tapsets.xml.new tapsets.xml; \ + fi + +stamp-htmldocs: tapsets.xml xmlto html -o tapsets tapsets.xml + touch stamp-htmldocs -pdfdocs: xmldocs +tapsets.pdf: tapsets.xml xmlto pdf tapsets.xml -mandocs: xmldocs +stamp-mandocs: tapsets.xml xmlto man -o man5 tapsets.xml + touch stamp-mandocs #FIXME need to figure out where to install things appropriately #installmandocs: mandocs diff --git a/doc/SystemTap_Tapset_Reference/Makefile.in b/doc/SystemTap_Tapset_Reference/Makefile.in index 839c6672..f840d8c5 100644 --- a/doc/SystemTap_Tapset_Reference/Makefile.in +++ b/doc/SystemTap_Tapset_Reference/Makefile.in @@ -137,6 +137,7 @@ have_dvips = @have_dvips@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ +have_xmlto = @have_xmlto@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ @@ -337,7 +338,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@BUILD_DOCS_FALSE@install-data-hook: +@BUILD_REFDOCS_FALSE@install-data-hook: clean: clean-am clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am @@ -413,28 +414,35 @@ uninstall-am: uninstall-am -@BUILD_DOCS_TRUE@all: pdfdocs htmldocs mandocs -@BUILD_DOCS_TRUE@xmldocs: docproc -@BUILD_DOCS_TRUE@ SRCTREE=$(SRCTREE) $(DOCPROC) doc $(abs_srcdir)/tapsets.tmpl > tapsets.xml +@BUILD_REFDOCS_TRUE@all: tapsets.pdf stamp-htmldocs stamp-mandocs +@BUILD_REFDOCS_TRUE@tapsets.xml: docproc $(shell find $(SRCTREE) -name '*.stp') +@BUILD_REFDOCS_TRUE@ SRCTREE=$(SRCTREE) $(DOCPROC) doc $(abs_srcdir)/tapsets.tmpl > tapsets.xml.new +@BUILD_REFDOCS_TRUE@ if cmp tapsets.xml.new tapsets.xml >/dev/null ; then \ +@BUILD_REFDOCS_TRUE@ echo tapsets.xml unchanged; \ +@BUILD_REFDOCS_TRUE@ else \ +@BUILD_REFDOCS_TRUE@ mv tapsets.xml.new tapsets.xml; \ +@BUILD_REFDOCS_TRUE@ fi -@BUILD_DOCS_TRUE@htmldocs: xmldocs -@BUILD_DOCS_TRUE@ xmlto html -o tapsets tapsets.xml +@BUILD_REFDOCS_TRUE@stamp-htmldocs: tapsets.xml +@BUILD_REFDOCS_TRUE@ xmlto html -o tapsets tapsets.xml +@BUILD_REFDOCS_TRUE@ touch stamp-htmldocs -@BUILD_DOCS_TRUE@pdfdocs: xmldocs -@BUILD_DOCS_TRUE@ xmlto pdf tapsets.xml +@BUILD_REFDOCS_TRUE@tapsets.pdf: tapsets.xml +@BUILD_REFDOCS_TRUE@ xmlto pdf tapsets.xml -@BUILD_DOCS_TRUE@mandocs: xmldocs -@BUILD_DOCS_TRUE@ xmlto man -o man5 tapsets.xml +@BUILD_REFDOCS_TRUE@stamp-mandocs: tapsets.xml +@BUILD_REFDOCS_TRUE@ xmlto man -o man5 tapsets.xml +@BUILD_REFDOCS_TRUE@ touch stamp-mandocs #FIXME need to figure out where to install things appropriately #installmandocs: mandocs -@BUILD_DOCS_TRUE@install-data-hook: -@BUILD_DOCS_TRUE@ $(MKDIR_P) $(DOC_INSTALL_DIR) -@BUILD_DOCS_TRUE@ $(INSTALL_DATA) tapsets.pdf $(DOC_INSTALL_DIR) -@BUILD_DOCS_TRUE@ $(MKDIR_P) $(MAN_INSTALL_DIR) -@BUILD_DOCS_TRUE@ $(INSTALL_DATA) man5/* $(MAN_INSTALL_DIR) -@BUILD_DOCS_TRUE@ $(MKDIR_P) $(HTML_INSTALL_DIR) -@BUILD_DOCS_TRUE@ $(INSTALL_DATA) tapsets/* $(HTML_INSTALL_DIR) +@BUILD_REFDOCS_TRUE@install-data-hook: +@BUILD_REFDOCS_TRUE@ $(MKDIR_P) $(DOC_INSTALL_DIR) +@BUILD_REFDOCS_TRUE@ $(INSTALL_DATA) tapsets.pdf $(DOC_INSTALL_DIR) +@BUILD_REFDOCS_TRUE@ $(MKDIR_P) $(MAN_INSTALL_DIR) +@BUILD_REFDOCS_TRUE@ $(INSTALL_DATA) man5/* $(MAN_INSTALL_DIR) +@BUILD_REFDOCS_TRUE@ $(MKDIR_P) $(HTML_INSTALL_DIR) +@BUILD_REFDOCS_TRUE@ $(INSTALL_DATA) tapsets/* $(HTML_INSTALL_DIR) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/runtime/ChangeLog b/runtime/ChangeLog index ca852d53..fad46be1 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2009-01-06 Frank Ch. Eigler <fche@elastic.org> + + PR9699. + * autoconf-task-uid.c: New test. + 2008-12-21 Stan Cox <scox@redhat.com> * sduprobes.h (STAP_PROBE): Put block around probe point. diff --git a/runtime/autoconf-task-uid.c b/runtime/autoconf-task-uid.c new file mode 100644 index 00000000..8e40f831 --- /dev/null +++ b/runtime/autoconf-task-uid.c @@ -0,0 +1,6 @@ +#include <linux/sched.h> + +int bar (struct task_struct *foo) { + return (foo->uid = 0); +} +/* as opposed to linux/cred.h wrappers current_uid() etc. */ diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index c6dfa005..e8e2a047 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,8 @@ +2009-01-06 Frank Ch. Eigler <fche@elastic.org> + + PR9699. + * transport.c (_stp_transport_init): Adapt to task_struct cred switch. + 2008-11-28 Frank Ch. Eigler <fche@elastic.org> PR5947: make code -Wpointer-arith clean diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index 9f7a25f2..f5ee2c36 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -2,7 +2,7 @@ * transport.c - stp transport functions * * Copyright (C) IBM Corporation, 2005 - * Copyright (C) Red Hat Inc, 2005-2008 + * Copyright (C) Red Hat Inc, 2005-2009 * Copyright (C) Intel Corporation, 2006 * * This file is part of systemtap, and is free software. You can @@ -211,8 +211,13 @@ int _stp_transport_init(void) dbug_trans(1, "transport_init\n"); _stp_init_pid = current->pid; +#ifdef STAPCONF_TASK_UID _stp_uid = current->uid; _stp_gid = current->gid; +#else + _stp_uid = current_uid(); + _stp_gid = current_gid(); +#endif #ifdef RELAY_GUEST /* Guest scripts use relay only for reporting warnings and errors */ @@ -126,7 +126,7 @@ embedded C. .TP .B \-P Prologue-searching mode. Activate heuristics to work around incorrect -debbugging information for $target variables. +debugging information for $target variables. .TP .B \-u Unoptimized mode. Disable unused code elision during elaboration. diff --git a/systemtap.spec b/systemtap.spec index 4ba1895d..b7dc6b69 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -243,6 +243,8 @@ exit 0 %{_bindir}/stap-client %{_bindir}/stap-find-servers %{_bindir}/stap-find-or-start-server +%{_bindir}/stap-add-server-cert +%{_bindir}/stap-client-connect %{_mandir}/man8/stap-server.8* %files server @@ -252,6 +254,7 @@ exit 0 %{_bindir}/stap-start-server %{_bindir}/stap-stop-server %{_bindir}/stap-gen-server-cert +%{_bindir}/stap-server-connect %{_mandir}/man8/stap-server.8* %changelog diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 626ad67b..da184191 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,8 @@ +2009-01-06 Frank Ch. Eigler <fche@elastic.org> + + PR 9699. + * context.stp, task.stp: Adapt to STAPCONF_TASK_UID. + 2008-12-09 Frank Ch. Eigler <fche@elastic.org> PR 6961. diff --git a/tapset/context.stp b/tapset/context.stp index c737edd0..7fd961c8 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -1,5 +1,5 @@ // context tapset -// Copyright (C) 2005, 2006, 2007 Red Hat Inc. +// Copyright (C) 2005-2009 Red Hat Inc. // Copyright (C) 2006 Intel Corporation. // // This file is part of systemtap, and is free software. You can @@ -76,7 +76,11 @@ function pexecname:string () %{ /* pure */ * Return the gid of the current process. */ function gid:long () %{ /* pure */ +#ifdef STAPCONF_TASK_UID THIS->__retvalue = current->gid; +#else + THIS->__retvalue = current_gid(); +#endif %} /** @@ -85,7 +89,11 @@ function gid:long () %{ /* pure */ * Return the effective gid of the current process. */ function egid:long () %{ /* pure */ +#ifdef STAPCONF_TASK_UID THIS->__retvalue = current->egid; +#else + THIS->__retvalue = current_egid(); +#endif %} /** @@ -94,7 +102,11 @@ function egid:long () %{ /* pure */ * Return the uid of the current process. */ function uid:long () %{ /* pure */ +#ifdef STAPCONF_TASK_UID THIS->__retvalue = current->uid; +#else + THIS->__retvalue = current_uid(); +#endif %} /** @@ -103,7 +115,11 @@ function uid:long () %{ /* pure */ * Return the effective uid of the current process. */ function euid:long () %{ /* pure */ +#ifdef STAPCONF_TASK_UID THIS->__retvalue = current->euid; +#else + THIS->__retvalue = current_euid(); +#endif %} // cpuid() is not documented diff --git a/tapset/task.stp b/tapset/task.stp index 9215e83f..684cef93 100644 --- a/tapset/task.stp +++ b/tapset/task.stp @@ -12,6 +12,9 @@ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25) #include <linux/fdtable.h> #endif +#ifndef STAPCONF_TASK_UID +#include <linux/cred.h> +#endif %} // Return the task_struct representing the current process @@ -74,7 +77,18 @@ function task_tid:long (task:long) %{ /* pure */ // Return the group id of the given task function task_gid:long (task:long) %{ /* pure */ struct task_struct *t = (struct task_struct *)(long)THIS->task; +#ifdef STAPCONF_TASK_UID THIS->__retvalue = kread(&(t->gid)); +#else + /* XXX: We can't easily kread this rcu-protected field. */ + /* XXX: no task_gid() in 2.6.28 */ + struct cred *cred; + rcu_read_lock(); + cred = get_task_cred (t); + rcu_read_unlock(); + THIS->__retvalue = cred->gid; +#endif + CATCH_DEREF_FAULT(); %} @@ -82,7 +96,17 @@ function task_gid:long (task:long) %{ /* pure */ // Return the effective group id of the given task function task_egid:long (task:long) %{ /* pure */ struct task_struct *t = (struct task_struct *)(long)THIS->task; +#ifdef STAPCONF_TASK_UID THIS->__retvalue = kread(&(t->egid)); +#else + /* XXX: We can't easily kread this rcu-protected field. */ + /* XXX: no task_egid() in 2.6.28 */ + struct cred *cred; + rcu_read_lock(); + cred = get_task_cred (t); + rcu_read_unlock(); + THIS->__retvalue = cred->egid; +#endif CATCH_DEREF_FAULT(); %} @@ -90,7 +114,13 @@ function task_egid:long (task:long) %{ /* pure */ // Return the user id of the given task function task_uid:long (task:long) %{ /* pure */ struct task_struct *t = (struct task_struct *)(long)THIS->task; +#ifdef STAPCONF_TASK_UID THIS->__retvalue = kread(&(t->uid)); +#else + /* XXX: We can't easily kread this rcu-protected field. */ + THIS->__retvalue = task_uid (t); +#endif + CATCH_DEREF_FAULT(); %} @@ -98,7 +128,12 @@ function task_uid:long (task:long) %{ /* pure */ // Return the effective user id of the given task function task_euid:long (task:long) %{ /* pure */ struct task_struct *t = (struct task_struct *)(long)THIS->task; +#ifdef STAPCONF_TASK_UID THIS->__retvalue = kread(&(t->euid)); +#else + /* XXX: We can't easily kread this rcu-protected field. */ + THIS->__retvalue = task_euid (t); +#endif CATCH_DEREF_FAULT(); %} diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 293c007f..27cd27b5 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -2,6 +2,11 @@ * lib/systemtap.exp: Remove ssl_server_path and ssl_client_path. +2009-01-06 Frank Ch. Eigler <fche@elastic.org> + + PR 9699: + * systemtap.context/backtrace.tcl: Correct tcl syntax in fail message. + 2008-12-24 Dave Brolley <brolley@redhat.com> * lib/systemtap.exp: Rename client_path to net_path. diff --git a/testsuite/systemtap.context/backtrace.tcl b/testsuite/systemtap.context/backtrace.tcl index aaec4cb8..ca60c369 100644 --- a/testsuite/systemtap.context/backtrace.tcl +++ b/testsuite/systemtap.context/backtrace.tcl @@ -128,7 +128,7 @@ expect { } exp_continue } - eof {fail "backtrace of yyy_func[2-4]: unexpected EOF" } + eof {fail "backtrace of yyy_func*: unexpected EOF" } } exec kill -INT -[exp_pid] if {$m1 == 3} { |