FreeBSD Bugzilla – Attachment 169619 Details for
Bug 209006
[maintainer] net/pacemaker: multiple changes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
pacemaker-1.1.14_1.diff
pacemaker-1.1.14_1.diff (text/plain), 19.91 KB, created by
David Shane Holden
on 2016-04-24 01:09:26 UTC
(
hide
)
Description:
pacemaker-1.1.14_1.diff
Filename:
MIME Type:
Creator:
David Shane Holden
Created:
2016-04-24 01:09:26 UTC
Size:
19.91 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 413873) >+++ Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= pacemaker > PORTVERSION= 1.1.14 >+PORTREVISION= 1 > CATEGORIES= net > > MAINTAINER= dpejesh@yahoo.com >@@ -10,8 +11,6 @@ > > LICENSE= GPLv2 > >-BROKEN_powerpc64= Does not build >- > BUILD_DEPENDS= bash:shells/bash \ > corosync:net/corosync > LIB_DEPENDS= libgnutls.so:security/gnutls \ >@@ -21,8 +20,11 @@ > libxml2.so:textproc/libxml2 \ > libxslt.so:textproc/libxslt > RUN_DEPENDS= bash:shells/bash \ >- corosync:net/corosync >+ corosync:net/corosync \ >+ ocf-tester:net-mgmt/resource-agents > >+BROKEN_powerpc64= Does not build >+ > CONFLICTS= heartbeat-[0-9]* > > USERS= hacluster >@@ -77,8 +79,4 @@ > post-patch: > @${REINPLACE_CMD} ${REPLACE_ARGS} ${WRKSRC}/configure.ac > >-post-install: >- ${RM} ${STAGEDIR}${PREFIX}/etc/rc.d/pacemaker >- ${RM} ${STAGEDIR}${PREFIX}/etc/rc.d/pacemaker_remote >- > .include <bsd.port.mk> >Index: files/patch-extra_resources_SysInfo >=================================================================== >--- files/patch-extra_resources_SysInfo (nonexistent) >+++ files/patch-extra_resources_SysInfo (working copy) >@@ -0,0 +1,44 @@ >+--- extra/resources/SysInfo.orig 2016-04-18 16:07:35 UTC >++++ extra/resources/SysInfo >+@@ -164,6 +164,20 @@ SysInfoStats() { >+ cpu_type=`system_profiler SPHardwareDataType | awk -F': ' '/^CPU Type/ {print $2; exit}'` >+ cpu_speed=`system_profiler SPHardwareDataType | awk -F': ' '/^CPU Speed/ {print $2; exit}'` >+ cpu_cores=`system_profiler SPHardwareDataType | awk -F': ' '/^Number Of/ {print $2; exit}'` >++ cpu_load=`uptime | awk '{ print $10 }'` >++ ;; >++ "FreeBSD") >++ cpu_type=`sysctl -in hw.model` >++ cpu_speed=`sysctl -in dev.cpu.0.freq` >++ cpu_cores=`sysctl -in hw.ncpu` >++ cpu_load=`sysctl -in vm.loadavg | awk '{ print $4 }'` >++ >++ free_pages=`sysctl -in vm.stats.vm.v_free_count` >++ page_count=`sysctl -in vm.stats.vm.v_page_count` >++ page_size=`sysctl -in vm.stats.vm.v_page_size` >++ >++ mem=`expr $free_pages \* $page_size / 1024 / 1024`M >++ mem_total=`expr $page_count \* $page_size / 1024 / 1024`M >+ ;; >+ "Linux") >+ if [ -f /proc/cpuinfo ]; then >+@@ -171,6 +185,7 @@ SysInfoStats() { >+ cpu_speed=`awk -F': ' '/bogomips/ {print $2; exit}' /proc/cpuinfo` >+ cpu_cores=`grep "^processor" /proc/cpuinfo | wc -l` >+ fi >++ cpu_load=`uptime | awk '{ print $10 }'` >+ >+ if [ -f /proc/meminfo ]; then >+ # meminfo results are in kB >+@@ -199,9 +214,9 @@ SysInfoStats() { >+ UpdateStat cpu_cores "$cpu_cores" >+ fi >+ >+- loads=`uptime` >+- load15=`echo ${loads} | awk '{print $10}'` >+- UpdateStat cpu_load $load15 >++ if [ x != x"$cpu_load" ]; then >++ UpdateStat cpu_load "$cpu_load" >++ fi >+ >+ if [ ! -z "$mem" ]; then >+ # Massage the memory values > >Property changes on: files/patch-extra_resources_SysInfo >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-extra_resources_ping >=================================================================== >--- files/patch-extra_resources_ping (revision 413873) >+++ files/patch-extra_resources_ping (working copy) >@@ -1,4 +1,4 @@ >---- extra/resources/ping.orig 2016-03-21 16:27:02 UTC >+--- extra/resources/ping.orig 2016-04-18 16:07:35 UTC > +++ extra/resources/ping > @@ -262,6 +262,7 @@ ping_check() { > case `uname` in >Index: files/patch-lib-common-utils.c >=================================================================== >--- files/patch-lib-common-utils.c (revision 413873) >+++ files/patch-lib-common-utils.c (nonexistent) >@@ -1,12 +0,0 @@ >---- lib/common/utils.c.orig 2016-01-14 21:43:08 UTC >-+++ lib/common/utils.c >-@@ -2270,7 +2270,8 @@ find_library_function(void **handle, con >- } >- >- a_function = dlsym(*handle, fn); >-- if ((error = dlerror()) != NULL) { >-+ if (a_function == NULL) { >-+ error = dlerror(); >- crm_err("%sCould not find %s in %s: %s", fatal ? "Fatal: " : "", fn, lib, error); >- if (fatal) { >- crm_exit(DAEMON_RESPAWN_STOP); > >Property changes on: files/patch-lib-common-utils.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-lib-services-services_linux.c >=================================================================== >--- files/patch-lib-services-services_linux.c (revision 413873) >+++ files/patch-lib-services-services_linux.c (nonexistent) >@@ -1,180 +0,0 @@ >---- lib/services/services_linux.c.orig 2016-01-14 21:43:08 UTC >-+++ lib/services/services_linux.c >-@@ -457,13 +457,19 @@ action_launch_child(svc_action_t *op) >- _exit(op->rc); >- } >- >-+#ifndef HAVE_SYS_SIGNALFD_H >-+static int sigchld_pipe[2]; >-+ >- static void >--action_synced_wait(svc_action_t * op, sigset_t mask) >-+sigchld_handler() >- { >-+ write(sigchld_pipe[1], "", 1); >-+} >-+#endif >- >--#ifndef HAVE_SYS_SIGNALFD_H >-- CRM_ASSERT(FALSE); >--#else >-+static void >-+action_synced_wait(svc_action_t * op, sigset_t *mask) >-+{ >- int status = 0; >- int timeout = op->timeout; >- int sfd = -1; >-@@ -471,10 +477,14 @@ action_synced_wait(svc_action_t * op, si >- struct pollfd fds[3]; >- int wait_rc = 0; >- >-- sfd = signalfd(-1, &mask, SFD_NONBLOCK); >-+#ifdef HAVE_SYS_SIGNALFD_H >-+ sfd = signalfd(-1, mask, SFD_NONBLOCK); >- if (sfd < 0) { >- crm_perror(LOG_ERR, "signalfd() failed"); >- } >-+#else >-+ sfd = sigchld_pipe[0]; >-+#endif >- >- fds[0].fd = op->opaque->stdout_fd; >- fds[0].events = POLLIN; >-@@ -503,6 +513,7 @@ action_synced_wait(svc_action_t * op, si >- } >- >- if (fds[2].revents & POLLIN) { >-+#ifdef HAVE_SYS_SIGNALFD_H >- struct signalfd_siginfo fdsi; >- ssize_t s; >- >-@@ -511,6 +522,12 @@ action_synced_wait(svc_action_t * op, si >- crm_perror(LOG_ERR, "Read from signal fd %d failed", sfd); >- >- } else if (fdsi.ssi_signo == SIGCHLD) { >-+#else >-+ if (1) { >-+ /* Clear out the sigchld pipe. */ >-+ char ch; >-+ while (read(sfd, &ch, 1) == 1); >-+#endif >- wait_rc = waitpid(op->pid, &status, WNOHANG); >- >- if (wait_rc < 0){ >-@@ -583,10 +600,10 @@ action_synced_wait(svc_action_t * op, si >- >- close(op->opaque->stdout_fd); >- close(op->opaque->stderr_fd); >-- close(sfd); >- >-+#ifdef HAVE_SYS_SIGNALFD_H >-+ close(sfd); >- #endif >-- >- } >- >- /* For an asynchronous 'op', returns FALSE if 'op' should be free'd by the caller */ >-@@ -596,9 +613,30 @@ services_os_action_execute(svc_action_t >- { >- int stdout_fd[2]; >- int stderr_fd[2]; >-+ struct stat st; >-+ sigset_t *pmask; >-+ >-+#ifdef HAVE_SYS_SIGNALFD_H >- sigset_t mask; >- sigset_t old_mask; >-- struct stat st; >-+#define sigchld_cleanup() { \ >-+ if (sigismember(&old_mask, SIGCHLD) == 0) { \ >-+ if (sigprocmask(SIG_UNBLOCK, &mask, NULL) < 0) { \ >-+ crm_perror(LOG_ERR, "sigprocmask() failed to unblock sigchld"); \ >-+ } \ >-+ } \ >-+} >-+#else >-+ struct sigaction sa; >-+ struct sigaction old_sa; >-+#define sigchld_cleanup() { \ >-+ if (sigaction(SIGCHLD, &old_sa, NULL) < 0) { \ >-+ crm_perror(LOG_ERR, "sigaction() failed to remove sigchld handler"); \ >-+ } \ >-+ close(sigchld_pipe[0]); \ >-+ close(sigchld_pipe[1]); \ >-+} >-+#endif >- >- if (pipe(stdout_fd) < 0) { >- crm_err("pipe() failed"); >-@@ -620,13 +658,33 @@ services_os_action_execute(svc_action_t >- } >- >- if (synchronous) { >-+#ifdef HAVE_SYS_SIGNALFD_H >- sigemptyset(&mask); >- sigaddset(&mask, SIGCHLD); >- sigemptyset(&old_mask); >- >- if (sigprocmask(SIG_BLOCK, &mask, &old_mask) < 0) { >-- crm_perror(LOG_ERR, "sigprocmask() failed"); >-+ crm_perror(LOG_ERR, "sigprocmask() failed to block sigchld"); >-+ } >-+ >-+ pmask = &mask; >-+#else >-+ if(pipe(sigchld_pipe) == -1) { >-+ crm_perror(LOG_ERR, "pipe() failed"); >-+ } >-+ >-+ set_fd_opts(sigchld_pipe[0], O_NONBLOCK); >-+ set_fd_opts(sigchld_pipe[1], O_NONBLOCK); >-+ >-+ sa.sa_handler = sigchld_handler; >-+ sa.sa_flags = 0; >-+ sigemptyset(&sa.sa_mask); >-+ if (sigaction(SIGCHLD, &sa, &old_sa) < 0) { >-+ crm_perror(LOG_ERR, "sigaction() failed to set sigchld handler"); >- } >-+ >-+ pmask = NULL; >-+#endif >- } >- >- op->pid = fork(); >-@@ -645,6 +703,8 @@ services_os_action_execute(svc_action_t >- if (!synchronous) { >- return operation_finalize(op); >- } >-+ >-+ sigchld_cleanup(); >- return FALSE; >- } >- case 0: /* Child */ >-@@ -663,6 +723,10 @@ services_os_action_execute(svc_action_t >- close(stderr_fd[1]); >- } >- >-+ if (synchronous) { >-+ sigchld_cleanup(); >-+ } >-+ >- action_launch_child(op); >- } >- >-@@ -677,14 +741,8 @@ services_os_action_execute(svc_action_t >- set_fd_opts(op->opaque->stderr_fd, O_NONBLOCK); >- >- if (synchronous) { >-- action_synced_wait(op, mask); >-- >-- if (sigismember(&old_mask, SIGCHLD) == 0) { >-- if (sigprocmask(SIG_UNBLOCK, &mask, NULL) < 0) { >-- crm_perror(LOG_ERR, "sigprocmask() to unblocked failed"); >-- } >-- } >-- >-+ action_synced_wait(op, pmask); >-+ sigchld_cleanup(); >- } else { >- >- crm_trace("Async waiting for %d - %s", op->pid, op->opaque->exec); > >Property changes on: files/patch-lib-services-services_linux.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-lib_common_utils.c >=================================================================== >--- files/patch-lib_common_utils.c (nonexistent) >+++ files/patch-lib_common_utils.c (working copy) >@@ -0,0 +1,12 @@ >+--- lib/common/utils.c.orig 2016-01-14 21:43:08 UTC >++++ lib/common/utils.c >+@@ -2270,7 +2270,8 @@ find_library_function(void **handle, con >+ } >+ >+ a_function = dlsym(*handle, fn); >+- if ((error = dlerror()) != NULL) { >++ if (a_function == NULL) { >++ error = dlerror(); >+ crm_err("%sCould not find %s in %s: %s", fatal ? "Fatal: " : "", fn, lib, error); >+ if (fatal) { >+ crm_exit(DAEMON_RESPAWN_STOP); > >Property changes on: files/patch-lib_common_utils.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-lib_services_services__linux.c >=================================================================== >--- files/patch-lib_services_services__linux.c (nonexistent) >+++ files/patch-lib_services_services__linux.c (working copy) >@@ -0,0 +1,180 @@ >+--- lib/services/services_linux.c.orig 2016-01-14 21:43:08 UTC >++++ lib/services/services_linux.c >+@@ -457,13 +457,19 @@ action_launch_child(svc_action_t *op) >+ _exit(op->rc); >+ } >+ >++#ifndef HAVE_SYS_SIGNALFD_H >++static int sigchld_pipe[2]; >++ >+ static void >+-action_synced_wait(svc_action_t * op, sigset_t mask) >++sigchld_handler() >+ { >++ write(sigchld_pipe[1], "", 1); >++} >++#endif >+ >+-#ifndef HAVE_SYS_SIGNALFD_H >+- CRM_ASSERT(FALSE); >+-#else >++static void >++action_synced_wait(svc_action_t * op, sigset_t *mask) >++{ >+ int status = 0; >+ int timeout = op->timeout; >+ int sfd = -1; >+@@ -471,10 +477,14 @@ action_synced_wait(svc_action_t * op, si >+ struct pollfd fds[3]; >+ int wait_rc = 0; >+ >+- sfd = signalfd(-1, &mask, SFD_NONBLOCK); >++#ifdef HAVE_SYS_SIGNALFD_H >++ sfd = signalfd(-1, mask, SFD_NONBLOCK); >+ if (sfd < 0) { >+ crm_perror(LOG_ERR, "signalfd() failed"); >+ } >++#else >++ sfd = sigchld_pipe[0]; >++#endif >+ >+ fds[0].fd = op->opaque->stdout_fd; >+ fds[0].events = POLLIN; >+@@ -503,6 +513,7 @@ action_synced_wait(svc_action_t * op, si >+ } >+ >+ if (fds[2].revents & POLLIN) { >++#ifdef HAVE_SYS_SIGNALFD_H >+ struct signalfd_siginfo fdsi; >+ ssize_t s; >+ >+@@ -511,6 +522,12 @@ action_synced_wait(svc_action_t * op, si >+ crm_perror(LOG_ERR, "Read from signal fd %d failed", sfd); >+ >+ } else if (fdsi.ssi_signo == SIGCHLD) { >++#else >++ if (1) { >++ /* Clear out the sigchld pipe. */ >++ char ch; >++ while (read(sfd, &ch, 1) == 1); >++#endif >+ wait_rc = waitpid(op->pid, &status, WNOHANG); >+ >+ if (wait_rc < 0){ >+@@ -583,10 +600,10 @@ action_synced_wait(svc_action_t * op, si >+ >+ close(op->opaque->stdout_fd); >+ close(op->opaque->stderr_fd); >+- close(sfd); >+ >++#ifdef HAVE_SYS_SIGNALFD_H >++ close(sfd); >+ #endif >+- >+ } >+ >+ /* For an asynchronous 'op', returns FALSE if 'op' should be free'd by the caller */ >+@@ -596,9 +613,30 @@ services_os_action_execute(svc_action_t >+ { >+ int stdout_fd[2]; >+ int stderr_fd[2]; >++ struct stat st; >++ sigset_t *pmask; >++ >++#ifdef HAVE_SYS_SIGNALFD_H >+ sigset_t mask; >+ sigset_t old_mask; >+- struct stat st; >++#define sigchld_cleanup() { \ >++ if (sigismember(&old_mask, SIGCHLD) == 0) { \ >++ if (sigprocmask(SIG_UNBLOCK, &mask, NULL) < 0) { \ >++ crm_perror(LOG_ERR, "sigprocmask() failed to unblock sigchld"); \ >++ } \ >++ } \ >++} >++#else >++ struct sigaction sa; >++ struct sigaction old_sa; >++#define sigchld_cleanup() { \ >++ if (sigaction(SIGCHLD, &old_sa, NULL) < 0) { \ >++ crm_perror(LOG_ERR, "sigaction() failed to remove sigchld handler"); \ >++ } \ >++ close(sigchld_pipe[0]); \ >++ close(sigchld_pipe[1]); \ >++} >++#endif >+ >+ if (pipe(stdout_fd) < 0) { >+ crm_err("pipe() failed"); >+@@ -620,13 +658,33 @@ services_os_action_execute(svc_action_t >+ } >+ >+ if (synchronous) { >++#ifdef HAVE_SYS_SIGNALFD_H >+ sigemptyset(&mask); >+ sigaddset(&mask, SIGCHLD); >+ sigemptyset(&old_mask); >+ >+ if (sigprocmask(SIG_BLOCK, &mask, &old_mask) < 0) { >+- crm_perror(LOG_ERR, "sigprocmask() failed"); >++ crm_perror(LOG_ERR, "sigprocmask() failed to block sigchld"); >++ } >++ >++ pmask = &mask; >++#else >++ if(pipe(sigchld_pipe) == -1) { >++ crm_perror(LOG_ERR, "pipe() failed"); >++ } >++ >++ set_fd_opts(sigchld_pipe[0], O_NONBLOCK); >++ set_fd_opts(sigchld_pipe[1], O_NONBLOCK); >++ >++ sa.sa_handler = sigchld_handler; >++ sa.sa_flags = 0; >++ sigemptyset(&sa.sa_mask); >++ if (sigaction(SIGCHLD, &sa, &old_sa) < 0) { >++ crm_perror(LOG_ERR, "sigaction() failed to set sigchld handler"); >+ } >++ >++ pmask = NULL; >++#endif >+ } >+ >+ op->pid = fork(); >+@@ -645,6 +703,8 @@ services_os_action_execute(svc_action_t >+ if (!synchronous) { >+ return operation_finalize(op); >+ } >++ >++ sigchld_cleanup(); >+ return FALSE; >+ } >+ case 0: /* Child */ >+@@ -663,6 +723,10 @@ services_os_action_execute(svc_action_t >+ close(stderr_fd[1]); >+ } >+ >++ if (synchronous) { >++ sigchld_cleanup(); >++ } >++ >+ action_launch_child(op); >+ } >+ >+@@ -677,14 +741,8 @@ services_os_action_execute(svc_action_t >+ set_fd_opts(op->opaque->stderr_fd, O_NONBLOCK); >+ >+ if (synchronous) { >+- action_synced_wait(op, mask); >+- >+- if (sigismember(&old_mask, SIGCHLD) == 0) { >+- if (sigprocmask(SIG_UNBLOCK, &mask, NULL) < 0) { >+- crm_perror(LOG_ERR, "sigprocmask() to unblocked failed"); >+- } >+- } >+- >++ action_synced_wait(op, pmask); >++ sigchld_cleanup(); >+ } else { >+ >+ crm_trace("Async waiting for %d - %s", op->pid, op->opaque->exec); > >Property changes on: files/patch-lib_services_services__linux.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-lrmd_Makefile.am >=================================================================== >--- files/patch-lrmd_Makefile.am (nonexistent) >+++ files/patch-lrmd_Makefile.am (working copy) >@@ -0,0 +1,11 @@ >+--- lrmd/Makefile.am.orig 2016-04-18 16:07:35 UTC >++++ lrmd/Makefile.am >+@@ -23,8 +23,6 @@ test_SCRIPTS = regression.py >+ lrmdlibdir = $(CRM_DAEMON_DIR) >+ lrmdlib_PROGRAMS = lrmd lrmd_test lrmd_internal_ctl >+ >+-initdir = $(INITDIR) >+-init_SCRIPTS = pacemaker_remote >+ sbin_PROGRAMS = pacemaker_remoted >+ >+ if BUILD_SYSTEMD > >Property changes on: files/patch-lrmd_Makefile.am >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-mcp_Makefile.am >=================================================================== >--- files/patch-mcp_Makefile.am (nonexistent) >+++ files/patch-mcp_Makefile.am (working copy) >@@ -0,0 +1,11 @@ >+--- mcp/Makefile.am.orig 2016-04-18 16:07:35 UTC >++++ mcp/Makefile.am >+@@ -19,8 +19,6 @@ include $(top_srcdir)/Makefile.common >+ >+ if BUILD_CS_SUPPORT >+ >+-initdir = $(INITDIR) >+-init_SCRIPTS = pacemaker >+ sbin_PROGRAMS = pacemakerd >+ >+ if BUILD_SYSTEMD > >Property changes on: files/patch-mcp_Makefile.am >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 413873) >+++ pkg-plist (working copy) >@@ -3647,8 +3647,6 @@ > %%DATADIR%%/upgrade06.xsl > %%DATADIR%%/versions.rng > share/snmp/mibs/PCMK-MIB.txt >-@dir /usr/local/etc/rc.d >-@dir /usr/local/etc > @dir /var/lib/pacemaker/blackbox > @dir /var/lib/pacemaker/cib > @dir /var/lib/pacemaker/pengine
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 209006
: 169619