diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..19dd97db --- /dev/null +++ b/.travis.yml @@ -0,0 +1,46 @@ +# container-based environment blockers: +# - cluster-glue-dev +# https://github.com/travis-ci/apt-package-whitelist/issues/2936 +# - libsystemd-daemon-dev (libsystemd-dev) +# https://github.com/travis-ci/apt-package-whitelist/issues/2449 +# - no equivalent of "libcrmcluster4-dev" (trusty) for precise, +# but can be worked around with something like (or local dir + CPPFLAGS): +# GHREPO=ClusterLabs/pacemaker INCLFILE=crm/services.h curl --create-dirs \ +# -o "/usr/include/pacemaker/${INCLFILE}" \ +# "https://raw.githubusercontent.com/${GHREPO}/master/include/${INCLFILE}" +sudo: required +dist: trusty + +language: c +compiler: gcc + +env: + - GLUE=1 + - GLUE=0 + +before_install: + - sudo apt-get update -qq + - sudo apt-get install -qq -y libglib2.0-dev libcrmcluster4-dev + - test "${GLUE}" = 0 + || sudo apt-get install -qq -y cluster-glue-dev + - test "${GLUE}" != 0 + || sudo apt-get install -qq -y libqb-dev libsystemd-daemon-dev + +before_script: + - ./autogen.sh + && ./configure --with-glue=$(test "${GLUE}" = 0 && echo no || echo yes) + - ulimit -S -c unlimited # ensure cores are generated (~after_failure) + +script: VERBOSE=1 make check + +after_failure: + - sudo apt-get install -qq gdb libc6-dbg + # examine core files + - find -name 'core*' -print0 + | xargs -0I@ -- sh -xc + 'file "@"; + gdb -se $(file "@" | sed -n "s|.* core file .* from \x27\([^\x27 ]*\).*|\1|p") + -c "@" -batch -ex "t a a bt f" -ex "set pagination 0"' + +notifications: + irc: "irc.freenode.net#clusterlabs-dev" diff --git a/Makefile.am b/Makefile.am index e25b9f5f..9df6320b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,8 +45,6 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure depcomp \ dist_doc_DATA = AUTHORS README COPYING README.upgrade-from-v0.1 -notrans_dist_man8_MANS = docs/boothd.8 docs/booth-keygen.8 - boothconfdir = ${BOOTHSYSCONFDIR} boothconf_DATA = conf/booth.conf.example diff --git a/configure.ac b/configure.ac index 441a3027..30dbbff6 100644 --- a/configure.ac +++ b/configure.ac @@ -107,6 +107,11 @@ AC_CHECK_HEADERS(mhash.h) AC_CHECK_HEADER([zlib.h], [AC_SUBST(ZLIB_LIBS, ["-lz"])], [AC_MSG_ERROR([zlib development files required])]) +saved_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${CPPFLAGS} ${GLIB_CFLAGS}" +AC_CHECK_HEADER([pacemaker/crm/services.h], [], + [AC_MSG_ERROR([pacemaker/crm/services.h header required])]) +CPPFLAGS="${saved_CPPFLAGS}" # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -278,17 +283,19 @@ AM_CONDITIONAL([RANGE2RANDOM_GLIB], [test "x$range2random_provider" = "xglib"]) # figure out nametag/distinguished-role provider nametag_provider="" if test "x$nametag_provider" = "x" && test "x$with_glue" != "xno"; then - AC_CHECK_LIB([plumbgpl], [set_proc_title], [nametag_provider="libplumbgpl"]) + AC_CHECK_LIB([plumbgpl], [set_proc_title], [nametag_provider="libplumbgpl"]) fi if test "x$nametag_provider" = "x" && test "x$with_glue" = "xno"; then - AC_CHECK_LIB([systemd], [sd_notify], [nametag_provider="libsystemd"]) + AC_SEARCH_LIBS([sd_notify], [systemd systemd-daemon], [nametag_provider="libsystemd"]) fi NOTIFY_ACCESS_SWITCH='# ' case "$nametag_provider" in libplumbgpl) ;; libsystemd) - PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd]) + PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd],, [ + PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd-daemon]) + ]) AC_DEFINE([NAMETAG_LIBSYSTEMD], [], [use libsystemd as a nametag provider]) NOTIFY_ACCESS_SWITCH= ;;