corosync/Fix-building-of-rust-for-release.patch
2024-02-29 22:02:42 +08:00

34 lines
1.1 KiB
Diff

From 2fcda76b96b43ff2a0a8d7c175750ce2ecb0dca8 Mon Sep 17 00:00:00 2001
From: Jan Friesse <jfriesse@redhat.com>
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 <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
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