From fe325c775ce945d5b4f054c6d81aeb57a16466c876a8db70c2c246781557f905 Mon Sep 17 00:00:00 2001 From: nick wang Date: Thu, 8 Aug 2019 01:54:39 +0000 Subject: [PATCH] Accepting request 720964 from home:yuanren10 Upgrade to corosync-2.4.5 OBS-URL: https://build.opensuse.org/request/show/720964 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=150 --- ...api-Use-size_t-for-private_data_size.patch | 29 -- 0001-disable-build-html-docs.patch | 11 + ...-Fix-compile-warnings-with-GCC-7.2.1.patch | 21 +- 0002-fix-ifdown-udp.patch | 363 ------------------ 0003-fix-tmpfiles-create.patch | 9 - 0004-mark-corosync-as-a-static-service.patch | 22 -- 0005-do-not-convert-empty-uid-gid-to-0.patch | 42 -- 0007-add-config-for-corosync-qnetd.patch | 11 - 0008-bsc#1083561-upgrade-from-1-x-y.patch | 37 -- 0009-bsc#1088619-add-version.patch | 4 - ...-net-instance.c-optarg-should-be-str.patch | 25 -- ...e-parameter-is-reserved-must-be-NULL.patch | 53 --- ...lients-about-left-nodes-during-pause.patch | 289 -------------- bnc#872651-stop-cluster.patch | 10 - bnc#882449-corosync-conf-example.patch | 67 ---- bsc#1001164-corosync.conf-example.patch | 29 -- bsc#1083561-upgrade-from-1-x-y.patch | 21 + corosync-2.3.4-fix-bashisms.patch | 33 -- corosync-2.4.4.tar.gz | 3 - corosync-2.4.5.tar.gz | 3 + corosync-init-lockfile-path-error.patch | 18 - corosync-start-stop-level.patch | 59 --- corosync.changes | 25 ++ corosync.spec | 44 +-- disable-build-html-docs.patch | 12 - 25 files changed, 70 insertions(+), 1170 deletions(-) delete mode 100644 0001-coroapi-Use-size_t-for-private_data_size.patch create mode 100644 0001-disable-build-html-docs.patch rename 0006-Fix-compile-warnings-with-GCC-7.2.1.patch => 0002-Fix-compile-warnings-with-GCC-7.2.1.patch (61%) delete mode 100644 0002-fix-ifdown-udp.patch delete mode 100644 0003-fix-tmpfiles-create.patch delete mode 100644 0004-mark-corosync-as-a-static-service.patch delete mode 100644 0005-do-not-convert-empty-uid-gid-to-0.patch delete mode 100644 0007-add-config-for-corosync-qnetd.patch delete mode 100644 0008-bsc#1083561-upgrade-from-1-x-y.patch delete mode 100644 0009-bsc#1088619-add-version.patch delete mode 100644 0010-qdevice-net-instance.c-optarg-should-be-str.patch delete mode 100644 0011-NSS_NoDB_Init-the-parameter-is-reserved-must-be-NULL.patch delete mode 100644 0012-cpg-Inform-clients-about-left-nodes-during-pause.patch delete mode 100644 bnc#872651-stop-cluster.patch delete mode 100644 bnc#882449-corosync-conf-example.patch delete mode 100644 bsc#1001164-corosync.conf-example.patch create mode 100644 bsc#1083561-upgrade-from-1-x-y.patch delete mode 100644 corosync-2.3.4-fix-bashisms.patch delete mode 100644 corosync-2.4.4.tar.gz create mode 100644 corosync-2.4.5.tar.gz delete mode 100644 corosync-init-lockfile-path-error.patch delete mode 100644 corosync-start-stop-level.patch delete mode 100644 disable-build-html-docs.patch diff --git a/0001-coroapi-Use-size_t-for-private_data_size.patch b/0001-coroapi-Use-size_t-for-private_data_size.patch deleted file mode 100644 index ad6ffdc..0000000 --- a/0001-coroapi-Use-size_t-for-private_data_size.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/exec/ipc_glue.c b/exec/ipc_glue.c -index d0a25d98..8b34d495 100644 ---- a/exec/ipc_glue.c -+++ b/exec/ipc_glue.c -@@ -272,7 +272,7 @@ static void cs_ipcs_connection_created(qb_ipcs_connection_t *c) - struct cs_ipcs_conn_context *context; - char proc_name[32]; - struct qb_ipcs_connection_stats stats; -- int32_t size = sizeof(struct cs_ipcs_conn_context); -+ size_t size = sizeof(struct cs_ipcs_conn_context); - char key_name[ICMAP_KEYNAME_MAXLEN]; - int set_client_pid = 0; - int set_proc_name = 0; -diff --git a/include/corosync/coroapi.h b/include/corosync/coroapi.h -index ff02a54f..3a36f255 100644 ---- a/include/corosync/coroapi.h -+++ b/include/corosync/coroapi.h -@@ -494,7 +494,7 @@ struct corosync_service_engine { - unsigned short priority; /* Lower priority are loaded first, unloaded last. - * 0 is a special case which always loaded _and_ unloaded last - */ -- unsigned int private_data_size; -+ size_t private_data_size; - enum cs_lib_flow_control flow_control; - enum cs_lib_allow_inquorate allow_inquorate; - char *(*exec_init_fn) (struct corosync_api_v1 *); --- -2.12.0 - diff --git a/0001-disable-build-html-docs.patch b/0001-disable-build-html-docs.patch new file mode 100644 index 0000000..7d32de8 --- /dev/null +++ b/0001-disable-build-html-docs.patch @@ -0,0 +1,11 @@ +--- corosync-2.4.5/configure.ac 2019-07-30 20:26:27.000000000 +0800 ++++ corosync-2.4.5-new/configure.ac 2019-08-02 18:06:00.703167465 +0800 +@@ -737,7 +737,7 @@ + AM_CONDITIONAL(AUGTOOL, test -n "${AUGTOOL}") + AC_SUBST([NSS_LDFLAGS]) + +-AM_CONDITIONAL(BUILD_HTML_DOCS, test -n "${GROFF}") ++AM_CONDITIONAL(BUILD_HTML_DOCS, false) + + AC_SUBST([LINT_FLAGS]) + diff --git a/0006-Fix-compile-warnings-with-GCC-7.2.1.patch b/0002-Fix-compile-warnings-with-GCC-7.2.1.patch similarity index 61% rename from 0006-Fix-compile-warnings-with-GCC-7.2.1.patch rename to 0002-Fix-compile-warnings-with-GCC-7.2.1.patch index 08a9254..c17dada 100644 --- a/0006-Fix-compile-warnings-with-GCC-7.2.1.patch +++ b/0002-Fix-compile-warnings-with-GCC-7.2.1.patch @@ -1,16 +1,6 @@ -//cpg_test_agent: Fix snprintf compiler warnings ---- - cts/agents/cpg_test_agent.c | 8 ++++---- - exec/coroparse.c | 18 +++--------------- - lib/sam.c | 36 ++++++++++++++++++++++++++++-------- - tools/corosync-quorumtool.c | 2 +- - 4 files changed, 36 insertions(+), 28 deletions(-) - -diff --git a/cts/agents/cpg_test_agent.c b/cts/agents/cpg_test_agent.c -index 0837c69c..2224141c 100644 ---- a/cts/agents/cpg_test_agent.c -+++ b/cts/agents/cpg_test_agent.c -@@ -211,8 +211,8 @@ static void config_change_callback ( +--- corosync-2.4.5/cts/agents/cpg_test_agent.c 2019-07-30 20:26:27.000000000 +0800 ++++ corosync-2.4.5-new/cts/agents/cpg_test_agent.c 2019-08-05 13:42:47.494088257 +0800 +@@ -211,8 +211,8 @@ if (record_config_events_g > 0) { log_pt = malloc (sizeof(log_entry_t)); list_init (&log_pt->list); @@ -21,7 +11,7 @@ index 0837c69c..2224141c 100644 list_add_tail(&log_pt->list, &config_chg_log_head); qb_log (LOG_INFO, "cpg event %s", log_pt->log); } -@@ -221,8 +221,8 @@ static void config_change_callback ( +@@ -221,8 +221,8 @@ if (record_config_events_g > 0) { log_pt = malloc (sizeof(log_entry_t)); list_init (&log_pt->list); @@ -32,6 +22,3 @@ index 0837c69c..2224141c 100644 list_add_tail (&log_pt->list, &config_chg_log_head); qb_log (LOG_INFO, "cpg event %s", log_pt->log); } --- -2.13.6 - diff --git a/0002-fix-ifdown-udp.patch b/0002-fix-ifdown-udp.patch deleted file mode 100644 index 3a126e7..0000000 --- a/0002-fix-ifdown-udp.patch +++ /dev/null @@ -1,363 +0,0 @@ -From ec2dfbec877fee166b31493e2dba41a850380608 Mon Sep 17 00:00:00 2001 -From: Bin Liu -Date: Tue, 17 Apr 2018 18:04:52 +0800 -Subject: [PATCH] totemudp: Add local loop support for unicast msgs - ---- - exec/totemudp.c | 218 ++++++++++++++++++++++++++++++++------------------------ - 1 file changed, 126 insertions(+), 92 deletions(-) - -diff --git a/exec/totemudp.c b/exec/totemudp.c -index 4b644ae..ea18897 100644 ---- a/exec/totemudp.c -+++ b/exec/totemudp.c -@@ -205,8 +205,6 @@ static int totemudp_build_sockets ( - struct totemudp_socket *sockets, - struct totem_ip_address *bound_to); - --static struct totem_ip_address localhost; -- - static void totemudp_instance_initialize (struct totemudp_instance *instance) - { - memset (instance, 0, sizeof (struct totemudp_instance)); -@@ -267,6 +265,7 @@ static inline void ucast_sendmsg ( - struct sockaddr_storage sockaddr; - struct iovec iovec; - int addrlen; -+ int send_sock; - - if (msg_len + crypto_get_current_sec_header_size(instance->crypto_inst) > sizeof(buf_out)) { - log_printf(LOGSYS_LEVEL_CRIT, "UDP message for ucast is too big. Ignoring message"); -@@ -317,11 +316,19 @@ static inline void ucast_sendmsg ( - #endif - - -+ if (instance->netif_bind_state == BIND_STATE_REGULAR) { -+ send_sock = instance->totemudp_sockets.mcast_send; -+ } else { -+ send_sock = instance->totemudp_sockets.local_mcast_loop[1]; -+ msg_ucast.msg_name = NULL; -+ msg_ucast.msg_namelen = 0; -+ } -+ - /* - * Transmit unicast message - * An error here is recovered by totemsrp - */ -- res = sendmsg (instance->totemudp_sockets.mcast_send, &msg_ucast, -+ res = sendmsg (send_sock, &msg_ucast, - MSG_NOSIGNAL); - if (res < 0) { - LOGSYS_PERROR (errno, instance->totemudp_log_level_debug, -@@ -390,18 +397,20 @@ static inline void mcast_sendmsg ( - msg_mcast.msg_accrightslen = 0; - #endif - -- /* -- * Transmit multicast message -- * An error here is recovered by totemsrp -- */ -- res = sendmsg (instance->totemudp_sockets.mcast_send, &msg_mcast, -- MSG_NOSIGNAL); -- if (res < 0) { -- LOGSYS_PERROR (errno, instance->totemudp_log_level_debug, -- "sendmsg(mcast) failed (non-critical)"); -- instance->stats->continuous_sendmsg_failures++; -- } else { -- instance->stats->continuous_sendmsg_failures = 0; -+ if (instance->netif_bind_state == BIND_STATE_REGULAR) { -+ /* -+ * Transmit multicast message -+ * An error here is recovered by totemsrp -+ */ -+ res = sendmsg (instance->totemudp_sockets.mcast_send, &msg_mcast, -+ MSG_NOSIGNAL); -+ if (res < 0) { -+ LOGSYS_PERROR (errno, instance->totemudp_log_level_debug, -+ "sendmsg(mcast) failed (non-critical)"); -+ instance->stats->continuous_sendmsg_failures++; -+ } else { -+ instance->stats->continuous_sendmsg_failures = 0; -+ } - } - - /* -@@ -580,7 +589,6 @@ static void timer_function_netif_check_timeout ( - struct totemudp_instance *instance = (struct totemudp_instance *)data; - int interface_up; - int interface_num; -- struct totem_ip_address *bind_address; - - /* - * Build sockets for every interface -@@ -617,28 +625,31 @@ static void timer_function_netif_check_timeout ( - qb_loop_poll_del (instance->totemudp_poll_handle, - instance->totemudp_sockets.mcast_recv); - close (instance->totemudp_sockets.mcast_recv); -+ instance->totemudp_sockets.mcast_recv = -1; - } - if (instance->totemudp_sockets.mcast_send > 0) { - close (instance->totemudp_sockets.mcast_send); -- } -- if (instance->totemudp_sockets.local_mcast_loop[0] > 0) { -- qb_loop_poll_del (instance->totemudp_poll_handle, -- instance->totemudp_sockets.local_mcast_loop[0]); -- close (instance->totemudp_sockets.local_mcast_loop[0]); -- close (instance->totemudp_sockets.local_mcast_loop[1]); -+ instance->totemudp_sockets.mcast_send = -1; - } - if (instance->totemudp_sockets.token > 0) { - qb_loop_poll_del (instance->totemudp_poll_handle, - instance->totemudp_sockets.token); - close (instance->totemudp_sockets.token); -+ instance->totemudp_sockets.token = -1; - } - - if (interface_up == 0) { -+ if (instance->netif_bind_state == BIND_STATE_UNBOUND) { -+ log_printf (instance->totemudp_log_level_error, -+ "One of your ip addresses are now bound to localhost. " -+ "Corosync would not work correctly."); -+ exit(COROSYNC_DONE_FATAL_ERR); -+ } -+ - /* - * Interface is not up - */ - instance->netif_bind_state = BIND_STATE_LOOPBACK; -- bind_address = &localhost; - - /* - * Add a timer to retry building interfaces and request memb_gather_enter -@@ -654,34 +665,29 @@ static void timer_function_netif_check_timeout ( - * Interface is up - */ - instance->netif_bind_state = BIND_STATE_REGULAR; -- bind_address = &instance->totem_interface->bindnet; - } - /* - * Create and bind the multicast and unicast sockets - */ - (void)totemudp_build_sockets (instance, - &instance->mcast_address, -- bind_address, -+ &instance->totem_interface->bindnet, - &instance->totemudp_sockets, - &instance->totem_interface->boundto); - -- qb_loop_poll_add ( -- instance->totemudp_poll_handle, -- QB_LOOP_MED, -- instance->totemudp_sockets.mcast_recv, -- POLLIN, instance, net_deliver_fn); -- -- qb_loop_poll_add ( -- instance->totemudp_poll_handle, -- QB_LOOP_MED, -- instance->totemudp_sockets.local_mcast_loop[0], -- POLLIN, instance, net_deliver_fn); -+ if (instance->netif_bind_state == BIND_STATE_REGULAR) { -+ qb_loop_poll_add ( -+ instance->totemudp_poll_handle, -+ QB_LOOP_MED, -+ instance->totemudp_sockets.mcast_recv, -+ POLLIN, instance, net_deliver_fn); - -- qb_loop_poll_add ( -- instance->totemudp_poll_handle, -- QB_LOOP_MED, -- instance->totemudp_sockets.token, -- POLLIN, instance, net_deliver_fn); -+ qb_loop_poll_add ( -+ instance->totemudp_poll_handle, -+ QB_LOOP_MED, -+ instance->totemudp_sockets.token, -+ POLLIN, instance, net_deliver_fn); -+ } - - totemip_copy (&instance->my_id, &instance->totem_interface->boundto); - -@@ -732,6 +738,66 @@ static void totemudp_traffic_control_set(struct totemudp_instance *instance, int - #endif - } - -+static int totemudp_build_local_sockets( -+ struct totemudp_instance *instance, -+ struct totemudp_socket *sockets) -+{ -+ int i; -+ unsigned int sendbuf_size; -+ unsigned int recvbuf_size; -+ unsigned int optlen = sizeof (sendbuf_size); -+ int res; -+ -+ /* -+ * Create local multicast loop socket -+ */ -+ if (socketpair(AF_UNIX, SOCK_DGRAM, 0, sockets->local_mcast_loop) == -1) { -+ LOGSYS_PERROR (errno, instance->totemudp_log_level_warning, -+ "socket() failed"); -+ return (-1); -+ } -+ -+ for (i = 0; i < 2; i++) { -+ totemip_nosigpipe (sockets->local_mcast_loop[i]); -+ res = fcntl (sockets->local_mcast_loop[i], F_SETFL, O_NONBLOCK); -+ if (res == -1) { -+ LOGSYS_PERROR (errno, instance->totemudp_log_level_warning, -+ "Could not set non-blocking operation on multicast socket"); -+ return (-1); -+ } -+ } -+ -+ recvbuf_size = MCAST_SOCKET_BUFFER_SIZE; -+ sendbuf_size = MCAST_SOCKET_BUFFER_SIZE; -+ -+ res = setsockopt (sockets->local_mcast_loop[0], SOL_SOCKET, SO_RCVBUF, &recvbuf_size, optlen); -+ if (res == -1) { -+ LOGSYS_PERROR (errno, instance->totemudp_log_level_debug, -+ "Unable to set SO_RCVBUF size on UDP local mcast loop socket"); -+ return (-1); -+ } -+ res = setsockopt (sockets->local_mcast_loop[1], SOL_SOCKET, SO_SNDBUF, &sendbuf_size, optlen); -+ if (res == -1) { -+ LOGSYS_PERROR (errno, instance->totemudp_log_level_debug, -+ "Unable to set SO_SNDBUF size on UDP local mcast loop socket"); -+ return (-1); -+ } -+ -+ res = getsockopt (sockets->local_mcast_loop[0], SOL_SOCKET, SO_RCVBUF, &recvbuf_size, &optlen); -+ if (res == 0) { -+ log_printf (instance->totemudp_log_level_debug, -+ "Local receive multicast loop socket recv buffer size (%d bytes).", recvbuf_size); -+ } -+ -+ res = getsockopt (sockets->local_mcast_loop[1], SOL_SOCKET, SO_SNDBUF, &sendbuf_size, &optlen); -+ if (res == 0) { -+ log_printf (instance->totemudp_log_level_debug, -+ "Local transmit multicast loop socket send buffer size (%d bytes).", sendbuf_size); -+ } -+ -+ return (0); -+} -+ - static int totemudp_build_sockets_ip ( - struct totemudp_instance *instance, - struct totem_ip_address *mcast_address, -@@ -755,7 +821,6 @@ static int totemudp_build_sockets_ip ( - int res; - int flag; - uint8_t sflag; -- int i; - - /* - * Create multicast recv socket -@@ -786,27 +851,6 @@ static int totemudp_build_sockets_ip ( - } - - /* -- * Create local multicast loop socket -- */ -- if (socketpair(AF_UNIX, SOCK_DGRAM, 0, sockets->local_mcast_loop) == -1) { -- LOGSYS_PERROR (errno, instance->totemudp_log_level_warning, -- "socket() failed"); -- return (-1); -- } -- -- for (i = 0; i < 2; i++) { -- totemip_nosigpipe (sockets->local_mcast_loop[i]); -- res = fcntl (sockets->local_mcast_loop[i], F_SETFL, O_NONBLOCK); -- if (res == -1) { -- LOGSYS_PERROR (errno, instance->totemudp_log_level_warning, -- "Could not set non-blocking operation on multicast socket"); -- return (-1); -- } -- } -- -- -- -- /* - * Setup mcast send socket - */ - sockets->mcast_send = socket (bindnet_address->family, SOCK_DGRAM, 0); -@@ -930,18 +974,6 @@ static int totemudp_build_sockets_ip ( - "Unable to set SO_SNDBUF size on UDP mcast socket"); - return (-1); - } -- res = setsockopt (sockets->local_mcast_loop[0], SOL_SOCKET, SO_RCVBUF, &recvbuf_size, optlen); -- if (res == -1) { -- LOGSYS_PERROR (errno, instance->totemudp_log_level_debug, -- "Unable to set SO_RCVBUF size on UDP local mcast loop socket"); -- return (-1); -- } -- res = setsockopt (sockets->local_mcast_loop[1], SOL_SOCKET, SO_SNDBUF, &sendbuf_size, optlen); -- if (res == -1) { -- LOGSYS_PERROR (errno, instance->totemudp_log_level_debug, -- "Unable to set SO_SNDBUF size on UDP local mcast loop socket"); -- return (-1); -- } - - res = getsockopt (sockets->mcast_recv, SOL_SOCKET, SO_RCVBUF, &recvbuf_size, &optlen); - if (res == 0) { -@@ -955,19 +987,6 @@ static int totemudp_build_sockets_ip ( - "Transmit multicast socket send buffer size (%d bytes).", sendbuf_size); - } - -- res = getsockopt (sockets->local_mcast_loop[0], SOL_SOCKET, SO_RCVBUF, &recvbuf_size, &optlen); -- if (res == 0) { -- log_printf (instance->totemudp_log_level_debug, -- "Local receive multicast loop socket recv buffer size (%d bytes).", recvbuf_size); -- } -- -- res = getsockopt (sockets->local_mcast_loop[1], SOL_SOCKET, SO_SNDBUF, &sendbuf_size, &optlen); -- if (res == 0) { -- log_printf (instance->totemudp_log_level_debug, -- "Local transmit multicast loop socket send buffer size (%d bytes).", sendbuf_size); -- } -- -- - /* - * Join group membership on socket - */ -@@ -1256,8 +1275,19 @@ int totemudp_initialize ( - - instance->totemudp_target_set_completed = target_set_completed; - -- totemip_localhost (instance->mcast_address.family, &localhost); -- localhost.nodeid = instance->totem_config->node_id; -+ /* -+ * Create static local mcast sockets -+ */ -+ if (totemudp_build_local_sockets(instance, &instance->totemudp_sockets) == -1) { -+ free(instance); -+ return (-1); -+ } -+ -+ qb_loop_poll_add ( -+ instance->totemudp_poll_handle, -+ QB_LOOP_MED, -+ instance->totemudp_sockets.local_mcast_loop[0], -+ POLLIN, instance, net_deliver_fn); - - /* - * RRP layer isn't ready to receive message because it hasn't -@@ -1320,10 +1350,14 @@ int totemudp_recv_flush (void *udp_context) - for (i = 0; i < 2; i++) { - sock = -1; - if (i == 0) { -- sock = instance->totemudp_sockets.mcast_recv; -+ if (instance->netif_bind_state == BIND_STATE_REGULAR) { -+ sock = instance->totemudp_sockets.mcast_recv; -+ } else { -+ continue; -+ } - } - if (i == 1) { -- sock = instance->totemudp_sockets.local_mcast_loop[0]; -+ sock = instance->totemudp_sockets.local_mcast_loop[0]; - } - assert(sock != -1); - --- -2.13.6 - diff --git a/0003-fix-tmpfiles-create.patch b/0003-fix-tmpfiles-create.patch deleted file mode 100644 index db8b2d9..0000000 --- a/0003-fix-tmpfiles-create.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- corosync-2.4.2.orig/tools/corosync-notifyd.sysconfig.example 2016-11-08 00:39:12.000000000 +0800 -+++ corosync-2.4.2/tools/corosync-notifyd.sysconfig.example 2017-08-16 11:41:00.485913615 +0800 -@@ -6,5 +6,4 @@ - # - - # Send DBUS signals on all events (for SNMP traps, use -s) --OPTIONS="-d" -- -+# OPTIONS="-d" diff --git a/0004-mark-corosync-as-a-static-service.patch b/0004-mark-corosync-as-a-static-service.patch deleted file mode 100644 index ecf8a49..0000000 --- a/0004-mark-corosync-as-a-static-service.patch +++ /dev/null @@ -1,22 +0,0 @@ -From f1c6610de162a1bcf4bedab28398ab3f0ac6bb9d Mon Sep 17 00:00:00 2001 -From: Bin Liu -Date: Tue, 17 Apr 2018 17:00:28 +0800 -Subject: [PATCH] mark corosync as a static service - ---- - init/corosync.service.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/init/corosync.service.in b/init/corosync.service.in -index 7733a98..e6c1805 100644 ---- a/init/corosync.service.in -+++ b/init/corosync.service.in -@@ -23,4 +23,4 @@ Type=forking - #ExecStartPre=/sbin/modprobe softdog - - [Install] --WantedBy=multi-user.target -+#WantedBy=multi-user.target --- -2.13.6 - diff --git a/0005-do-not-convert-empty-uid-gid-to-0.patch b/0005-do-not-convert-empty-uid-gid-to-0.patch deleted file mode 100644 index fba501f..0000000 --- a/0005-do-not-convert-empty-uid-gid-to-0.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 31d931be66ef9ebf0aeb8e1dffa33e3280bfe732 Mon Sep 17 00:00:00 2001 -From: Bin Liu -Date: Tue, 17 Apr 2018 17:06:20 +0800 -Subject: [PATCH] do not convert empty uid gid to 0 - ---- - exec/coroparse.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/exec/coroparse.c b/exec/coroparse.c -index 96bb83a..da82d54 100644 ---- a/exec/coroparse.c -+++ b/exec/coroparse.c -@@ -139,6 +139,12 @@ static int uid_determine (const char *req_user) - long int id; - char *ep; - -+ if(*req_user == '\0') { -+ sprintf (error_string_response, -+ "The user can not be empty, please read the documentation."); -+ return (-1); -+ } -+ - id = strtol(req_user, &ep, 10); - if (*req_user != '\0' && *ep == '\0' && id >= 0 && id <= UINT_MAX) { - return (id); -@@ -193,6 +199,12 @@ static int gid_determine (const char *req_group) - long int id; - char *ep; - -+ if(*req_group == '\0') { -+ sprintf (error_string_response, -+ "The group can not be empty, please read the documentation."); -+ return (-1); -+ } -+ - id = strtol(req_group, &ep, 10); - if (*req_group != '\0' && *ep == '\0' && id >= 0 && id <= UINT_MAX) { - return (id); --- -2.13.6 - diff --git a/0007-add-config-for-corosync-qnetd.patch b/0007-add-config-for-corosync-qnetd.patch deleted file mode 100644 index f746a56..0000000 --- a/0007-add-config-for-corosync-qnetd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- corosync-2.4.3.orig/init/corosync-qnetd.sysconfig.example 2017-09-21 23:14:59.000000000 +0800 -+++ corosync-2.4.3/init/corosync-qnetd.sysconfig.example 2017-12-27 13:39:01.024262758 +0800 -@@ -3,7 +3,7 @@ - # COROSYNC_QNETD_OPTIONS specifies options passed to corosync-qnetd command - # (default is no options). - # See "man corosync-qnetd" for detailed descriptions of the options. --COROSYNC_QNETD_OPTIONS="" -+COROSYNC_QNETD_OPTIONS="-4 -l 0.0.0.0 -p 5403 -s off" - - # COROSYNC_QNETD_RUNAS specifies user under which qnetd daemon should be running - # (not set or empty is default and means "user who executes init script") diff --git a/0008-bsc#1083561-upgrade-from-1-x-y.patch b/0008-bsc#1083561-upgrade-from-1-x-y.patch deleted file mode 100644 index 2bd2201..0000000 --- a/0008-bsc#1083561-upgrade-from-1-x-y.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 374895340ebaa41bee26a2c2272bc9e3906ede22 Mon Sep 17 00:00:00 2001 -From: Bin Liu -Date: Thu, 8 Mar 2018 13:34:54 +0800 -Subject: [PATCH] add init-upgrade.patch - ---- - init/upgrade.sh | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - create mode 100644 init/upgrade.sh - -diff --git a/init/upgrade.sh b/init/upgrade.sh -new file mode 100644 -index 00000000..774aece9 ---- /dev/null -+++ b/init/upgrade.sh -@@ -0,0 +1,18 @@ -+#! /bin/bash -+CONFIG_FILE=/etc/corosync/corosync.conf -+CONFIG_FILE_OLD=/etc/corosync/corosync.conf.old -+ -+if [ -f $CONFIG_FILE ]; then -+ cp $CONFIG_FILE $CONFIG_FILE_OLD -+ #lots of operations -+ sed -i "/amf\ *{/,/\ *}/d" $CONFIG_FILE && \ -+ sed -i "/aisexec\ *{/,/\ *}/d" $CONFIG_FILE && \ -+ sed -i "/service\ *{/,/\ *}/d" $CONFIG_FILE && \ -+ #sed -i "/token:/,/max_messages:/d" $CONFIG_FILE && \ -+ sed -i "s/AMF/QUORUM/g" $CONFIG_FILE -+ if [ $? -ne 0 ]; then -+ cp $CONFIG_FILE_OLD $CONFIG_FILE -+ else -+ rm $CONFIG_FILE_OLD -+ fi -+fi --- -2.13.6 - diff --git a/0009-bsc#1088619-add-version.patch b/0009-bsc#1088619-add-version.patch deleted file mode 100644 index 7737f99..0000000 --- a/0009-bsc#1088619-add-version.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- /dev/null 2018-04-10 08:30:37.121221591 +0800 -+++ corosync-2.4.3/.tarball-version 2018-04-10 18:30:37.907779088 +0800 -@@ -0,0 +1 @@ -+2.4.4 diff --git a/0010-qdevice-net-instance.c-optarg-should-be-str.patch b/0010-qdevice-net-instance.c-optarg-should-be-str.patch deleted file mode 100644 index a983667..0000000 --- a/0010-qdevice-net-instance.c-optarg-should-be-str.patch +++ /dev/null @@ -1,25 +0,0 @@ -From fab3ef5e63e1ad61d03b1230e8f900bf1279cc81 Mon Sep 17 00:00:00 2001 -From: Bin Liu -Date: Thu, 19 Apr 2018 16:52:27 +0800 -Subject: [PATCH] qdevice-net-instance.c: optarg should be str - ---- - qdevices/qdevice-net-instance.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/qdevices/qdevice-net-instance.c b/qdevices/qdevice-net-instance.c -index 87cf3ee0..a3231cd5 100644 ---- a/qdevices/qdevice-net-instance.c -+++ b/qdevices/qdevice-net-instance.c -@@ -273,7 +273,7 @@ qdevice_net_instance_init_from_cmap(struct qdevice_instance *instance) - host_addr = str; - - if (cmap_get_string(cmap_handle, "quorum.device.net.port", &str) == CS_OK) { -- if (utils_strtonum(optarg, 1, UINT16_MAX, &lli) == -1) { -+ if (utils_strtonum(str, 1, UINT16_MAX, &lli) == -1) { - qdevice_log(LOG_ERR, "quorum.device.net.port must be in range 1-%u", UINT16_MAX); - free(str); - goto error_free_host_addr; --- -2.13.6 - diff --git a/0011-NSS_NoDB_Init-the-parameter-is-reserved-must-be-NULL.patch b/0011-NSS_NoDB_Init-the-parameter-is-reserved-must-be-NULL.patch deleted file mode 100644 index 5d0c42a..0000000 --- a/0011-NSS_NoDB_Init-the-parameter-is-reserved-must-be-NULL.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 4f6a22ae78055da7b89e237ea6bf6449610a1b90 Mon Sep 17 00:00:00 2001 -From: Bin Liu -Date: Thu, 26 Apr 2018 14:30:31 +0800 -Subject: [PATCH] NSS_NoDB_Init: the parameter is reserved, must be NULL - ---- - cts/agents/cpg_test_agent.c | 2 +- - exec/totemcrypto.c | 2 +- - test/cpgverify.c | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/cts/agents/cpg_test_agent.c b/cts/agents/cpg_test_agent.c -index 0837c69c..9ac9b4c2 100644 ---- a/cts/agents/cpg_test_agent.c -+++ b/cts/agents/cpg_test_agent.c -@@ -788,7 +788,7 @@ main(int argc, char *argv[]) - list_init (&msg_log_head); - list_init (&config_chg_log_head); - -- if (NSS_NoDB_Init(".") != SECSuccess) { -+ if (NSS_NoDB_Init(NULL) != SECSuccess) { - qb_log(LOG_ERR, "Couldn't initialize nss"); - exit (0); - } -diff --git a/exec/totemcrypto.c b/exec/totemcrypto.c -index 64246c98..b35683f9 100644 ---- a/exec/totemcrypto.c -+++ b/exec/totemcrypto.c -@@ -670,7 +670,7 @@ static int init_nss_db(struct crypto_instance *instance) - return 0; - } - -- if (NSS_NoDB_Init(".") != SECSuccess) { -+ if (NSS_NoDB_Init(NULL) != SECSuccess) { - log_printf(instance->log_level_security, "NSS DB initialization failed (err %d)", - PR_GetError()); - return -1; -diff --git a/test/cpgverify.c b/test/cpgverify.c -index 928eff33..0462a34d 100644 ---- a/test/cpgverify.c -+++ b/test/cpgverify.c -@@ -137,7 +137,7 @@ int main (int argc, char *argv[]) - exit (0); - } - -- if (NSS_NoDB_Init(".") != SECSuccess) { -+ if (NSS_NoDB_Init(NULL) != SECSuccess) { - printf ("Couldn't initialize nss\n"); - exit (0); - } --- -2.13.6 - diff --git a/0012-cpg-Inform-clients-about-left-nodes-during-pause.patch b/0012-cpg-Inform-clients-about-left-nodes-during-pause.patch deleted file mode 100644 index cd8697e..0000000 --- a/0012-cpg-Inform-clients-about-left-nodes-during-pause.patch +++ /dev/null @@ -1,289 +0,0 @@ -Subject: [PATCH] cpg: Inform clients about left nodes during pause - -Patch tries to fix incorrect behaviour during following test-case: -- 3 nodes -- Node 1 is paused -- Node 2 and 3 detects node 1 as failed and informs CPG clients -- Node 1 is unpaused -- Node 1 clients are informed about new membership, but not about Node 1 - being paused, so from Node 1 point-of-view, Node 2 and 3 failure - -Solution is to: -- Remove downlist master choose and always choose local node downlist. - For Node 1 in example above, downlist contains Node 2 and 3. -- Keep code which informs clients about left nodes -- Use joinlist as a authoritative source of nodes/clients which exists - in membership - ---- - exec/cpg.c | 164 +++++-------------------------------------------------------- - 1 file changed, 11 insertions(+), 153 deletions(-) - -diff --git a/exec/cpg.c b/exec/cpg.c -index 78ac1e9e..b851cba3 100644 ---- a/exec/cpg.c -+++ b/exec/cpg.c -@@ -139,13 +139,6 @@ enum cpg_sync_state { - CPGSYNC_JOINLIST - }; - --enum cpg_downlist_state_e { -- CPG_DOWNLIST_NONE, -- CPG_DOWNLIST_WAITING_FOR_MESSAGES, -- CPG_DOWNLIST_APPLYING, --}; --static enum cpg_downlist_state_e downlist_state; --static struct list_head downlist_messages_head; - static struct list_head joinlist_messages_head; - - struct cpg_pd { -@@ -295,9 +288,7 @@ static int cpg_exec_send_downlist(void); - - static int cpg_exec_send_joinlist(void); - --static void downlist_messages_delete (void); -- --static void downlist_master_choose_and_send (void); -+static void downlist_inform_clients (void); - - static void joinlist_inform_clients (void); - -@@ -499,14 +490,6 @@ struct req_exec_cpg_downlist { - mar_uint32_t nodeids[PROCESSOR_COUNT_MAX] __attribute__((aligned(8))); - }; - --struct downlist_msg { -- mar_uint32_t sender_nodeid; -- mar_uint32_t old_members __attribute__((aligned(8))); -- mar_uint32_t left_nodes __attribute__((aligned(8))); -- mar_uint32_t nodeids[PROCESSOR_COUNT_MAX] __attribute__((aligned(8))); -- struct list_head list; --}; -- - struct joinlist_msg { - mar_uint32_t sender_nodeid; - uint32_t pid; -@@ -566,8 +549,6 @@ static void cpg_sync_init ( - last_sync_ring_id.nodeid = ring_id->rep.nodeid; - last_sync_ring_id.seq = ring_id->seq; - -- downlist_state = CPG_DOWNLIST_WAITING_FOR_MESSAGES; -- - entries = 0; - /* - * Determine list of nodeids for downlist message -@@ -611,14 +592,10 @@ static void cpg_sync_activate (void) - my_member_list_entries * sizeof (unsigned int)); - my_old_member_list_entries = my_member_list_entries; - -- if (downlist_state == CPG_DOWNLIST_WAITING_FOR_MESSAGES) { -- downlist_master_choose_and_send (); -- } -+ downlist_inform_clients (); - - joinlist_inform_clients (); - -- downlist_messages_delete (); -- downlist_state = CPG_DOWNLIST_NONE; - joinlist_messages_delete (); - - notify_lib_totem_membership (NULL, my_member_list_entries, my_member_list); -@@ -626,8 +603,7 @@ static void cpg_sync_activate (void) - - static void cpg_sync_abort (void) - { -- downlist_state = CPG_DOWNLIST_NONE; -- downlist_messages_delete (); -+ - joinlist_messages_delete (); - } - -@@ -800,76 +776,17 @@ static int notify_lib_joinlist( - return CS_OK; - } - --static void downlist_log(const char *msg, struct downlist_msg* dl) -+static void downlist_log(const char *msg, struct req_exec_cpg_downlist *dl) - { - log_printf (LOG_DEBUG, -- "%s: sender %s; members(old:%d left:%d)", -+ "%s: members(old:%d left:%d)", - msg, -- api->totem_ifaces_print(dl->sender_nodeid), - dl->old_members, - dl->left_nodes); - } - --static struct downlist_msg* downlist_master_choose (void) -+static void downlist_inform_clients (void) - { -- struct downlist_msg *cmp; -- struct downlist_msg *best = NULL; -- struct list_head *iter; -- uint32_t cmp_members; -- uint32_t best_members; -- uint32_t i; -- int ignore_msg; -- -- for (iter = downlist_messages_head.next; -- iter != &downlist_messages_head; -- iter = iter->next) { -- -- cmp = list_entry(iter, struct downlist_msg, list); -- downlist_log("comparing", cmp); -- -- ignore_msg = 0; -- for (i = 0; i < cmp->left_nodes; i++) { -- if (cmp->nodeids[i] == api->totem_nodeid_get()) { -- log_printf (LOG_DEBUG, "Ignoring this entry because I'm in the left list\n"); -- -- ignore_msg = 1; -- break; -- } -- } -- -- if (ignore_msg) { -- continue ; -- } -- -- if (best == NULL) { -- best = cmp; -- continue; -- } -- -- best_members = best->old_members - best->left_nodes; -- cmp_members = cmp->old_members - cmp->left_nodes; -- -- if (cmp_members > best_members) { -- best = cmp; -- } else if (cmp_members == best_members) { -- if (cmp->old_members > best->old_members) { -- best = cmp; -- } else if (cmp->old_members == best->old_members) { -- if (cmp->sender_nodeid < best->sender_nodeid) { -- best = cmp; -- } -- } -- } -- } -- -- assert (best != NULL); -- -- return best; --} -- --static void downlist_master_choose_and_send (void) --{ -- struct downlist_msg *stored_msg; - struct list_head *iter; - struct process_info *left_pi; - qb_map_t *group_map; -@@ -884,14 +801,7 @@ static void downlist_master_choose_and_send (void) - qb_map_iter_t *miter; - int i, size; - -- downlist_state = CPG_DOWNLIST_APPLYING; -- -- stored_msg = downlist_master_choose (); -- if (!stored_msg) { -- log_printf (LOGSYS_LEVEL_DEBUG, "NO chosen downlist"); -- return; -- } -- downlist_log("chosen downlist", stored_msg); -+ downlist_log("my downlist", &g_req_exec_cpg_downlist); - - group_map = qb_skiplist_create(); - -@@ -905,9 +815,9 @@ static void downlist_master_choose_and_send (void) - iter = iter->next; - - left_pi = NULL; -- for (i = 0; i < stored_msg->left_nodes; i++) { -+ for (i = 0; i < g_req_exec_cpg_downlist.left_nodes; i++) { - -- if (pi->nodeid == stored_msg->nodeids[i]) { -+ if (pi->nodeid == g_req_exec_cpg_downlist.nodeids[i]) { - left_pi = pi; - break; - } -@@ -1039,23 +949,6 @@ static void joinlist_inform_clients (void) - joinlist_remove_zombie_pi_entries (); - } - --static void downlist_messages_delete (void) --{ -- struct downlist_msg *stored_msg; -- struct list_head *iter, *iter_next; -- -- for (iter = downlist_messages_head.next; -- iter != &downlist_messages_head; -- iter = iter_next) { -- -- iter_next = iter->next; -- -- stored_msg = list_entry(iter, struct downlist_msg, list); -- list_del (&stored_msg->list); -- free (stored_msg); -- } --} -- - static void joinlist_messages_delete (void) - { - struct joinlist_msg *stored_msg; -@@ -1076,7 +969,6 @@ static void joinlist_messages_delete (void) - - static char *cpg_exec_init_fn (struct corosync_api_v1 *corosync_api) - { -- list_init (&downlist_messages_head); - list_init (&joinlist_messages_head); - api = corosync_api; - return (NULL); -@@ -1338,43 +1230,9 @@ static void message_handler_req_exec_cpg_downlist( - unsigned int nodeid) - { - const struct req_exec_cpg_downlist *req_exec_cpg_downlist = message; -- int i; -- struct list_head *iter; -- struct downlist_msg *stored_msg; -- int found; -- -- if (downlist_state != CPG_DOWNLIST_WAITING_FOR_MESSAGES) { -- log_printf (LOGSYS_LEVEL_WARNING, "downlist left_list: %d received in state %d", -- req_exec_cpg_downlist->left_nodes, downlist_state); -- return; -- } -- -- stored_msg = malloc (sizeof (struct downlist_msg)); -- stored_msg->sender_nodeid = nodeid; -- stored_msg->old_members = req_exec_cpg_downlist->old_members; -- stored_msg->left_nodes = req_exec_cpg_downlist->left_nodes; -- memcpy (stored_msg->nodeids, req_exec_cpg_downlist->nodeids, -- req_exec_cpg_downlist->left_nodes * sizeof (mar_uint32_t)); -- list_init (&stored_msg->list); -- list_add (&stored_msg->list, &downlist_messages_head); -- -- for (i = 0; i < my_member_list_entries; i++) { -- found = 0; -- for (iter = downlist_messages_head.next; -- iter != &downlist_messages_head; -- iter = iter->next) { -- -- stored_msg = list_entry(iter, struct downlist_msg, list); -- if (my_member_list[i] == stored_msg->sender_nodeid) { -- found = 1; -- } -- } -- if (!found) { -- return; -- } -- } - -- downlist_master_choose_and_send (); -+ log_printf (LOGSYS_LEVEL_WARNING, "downlist left_list: %d received", -+ req_exec_cpg_downlist->left_nodes); - } - - --- -2.13.6 - diff --git a/bnc#872651-stop-cluster.patch b/bnc#872651-stop-cluster.patch deleted file mode 100644 index f1ec922..0000000 --- a/bnc#872651-stop-cluster.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- corosync-2.4.3.orig/init/corosync.service.in 2015-07-21 11:09:11.911660803 +0800 -+++ corosync-2.4.3/init/corosync.service.in 2015-07-21 13:25:08.239783189 +0800 -@@ -3,6 +3,7 @@ - ConditionKernelCommandLine=!nocluster - Requires=network-online.target - After=network-online.target -+StopWhenUnneeded=yes - - [Service] - ExecStart=@INITWRAPPERSDIR@/corosync start diff --git a/bnc#882449-corosync-conf-example.patch b/bnc#882449-corosync-conf-example.patch deleted file mode 100644 index 7ad7119..0000000 --- a/bnc#882449-corosync-conf-example.patch +++ /dev/null @@ -1,67 +0,0 @@ -Index: corosync-2.3.3/conf/corosync.conf.example -=================================================================== ---- corosync-2.3.3.orig/conf/corosync.conf.example -+++ corosync-2.3.3/conf/corosync.conf.example -@@ -9,6 +9,12 @@ totem { - crypto_cipher: none - crypto_hash: none - -+ # Limit generated nodeids to 31-bits (positive signed integers) -+ # you would set it to 'yes', the new option 'new' means wiping -+ # off the highest bit in network order to avoid possible nodeid -+ # conflicting. -+ clear_node_high_bit: yes -+ - # interface: define at least one interface to communicate - # over. If you define more than one interface stanza, you must - # also set rrp_mode. -@@ -58,8 +64,8 @@ logging { - to_stderr: no - # Log to a log file. When set to "no", the "logfile" option - # must not be set. -- to_logfile: yes -- logfile: /var/log/cluster/corosync.log -+ #to_logfile: no -+ #logfile: /var/log/cluster/corosync.log - # Log to the system log daemon. When in doubt, set to yes. - to_syslog: yes - # Log debug messages (very verbose). When in doubt, leave off. -@@ -77,5 +83,5 @@ logging { - quorum { - # Enable and configure quorum subsystem (default: off) - # see also corosync.conf.5 and votequorum.5 -- #provider: corosync_votequorum -+ provider: corosync_votequorum - } -Index: corosync-2.3.3/conf/corosync.conf.example.udpu -=================================================================== ---- corosync-2.3.3.orig/conf/corosync.conf.example.udpu -+++ corosync-2.3.3/conf/corosync.conf.example.udpu -@@ -5,6 +5,8 @@ totem { - crypto_cipher: none - crypto_hash: none - -+ clear_node_high_bit: yes -+ - interface { - ringnumber: 0 - bindnetaddr: 10.16.35.0 -@@ -16,9 +18,9 @@ totem { - - logging { - fileline: off -- to_logfile: yes -+ #to_logfile: no - to_syslog: yes -- logfile: /var/log/cluster/corosync.log -+ #logfile: /var/log/cluster/corosync.log - debug: off - timestamp: on - logger_subsys { -@@ -54,5 +56,5 @@ nodelist { - quorum { - # Enable and configure quorum subsystem (default: off) - # see also corosync.conf.5 and votequorum.5 -- #provider: corosync_votequorum -+ provider: corosync_votequorum - } diff --git a/bsc#1001164-corosync.conf-example.patch b/bsc#1001164-corosync.conf-example.patch deleted file mode 100644 index 75cdba8..0000000 --- a/bsc#1001164-corosync.conf-example.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- corosync-2.3.3.orig/conf/corosync.conf.example 2016-09-27 12:18:13.559737049 +0800 -+++ corosync-2.3.3/conf/corosync.conf.example 2016-09-27 14:29:41.952519958 +0800 -@@ -9,6 +9,26 @@ - crypto_cipher: none - crypto_hash: none - -+ # How long before declaring a token lost (ms) -+ token: 5000 -+ -+ # How many token retransmits before forming a new configuration -+ token_retransmits_before_loss_const: 10 -+ -+ # How long to wait for join messages in the membership protocol (ms) -+ join: 60 -+ -+ # How long to wait for consensus to be achieved before starting -+ # a new round of membership configuration (ms) -+ consensus: 6000 -+ -+ # Turn off the virtual synchrony filter -+ vsftype: none -+ -+ # Number of messages that may be sent by one processor on -+ # receipt of the token -+ max_messages: 20 -+ - # Limit generated nodeids to 31-bits (positive signed integers) - # you would set it to 'yes', the new option 'new' means wiping - # off the highest bit in network order to avoid possible nodeid diff --git a/bsc#1083561-upgrade-from-1-x-y.patch b/bsc#1083561-upgrade-from-1-x-y.patch new file mode 100644 index 0000000..4bc094c --- /dev/null +++ b/bsc#1083561-upgrade-from-1-x-y.patch @@ -0,0 +1,21 @@ +--- corosync-2.4.5/init/upgrade.sh 1970-01-01 08:00:00.000000000 +0800 ++++ corosync-2.4.5-new/init/upgrade.sh 2019-08-02 17:15:38.224559371 +0800 +@@ -0,0 +1,18 @@ ++#! /bin/bash ++CONFIG_FILE=/etc/corosync/corosync.conf ++CONFIG_FILE_OLD=/etc/corosync/corosync.conf.old ++ ++if [ -f $CONFIG_FILE ]; then ++ cp $CONFIG_FILE $CONFIG_FILE_OLD ++ #lots of operations ++ sed -i "/amf\ *{/,/\ *}/d" $CONFIG_FILE && \ ++ sed -i "/aisexec\ *{/,/\ *}/d" $CONFIG_FILE && \ ++ sed -i "/service\ *{/,/\ *}/d" $CONFIG_FILE && \ ++ #sed -i "/token:/,/max_messages:/d" $CONFIG_FILE && \ ++ sed -i "s/AMF/QUORUM/g" $CONFIG_FILE ++ if [ $? -ne 0 ]; then ++ cp $CONFIG_FILE_OLD $CONFIG_FILE ++ else ++ rm $CONFIG_FILE_OLD ++ fi ++fi diff --git a/corosync-2.3.4-fix-bashisms.patch b/corosync-2.3.4-fix-bashisms.patch deleted file mode 100644 index f58f577..0000000 --- a/corosync-2.3.4-fix-bashisms.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- corosync-2.3.5.orig/cts/agents/mem_leak_test.sh 2015-07-21 13:47:30.058803324 +0800 -+++ corosync-2.3.5/cts/agents/mem_leak_test.sh 2015-07-27 10:03:53.903380662 +0800 -@@ -41,14 +41,14 @@ - find $f | sed "s|\.|_|g" | sed "s|/|.|g" | while read l - do - echo $l.count u64 $COUNT >> $temp_file -- let COUNT="$COUNT+1" -+ COUNT="$COUNT+1" - done - - corosync-cmapctl -p $temp_file - corosync-cmapctl -D usr - done - AFTER=$(get_mem $TYPE) -- let DIFF="$AFTER - $BEFORE" -+ DIFF="$AFTER - $BEFORE" - rm -f $temp_file - #echo $f diff $TYPE $DIFF - echo $DIFF -@@ -76,11 +76,11 @@ - find /usr/bin | sed "s|\.|_|g" | sed "s|/|.|g" | while read l - do - corosync-cmapctl -s $l u32 $COUNT -- let COUNT="$COUNT+1" -+ COUNT="$COUNT+1" - done - corosync-cmapctl -D usr - AFTER=$(get_mem $TYPE) -- let DIFF="$AFTER - $BEFORE" -+ DIFF="$AFTER - $BEFORE" - echo $DIFF - - exit 0 diff --git a/corosync-2.4.4.tar.gz b/corosync-2.4.4.tar.gz deleted file mode 100644 index 5fb6742..0000000 --- a/corosync-2.4.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa1d27be34b23e31b7780748aa5baf01b2b5340c33e57f4f955496a047161161 -size 581496 diff --git a/corosync-2.4.5.tar.gz b/corosync-2.4.5.tar.gz new file mode 100644 index 0000000..4d9ba31 --- /dev/null +++ b/corosync-2.4.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab6eafdb8f43a23794fc15d4c5198bbd6759060cb13c8d2d1e78a6c8360aba5f +size 1255432 diff --git a/corosync-init-lockfile-path-error.patch b/corosync-init-lockfile-path-error.patch deleted file mode 100644 index b8f520b..0000000 --- a/corosync-init-lockfile-path-error.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- corosync-2.4.3.orig/init/corosync.in 2017-09-21 23:14:59.000000000 +0800 -+++ corosync-2.4.3/init/corosync.in 2017-10-23 12:09:54.209149758 +0800 -@@ -29,6 +29,7 @@ - success() - { - echo -ne "[ OK ]\r" -+ rtrn=0 - } - - failure() -@@ -109,6 +110,7 @@ - # they also assume that init scripts will create - # required subdirectories for proper operations - mkdir -p @LOCALSTATEDIR@/run -+ mkdir -p @LOCALSTATEDIR@/lock/subsys - - if status $prog > /dev/null 2>&1; then - success diff --git a/corosync-start-stop-level.patch b/corosync-start-stop-level.patch deleted file mode 100644 index a7f4a5e..0000000 --- a/corosync-start-stop-level.patch +++ /dev/null @@ -1,59 +0,0 @@ -From b827e7f33fee652a79713d302aa9be56b456fa7d Mon Sep 17 00:00:00 2001 -From: Bin Liu -Date: Wed, 19 Oct 2016 15:59:17 +0800 -Subject: [PATCH] modify default run level for corosync daemons - ---- - init/corosync-qdevice.in | 4 ++-- - init/corosync-qnetd.in | 4 ++-- - init/corosync.in | 4 ++-- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/init/corosync-qdevice.in b/init/corosync-qdevice.in -index 913e033..4949c4e 100755 ---- a/init/corosync-qdevice.in -+++ b/init/corosync-qdevice.in -@@ -13,8 +13,8 @@ - # Provides: corosync-qdevice - # Required-Start: $corosync - # Required-Stop: $corosync --# Default-Start: --# Default-Stop: -+# Default-Start: 3 -+# Default-Stop: 1 - # Short-Description: Starts and stops Corosync Qdevice daemon. - # Description: Starts and stops Corosync Qdevice daemon. - ### END INIT INFO -diff --git a/init/corosync-qnetd.in b/init/corosync-qnetd.in -index 15d30ea..ed73ee0 100755 ---- a/init/corosync-qnetd.in -+++ b/init/corosync-qnetd.in -@@ -13,8 +13,8 @@ - # Provides: corosync-qnetd - # Required-Start: $network $syslog - # Required-Stop: $network $syslog --# Default-Start: --# Default-Stop: -+# Default-Start: 3 -+# Default-Stop: 1 - # Short-Description: Starts and stops Corosync Qdevice Network daemon. - # Description: Starts and stops Corosync Qdevice Network daemon. - ### END INIT INFO -diff --git a/init/corosync.in b/init/corosync.in -index c93f971..366b5d6 100755 ---- a/init/corosync.in -+++ b/init/corosync.in -@@ -14,8 +14,8 @@ - # Provides: corosync - # Required-Start: $network $syslog - # Required-Stop: $network $syslog --# Default-Start: --# Default-Stop: -+# Default-Start: 3 -+# Default-Stop: 1 - # Short-Description: Starts and stops Corosync Cluster Engine. - # Description: Starts and stops Corosync Cluster Engine. - ### END INIT INFO --- -2.6.6 - diff --git a/corosync.changes b/corosync.changes index bb37ff9..4fd3d60 100644 --- a/corosync.changes +++ b/corosync.changes @@ -1,4 +1,29 @@ ------------------------------------------------------------------- + +Fri Aug 2 09:39:35 UTC 2019 - Yuan Ren + +- corosync-2.4.5 upgrade(bsc#1144200) + block_unlisted_ips block package from ips not in nodelist + Qnetd now supports updated NSS database format + Partly fixed problem with ifdown (only for UDPU) + Remove: 0001-coroapi-Use-size_t-for-private_data_size.patch + Remove: 0002-fix-ifdown-udp.patch + Remove: 0003-fix-tmpfiles-create.patch + Remove: 0004-mark-corosync-as-a-static-service.patch + Remove: 0005-do-not-convert-empty-uid-gid-to-0.patch + Remove: 0009-bsc#1088619-add-version.patch + Remove: 0010-qdevice-net-instance.c-optarg-should-be-str.patch + Remove: 0011-NSS_NoDB_Init-the-parameter-is-reserved-must-be-NULL.patch + Remove: 0012-cpg-Inform-clients-about-left-nodes-during-pause.patch + Remove: bnc#872651-stop-cluster.patch + Remove: bnc#882449-corosync-conf-example.patch + Remove: bsc#1001164-corosync.conf-example.patch + Remove: bsc#1141536-corosync-qdevice-Nss-new-database-files.patch + Remove: corosync-2.3.4-fix-bashisms.patch + Remove: corosync-init-lockfile-path-error.patch + Remove: corosync-start-stop-level.patch + +------------------------------------------------------------------- Wed May 2 02:36:56 UTC 2018 - bliu@suse.com - cpg: Inform clients about left nodes during pause(bsc#1091593) diff --git a/corosync.spec b/corosync.spec index 1f1e6a4..328a472 100644 --- a/corosync.spec +++ b/corosync.spec @@ -1,7 +1,7 @@ # # spec file for package corosync # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -50,30 +50,14 @@ Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces License: BSD-3-Clause Group: Productivity/Clustering/HA -Version: 2.4.4 +Version: 2.4.5 Release: 0 Url: http://corosync.github.io/corosync/ Source0: %{name}-%{version}.tar.gz Source2: baselibs.conf -Patch1: corosync-init-lockfile-path-error.patch -Patch2: bnc#872651-stop-cluster.patch -Patch3: bnc#882449-corosync-conf-example.patch -Patch4: corosync-2.3.4-fix-bashisms.patch -Patch5: bsc#1001164-corosync.conf-example.patch -Patch6: corosync-start-stop-level.patch -Patch7: disable-build-html-docs.patch -Patch8: 0001-coroapi-Use-size_t-for-private_data_size.patch -Patch9: 0002-fix-ifdown-udp.patch -Patch10: 0003-fix-tmpfiles-create.patch -Patch11: 0004-mark-corosync-as-a-static-service.patch -Patch12: 0005-do-not-convert-empty-uid-gid-to-0.patch -Patch13: 0006-Fix-compile-warnings-with-GCC-7.2.1.patch -Patch14: 0007-add-config-for-corosync-qnetd.patch -Patch15: 0008-bsc#1083561-upgrade-from-1-x-y.patch -Patch16: 0009-bsc#1088619-add-version.patch -Patch17: 0010-qdevice-net-instance.c-optarg-should-be-str.patch -Patch18: 0011-NSS_NoDB_Init-the-parameter-is-reserved-must-be-NULL.patch -Patch19: 0012-cpg-Inform-clients-about-left-nodes-during-pause.patch +Patch1: bsc#1083561-upgrade-from-1-x-y.patch +Patch2: 0001-disable-build-html-docs.patch +Patch3: 0002-Fix-compile-warnings-with-GCC-7.2.1.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # openais is indeed gone and should be uninstalled. Yes, we do not @@ -142,22 +126,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 %build %if %{with runautogen} diff --git a/disable-build-html-docs.patch b/disable-build-html-docs.patch deleted file mode 100644 index 61bae63..0000000 --- a/disable-build-html-docs.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- corosync-2.4.2.orig/configure.ac 2016-11-08 00:39:12.000000000 +0800 -+++ corosync-2.4.2/configure.ac 2016-12-06 16:43:05.586962439 +0800 -@@ -726,7 +726,8 @@ - AM_CONDITIONAL(AUGTOOL, test -n "${AUGTOOL}") - AC_SUBST([NSS_LDFLAGS]) - --AM_CONDITIONAL(BUILD_HTML_DOCS, test -n "${GROFF}") -+AM_CONDITIONAL(BUILD_HTML_DOCS, false) -+#AM_CONDITIONAL(BUILD_HTML_DOCS, test -n "${GROFF}") - - AC_SUBST([LINT_FLAGS]) -