From be40971ad7542f30681d2150d38305fa4c50f523 Mon Sep 17 00:00:00 2001 From: zhanchengbin Date: Wed, 7 Sep 2022 18:36:27 +0800 Subject: [PATCH] SC2081: [ .. ] can't match globs. Use [[ .. ]] or grep. Shellcheck check out a problem. Signed-off-by: zhanchengbin --- ...SC2081-can-t-match-globs-Use-or-grep.patch | 34 +++++++++++++++++++ glusterfs.spec | 6 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0003-SC2081-can-t-match-globs-Use-or-grep.patch diff --git a/0003-SC2081-can-t-match-globs-Use-or-grep.patch b/0003-SC2081-can-t-match-globs-Use-or-grep.patch new file mode 100644 index 0000000..833b91b --- /dev/null +++ b/0003-SC2081-can-t-match-globs-Use-or-grep.patch @@ -0,0 +1,34 @@ +From 396f52a60bbe5eba0075b1658d84e46cbf7461ab Mon Sep 17 00:00:00 2001 +From: zhanchengbin +Date: Thu, 13 Oct 2022 10:34:52 +0800 +Subject: [PATCH] SC2081: [ .. ] can't match globs. Use [[ .. ]] or grep. + +Shellcheck check out a problem. + +Signed-off-by: zhanchengbin +--- + .../add-brick/post/disabled-quota-root-xattr-heal.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh b/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh +index ca17a90..969d6fc 100755 +--- a/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh ++++ b/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + + ##--------------------------------------------------------------------------- + ## This script updates the 'limit-set' xattr on the newly added node. Please +@@ -106,7 +106,7 @@ ENABLED_STATE_1="${GLUSTERD_WORKDIR}/hooks/${VERSION}/${VOLUME_OP}/" + ENABLED_STATE_2="post/${ENABLED_NAME_PREFIX}${VOL_NAME}-${ENABLED_NAME}" + ENABLED_STATE="${ENABLED_STATE_1}${ENABLED_STATE_2}" + +-if [ "${THIS_SCRIPT}" != *"${VOL_NAME}"* ]; then ++if [[ "${THIS_SCRIPT}" != *"${VOL_NAME}"* ]]; then + exit 0 + fi + +-- +2.37.3 + diff --git a/glusterfs.spec b/glusterfs.spec index 9953fb5..a7a0dbd 100644 --- a/glusterfs.spec +++ b/glusterfs.spec @@ -3,7 +3,7 @@ Name: glusterfs Version: 7.0 -Release: 8 +Release: 9 License: GPLv2 and LGPLv3+ Summary: Aggregating distributed file system URL: http://docs.gluster.org/ @@ -13,6 +13,7 @@ Source7: glusterfsd.service Patch0: 0000-core-fix-memory-pool-management-races.patch Patch1: 0001-geo-rep-Fix-the-name-of-changelog-archive-file.patch Patch2: 0002-upcall-internal.c-fix-debug-log-message-3651.patch +Patch3: 0003-SC2081-can-t-match-globs-Use-or-grep.patch BuildRequires: systemd bison flex gcc make libtool ncurses-devel readline-devel libattr-devel BuildRequires: libxml2-devel openssl-devel libaio-devel libacl-devel python3-devel git perl @@ -461,6 +462,9 @@ exit 0 %{_mandir}/man8/*gluster*.8* %changelog +* Wed Sep 7 2022 zhanchengbin - 7.0-9 +- SC2081: [ .. ] can't match globs. Use [[ .. ]] or grep. + * Tue Aug 9 2022 liwenchong - 7.0-8 - fix debug log message -- Gitee