Index: head/sysutils/heartbeat/Makefile =================================================================== --- head/sysutils/heartbeat/Makefile (revision 282089) +++ head/sysutils/heartbeat/Makefile (revision 282090) @@ -1,215 +1,215 @@ # New ports collection makefile for: heartbeat # Date created: 18 March 2005 # Whom: Scott Kleihege # # $FreeBSD$ # PORTNAME= heartbeat PORTVERSION= 2.1.4 -PORTREVISION= 14 +PORTREVISION= 15 CATEGORIES= sysutils #MASTER_SITES= http://hg.linux-ha.org/lha-2.1/archive/STABLE-2.1.4.tar.bz2 MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= kuriyama/heartbeat DISTNAME= STABLE-${PORTVERSION} DIST_SUBDIR= heartbeat MAINTAINER= ports@encarnate.com COMMENT= Subsystem for High-Availability Clustering LIB_DEPENDS= gnutls:${PORTSDIR}/security/gnutls \ net-1.1.5:${PORTSDIR}/net/libnet-devel \ uuid:${PORTSDIR}/misc/e2fsprogs-libuuid \ xml2:${PORTSDIR}/textproc/libxml2 PATCH_DEPENDS= libtool:${PORTSDIR}/devel/libtool USE_AUTOTOOLS= autoconf autoheader automake aclocal libtool libltdl AUTOMAKE_ARGS+= --add-missing --include-deps --copy ACLOCAL_ARGS+= -I ${LOCALBASE}/share/aclocal USE_BZIP2= yes USE_GETTEXT= yes USE_GMAKE= yes USE_GNOME= glib20 USE_LDCONFIG= yes USE_PYTHON= yes GNU_CONFIGURE= yes CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -I${LOCALBASE}/include/libnet115" \ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -L${LOCALBASE}/lib/libnet115" CONFIGURE_ARGS= --prefix=${PREFIX} \ --localstatedir=/var \ --with-miBsdir=${PREFIX}/snmp/mibs \ --with-initdir=${PREFIX}/etc/rc.d \ --with-group-id=275 \ --with-ccmuser-id=275 \ --with-ocf-root=${PREFIX}/etc/ocf \ --disable-rpath \ --disable-dopd \ --disable-fatal-warnings SUB_FILES= pkg-install pkg-message SUB_LIST= BATCH=${BATCH} PKGDEINSTALL= ${PKGINSTALL} MAKE_JOBS_SAFE= yes MAN1= cl_status.1 ha_logger.1 hb_addnode.1 hb_delnode.1 hb_standby.1 hb_takeover.1 MAN8= apphbd.8 cibadmin.8 crm_resource.8 ha_logd.8 heartbeat.8 \ meatclient.8 stonith.8 OPTIONS= MGMT "Enable X11 Management Utilities" Off \ LDIRECTORD "Enable Linux Director Daemon" Off \ APCSNMP "Enable APC SNMP Stonith Device" Off \ DRAC3 "Enable Dell DRACIII Stonith Device" Off .include .if !defined(BATCH) BATCH=NO .endif .if defined(WITH_MGMT) BUILD_DEPENDS+= swig:${PORTSDIR}/devel/swig13 RUN_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pygtk-2.0.pc:${PORTSDIR}/x11-toolkits/py-gtk2 PLIST_SUB+= MGMT="" .else CONFIGURE_ARGS+= --disable-mgmt PLIST_SUB+= MGMT="@comment " .endif .if defined(WITH_LDIRECTORD) RUN_DEPENDS+= ${SITE_PERL}/LWP/UserAgent.pm:${PORTSDIR}/www/p5-libwww \ ${SITE_PERL}/Mail/Send.pm:${PORTSDIR}/mail/p5-Mail-Tools #ipvsadm:${PORTSDIR}/net/ipvs USE_PERL5_RUN= yes PLIST_SUB+= LDIRECTORD="" MAN8+= ldirectord.8 .else CONFIGURE_ARGS+= --disable-ldirectord PLIST_SUB+= LDIRECTORD="@comment " .endif .if defined(WITH_APCSNMP) || exists (${PREFIX}/lib/libnetsnmp.so) LIB_DEPENDS+= netsnmp:${PORTSDIR}/net-mgmt/net-snmp PLIST_SUB+= APCSNMP="" .else PLIST_SUB+= APCSNMP="@comment " .endif .if defined(WITH_DRAC3) || exists (${PREFIX}/lib/libcurl.so) USE_CURL= yes LIB_DEPENDS+= curl.6:${PORTSDIR}/ftp/curl PLIST_SUB+= DRAC3="" .else PLIST_SUB+= DRAC3="@comment " .endif .if defined(NOPORTDOCS) PLIST_SUB+= NOPORTDOCS="@comment " .else PLIST_SUB+= NOPORTDOCS="" .endif # BladeHPI Stonith Automagic Building .if exists (${PREFIX}/include/openhpi/SaHpi.h) PLIST_SUB+= HPI="" .else PLIST_SUB+= HPI="@comment " .endif # IPMI Lan Stonight Automagic Building .if exists (${PREFIX}/include/ipmilan.h) PLIST_SUB+= IPMI="" .else PLIST_SUB+= IPMI="@comment " .endif # VACM Stonith Automagic Building .if exists (${PREFIX}/include/vacmclient_api.h) PLIST_SUB+= VACM="" .else PLIST_SUB+= VACM="@comment " .endif pre-patch: @${MV} ${WRKDIR}/Heartbeat-STABLE-2-1-${DISTNAME} ${WRKSRC} @${CP} -f ${FILESDIR}/heartbeat.in ${WRKSRC}/heartbeat/init.d/ post-patch: @${LN} -s ${WRKSRC}/include/config.h ${WRKSRC}/config.h @${LN} -s $AUTOCONF ${WRKSRC}/autoconf @${LN} -s $AUTOHEADER ${WRKSRC}/autoheader @${LN} -s $AUTOMAKE ${WRKSRC}/automake @${LN} -s $LIBTOOL ${WRKSRC}/libtool @cd ${WRKSRC} && \ ${LIBTOOLIZE} --automake --ltdl --force --copy && \ ${TAR} -cf libltdl.tar libltdl && \ ${RM} -rf libltdl .if defined(NOPORTDOCS) @${REINPLACE_CMD} -e 's| doc | |' \ ${WRKSRC}/Makefile.am .else @${REINPLACE_CMD} -e 's|^\(docdir.*doc/\).*|\1${PORTNAME}|' \ ${WRKSRC}/configure.in \ ${WRKSRC}/doc/Makefile.am .endif pre-install: @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: .if !defined(NOPORTDOCS) # Install sample configuration @if [ ! -f ${PREFIX}/etc/ha.d/authkeys ]; then \ ${CP} -p ${DOCSDIR}/authkeys ${PREFIX}/etc/ha.d/authkeys ; \ fi ${CP} -p ${DOCSDIR}/authkeys ${PREFIX}/etc/ha.d/authkeys.sample ${CHMOD} 600 ${PREFIX}/etc/ha.d/authkeys* @if [ ! -f ${PREFIX}/etc/ha.d/ha.cf ]; then \ ${CP} -p ${DOCSDIR}/ha.cf ${PREFIX}/etc/ha.d/ha.cf ; \ fi ${CP} -p ${DOCSDIR}/ha.cf ${PREFIX}/etc/ha.d/ha.cf.sample @if [ ! -f ${PREFIX}/etc/ha.d/logd.cf ]; then \ ${CP} -p ${DOCSDIR}/logd.cf ${PREFIX}/etc/ha.d/logd.cf ; \ fi ${CP} -p ${DOCSDIR}/logd.cf ${PREFIX}/etc/ha.d/logd.cf.sample .endif .if defined(WITH_LDIRECTORD) @if [ ! -f ${PREFIX}/etc/ha.d/ldirectord.cf ]; then \ ${CP} -p ${WRKSRC}/ldirectord/ldirectord.cf ${PREFIX}/etc/ha.d/ldirectord.cf ; \ ${CP} -p ${WRKSRC}/ldirectord/ldirectord.cf ${PREFIX}/etc/ha.d/ldirectord.cf.sample ; \ fi .endif # Some subdirs treat man as documentation, therefor we have to install # those man pages manually if NOPORTDOCS is defined. .if defined(NOPORTDOCS) # Some subdirs treat man as documentation, therefor we have to install # those man pages manually if NOPORTDOCS is defined. .for f in ${MAN1} ${INSTALL_MAN} ${WRKSRC}/doc/${f} ${MANPREFIX}/man/man1 .endfor .for f in apphbd.8 cibadmin.8 crm_resource.8 ha_logd.8 heartbeat.8 ${INSTALL_MAN} ${WRKSRC}/doc/${f} ${MANPREFIX}/man/man8 .endfor .endif @${CAT} ${PKGMESSAGE} post-deinstall: @${SH} ${PKGINSTALL} ${PKGNAME} DEINSTALL .include Property changes on: head/sysutils/heartbeat/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.39 \ No newline at end of property +1.40 \ No newline at end of property Index: head/sysutils/heartbeat/files/patch-configure.in =================================================================== --- head/sysutils/heartbeat/files/patch-configure.in (revision 282089) +++ head/sysutils/heartbeat/files/patch-configure.in (revision 282090) @@ -1,88 +1,105 @@ --- configure.in.orig 2008-08-18 07:32:19.000000000 -0500 -+++ configure.in 2008-10-11 22:56:48.000000000 -0500 ++++ configure.in 2011-09-07 16:36:38.000000000 -0500 @@ -65,6 +65,13 @@ pf_argv_set="" case "$host_os" in +*freebsd*) + LIBS="-L/usr/local/lib" + CPPFLAGS="$CPPFLAGS -I/usr/local/include" + INIT_EXT="" + REBOOT_OPTIONS="-d" + POWEROFF_OPTIONS="-p" + ;; *bsd*) LIBS="-L/usr/local/lib" CPPFLAGS="$CPPFLAGS -I/usr/local/include" INIT_EXT=".sh" @@ -224,7 +231,7 @@ oldincludedir=`var "$oldincludedir" "$exec_prefix/include"` infodir=`var "$infodir" "$prefix/info"` mandir=`var "$mandir" "$exec_prefix/man"` -docdir=${datadir}/doc/${HB_PKG}-${VERSION} +docdir=${datadir}/doc/heartbeat libdir=`var "$libdir" "$exec_prefix/lib"` libexecdir=`var "$libexecdir" "$exec_prefix/libexec"` noarchlibdir=`var "$noarchlibdir" "$prefix/lib"` @@ -237,6 +244,7 @@ dnl Always tries to set the compiler to ANSI C via options (AM) dnl Can force other with environment variable "CC". AC_PROG_CC +AM_PROG_CC_C_O AC_PROG_CC_STDC dnl ************************************************************************ @@ -542,7 +550,7 @@ AC_PATH_PROGS(MAILCMD, mail, mailx) AC_SUBST(MAILCMD) AC_DEFINE_UNQUOTED(IFCONFIG, "$IFCONFIG", path to the ifconfig command) -AC_PATH_PROGS(LIBNETCONFIG, libnet-config) +AC_PATH_PROGS(LIBNETCONFIG, libnet115-config) AC_PATH_PROGS(GETENT, getent) AC_PATH_PROGS(IP2UTIL, ip, /sbin/ip) AC_PATH_PROGS(XML2CONFIG, xml2-config) @@ -725,13 +733,13 @@ AC_MSG_RESULT(using old version of API) dnl The old version of the API REQUIRES $LIBNETCONFIG dnl so we can only deal with new API unless we have it. - AC_CHECK_LIB(net, libnet_get_hwaddr, [], + AC_CHECK_LIB(net-1, libnet_get_hwaddr, [], [FatalMissingThing "libnet" "You need libnet to continue." \ "You can get libnet from http://www.packetfactory.net/libnet" \ "Note that some RPMs split libnet up into libnet and libnet-devel." \ "In this case you have to install libnet-devel"]) LIBNETDEFINES="" - LIBNETLIBS=" -lnet" + LIBNETLIBS=" -lnet-1" if test "$ac_cv_lib_nsl_t_open" = yes; then LIBNETLIBS="-lnsl $LIBNETLIBS" fi @@ -739,7 +747,7 @@ LIBNETLIBS="-lsocket $LIBNETLIBS" fi - libnet=net + libnet=net-1 else LIBNETDEFINES="`$LIBNETCONFIG --defines` `$LIBNETCONFIG --cflags`"; LIBNETLIBS="`$LIBNETCONFIG --libs`"; -@@ -2393,13 +2401,13 @@ +@@ -1718,6 +1726,7 @@ + AC_CHECK_SIZEOF(int) + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(long long) ++AC_CHECK_SIZEOF(clock_t, [], [#include ]) + + AC_ARG_ENABLE([all], + [ --enable-all Activate ALL features +@@ -2381,7 +2390,7 @@ + + + AC_MSG_CHECKING(if clock_t is long enough) +-if test $ac_cv_sizeof_long -ge 8; then ++if test $ac_cv_sizeof_clock_t -ge 8; then + AC_MSG_RESULT(yes) + AC_DEFINE(CLOCK_T_IS_LONG_ENOUGH, 1, [Set if CLOCK_T is adequate by itself for the "indefinite future" (>= 100 years)]) + else +@@ -2393,13 +2402,13 @@ dnl Note: reduce LIBS; in particular, ltdl can cause confusion. dnl Possibly better: move 'LIBS="$LIBS -lltdl"' from above to beyond here. dnl -AC_MSG_CHECKING(for getpid() consistency in multi-process/threads program) -ac_save_LIBS=$LIBS -LIBS="-lpthread" -AC_TRY_RUN(`cat $srcdir/config/pidtest.c`, -AC_MSG_RESULT(ok), -[AC_MSG_RESULT(fail); AC_DEFINE(GETPID_INCONSISTENT, 1 , [pid inconsistent])],) -LIBS=$ac_save_LIBS +dnl AC_MSG_CHECKING(for getpid() consistency in multi-process/threads program) +dnl ac_save_LIBS=$LIBS +dnl LIBS="-lpthread" +dnl AC_TRY_RUN(`cat $srcdir/config/pidtest.c`, +dnl AC_MSG_RESULT(ok), +dnl [AC_MSG_RESULT(fail); AC_DEFINE(GETPID_INCONSISTENT, 1 , [pid inconsistent])],) +dnl LIBS=$ac_save_LIBS dnl check byte order AC_MSG_CHECKING(for byteorder) Property changes on: head/sysutils/heartbeat/files/patch-configure.in ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/heartbeat/files/patch-include-clplumbing-longclock.h =================================================================== --- head/sysutils/heartbeat/files/patch-include-clplumbing-longclock.h (nonexistent) +++ head/sysutils/heartbeat/files/patch-include-clplumbing-longclock.h (revision 282090) @@ -0,0 +1,20 @@ +--- include/clplumbing/longclock.h.orig 2008-08-18 07:32:19.000000000 -0500 ++++ include/clplumbing/longclock.h 2011-09-07 16:43:50.000000000 -0500 +@@ -37,7 +37,7 @@ + * + * The functions provided here are: + * +- * unsigned long cl_times(void); ++ * clock_t cl_times(void); + * A rational wrapper for the times(2) call + * for those cases where only the return value + * is wanted. +@@ -79,7 +79,7 @@ + * + * extern const longclock_t zero_longclock; + */ +-extern unsigned long cl_times(void); ++extern clock_t cl_times(void); + + #ifdef CLOCK_T_IS_LONG_ENOUGH + # ifndef HAVE_LONGCLOCK_ARITHMETIC Property changes on: head/sysutils/heartbeat/files/patch-include-clplumbing-longclock.h ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/sysutils/heartbeat/files/patch-lib-clplumbping-longclock.c =================================================================== --- head/sysutils/heartbeat/files/patch-lib-clplumbping-longclock.c (nonexistent) +++ head/sysutils/heartbeat/files/patch-lib-clplumbping-longclock.c (revision 282090) @@ -0,0 +1,79 @@ +--- lib/clplumbing/longclock.c.orig 2008-08-18 07:32:19.000000000 -0500 ++++ lib/clplumbing/longclock.c 2011-09-07 17:52:32.000000000 -0500 +@@ -68,7 +68,7 @@ + # define TIMES_PARAM &dummy_longclock_tms_struct + #endif + +-unsigned long ++clock_t + cl_times(void) /* Make times(2) behave rationally on Linux */ + { + clock_t ret; +@@ -108,7 +108,7 @@ + } + errno = save_errno; + #endif /* DISABLE_TIMES_KLUDGE */ +- return (unsigned long)ret; ++ return ret; + } + + #ifdef CLOCK_T_IS_LONG_ENOUGH +@@ -124,8 +124,9 @@ + + #define BITSPERBYTE 8 + #define WRAPSHIFT (BITSPERBYTE*sizeof(clock_t)) +-#define MAXIMUMULONG ((unsigned long)~(0UL)) +-#define MINJUMP ((MAXIMUMULONG/100UL)*99UL) ++#define WRAPAMOUNT (((longclock_t) 1) << WRAPSHIFT) ++#define MAXIMUMCLOCK (WRAPAMOUNT - 1) ++#define MINJUMP ((MAXIMUMCLOCK/100UL)*99UL) + + longclock_t + time_longclock(void) +@@ -136,20 +137,20 @@ + * because then this can recurse infinitely; that is why the + * cl_log call is where it is; found by Simon Graham. */ + static gboolean calledbefore = FALSE; +- static unsigned long lasttimes = 0L; +- static unsigned long wrapcount = 0L; ++ static longclock_t lasttimes = 0L; ++ static longclock_t wrapcount = 0L; + static unsigned long callcount = 0L; +- static longclock_t lc_wrapcount = 0L; +- unsigned long timesval; ++ ++ longclock_t timesval; + + ++callcount; + +- timesval = (unsigned long) cl_times(); ++ timesval = ((longclock_t) cl_times()) & MAXIMUMCLOCK; /* this AND prevents sign extension */ + + if (calledbefore && timesval < lasttimes) { +- clock_t jumpbackby = lasttimes - timesval; ++ longclock_t jumpbackby = lasttimes - timesval; + +- if (jumpbackby < (clock_t)MINJUMP) { ++ if (jumpbackby < MINJUMP) { + /* Kernel weirdness */ + cl_log(LOG_CRIT + , "%s: clock_t from times(2) appears to" +@@ -172,8 +173,7 @@ + to double update of wrapcount! */ + + lasttimes = timesval; +- ++wrapcount; +- lc_wrapcount = ((longclock_t)wrapcount) << WRAPSHIFT; ++ wrapcount += WRAPAMOUNT; + + cl_log(LOG_INFO + , "%s: clock_t wrapped around (uptime)." +@@ -184,7 +184,7 @@ + lasttimes = timesval; + calledbefore = TRUE; + } +- return (lc_wrapcount | (longclock_t)timesval); ++ return (wrapcount | timesval); + } + #endif /* ! CLOCK_T_IS_LONG_ENOUGH */ + Property changes on: head/sysutils/heartbeat/files/patch-lib-clplumbping-longclock.c ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property