From 8b7976e6e79a76e8abd7a43667a290fbe38d9854 Mon Sep 17 00:00:00 2001 From: zouzhimin Date: Thu, 29 Feb 2024 22:02:42 +0800 Subject: [PATCH] configure: Fix building of rust for release --- Fix-building-of-rust-for-release.patch | 33 ++++++++++++++++++++++++++ corosync.spec | 6 ++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 Fix-building-of-rust-for-release.patch diff --git a/Fix-building-of-rust-for-release.patch b/Fix-building-of-rust-for-release.patch new file mode 100644 index 0000000..f0164b5 --- /dev/null +++ b/Fix-building-of-rust-for-release.patch @@ -0,0 +1,33 @@ +From 2fcda76b96b43ff2a0a8d7c175750ce2ecb0dca8 Mon Sep 17 00:00:00 2001 +From: Jan Friesse +Date: Mon, 27 Nov 2023 11:17:18 +0100 +Subject: [PATCH] configure: Fix building of rust for release + +Set rustver correctly for both release version string +(for example 3.1.7) and git one (3.1.7.1-982f). + +corosyncrustver must be escaped by '[]' because sed is using these two +characters and m4 would remove them. + +Signed-off-by: Jan Friesse +Reviewed-by: Fabio M. Di Nitto +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 7a9e4200..dfa9267f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -46,7 +46,7 @@ AC_ARG_ENABLE([rust-bindings], + [AS_HELP_STRING([--enable-rust-bindings],[rust bindings support])],, + [ enable_rust_bindings="no" ]) + AM_CONDITIONAL([BUILD_RUST_BINDINGS], [test x$enable_rust_bindings = xyes]) +-corosyncrustver="`echo ${VERSION} | sed 's/\(.*\)\./\1-/'`" ++corosyncrustver=["`echo ${VERSION} | sed 's/\.\([^-\.]*-\)/-\1/'`"] + AC_SUBST([corosyncrustver]) + + dnl Fix default variables - "prefix" variable if not specified +-- +2.25.1 + diff --git a/corosync.spec b/corosync.spec index f37b6f5..a0571ec 100644 --- a/corosync.spec +++ b/corosync.spec @@ -18,12 +18,13 @@ Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces Version: 3.1.8 -Release: 3 +Release: 4 License: BSD-3-Clause URL: http://corosync.github.io/corosync/ Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz Patch0: Fix-up-the-library-versions-files.patch Patch1: Report-crypto-errors-back-to-cfg-reload.patch +Patch2: Fix-building-of-rust-for-release.patch # Runtime bits # The automatic dependency overridden in favor of explicit version lock @@ -290,6 +291,9 @@ network splits) %endif %changelog +* Fri Mar 01 2024 zouzhimin - 3.1.8-4 +- configure: Fix building of rust for release + * Tue Feb 27 2024 zouzhimin - 3.1.8-3 - Report crypto errors back to cfg reload -- Gitee