From d6b7903032507b0aace4780e2010a1cee24be246 Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Thu, 2 Sep 2021 22:51:29 +0900 Subject: [PATCH] autoconf: allow Release to contain hyphen To avoid clashing with tags and releases, we'll use "zfs-macOS". Meta: 1 Name: zfs-macOS Reviewed-by: John Kennedy Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Signed-off-by: Jorgen Lundman Closes #12437 --- config/zfs-meta.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/zfs-meta.m4 b/config/zfs-meta.m4 index b3c1befaac..1c9d246124 100644 --- a/config/zfs-meta.m4 +++ b/config/zfs-meta.m4 @@ -73,14 +73,14 @@ AC_DEFUN([ZFS_AC_META], [ if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then _match="${ZFS_META_NAME}-${ZFS_META_VERSION}" _alias=$(git describe --match=${_match} 2>/dev/null) - _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') + _release=$(echo ${_alias}|sed "s/${ZFS_META_NAME}//"|cut -f3- -d'-'|sed 's/-/_/g') if test -n "${_release}"; then ZFS_META_RELEASE=${_release} _zfs_ac_meta_type="git describe" else _match="${ZFS_META_NAME}-${ZFS_META_VERSION}-${ZFS_META_RELEASE}" _alias=$(git describe --match=${_match} 2>/dev/null) - _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') + _release=$(echo ${_alias}|sed 's/${ZFS_META_NAME}//'|cut -f3- -d'-'|sed 's/-/_/g') if test -n "${_release}"; then ZFS_META_RELEASE=${_release} _zfs_ac_meta_type="git describe"