From f7b6454a1727e55c8559eacf914c226e420202cf Mon Sep 17 00:00:00 2001 From: zmr_2020 Date: Mon, 8 May 2023 14:20:41 +0800 Subject: [PATCH] replace obsolescent command egrep --- 0002-replace-obsolescent-command-egrep.patch | 25 ++++++++++++++++++++ kafka.spec | 6 ++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0002-replace-obsolescent-command-egrep.patch diff --git a/0002-replace-obsolescent-command-egrep.patch b/0002-replace-obsolescent-command-egrep.patch new file mode 100644 index 0000000..4a884c9 --- /dev/null +++ b/0002-replace-obsolescent-command-egrep.patch @@ -0,0 +1,25 @@ +From f1d3e864769be5a15dda27d0c26cfc1f9efc4d6e Mon Sep 17 00:00:00 2001 +From: zmr_2020 +Date: Sat, 6 May 2023 08:12:29 +0800 +Subject: [PATCH] replace obsolescent command egrep + +--- + bin/kafka-run-class.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh +index 3889be7..7634bad 100755 +--- a/bin/kafka-run-class.sh ++++ b/bin/kafka-run-class.sh +@@ -38,7 +38,7 @@ should_include_file() { + return 0 + fi + file=$1 +- if [ -z "$(echo "$file" | egrep "$regex")" ] ; then ++ if [ -z "$(echo "$file" | grep -E "$regex")" ] ; then + return 0 + else + return 1 +-- +2.33.0 + diff --git a/kafka.spec b/kafka.spec index e91f701..11b90d1 100644 --- a/kafka.spec +++ b/kafka.spec @@ -4,7 +4,7 @@ Name: kafka Version: 2.8.2 -Release: 1 +Release: 2 Summary: A Distributed Streaming Platform. License: Apache-2.0 @@ -13,6 +13,7 @@ Source1: https://mirrors.huaweicloud.com/gradle/gradle-6.8.1-all.zip Source2: kafka.service Source3: gradle-wrapper.jar Patch0: 0001-adopt-huaweimaven.patch +Patch1: 0002-replace-obsolescent-command-egrep.patch BuildRequires: systemd java-1.8.0-openjdk-devel Provides: kafka = %{version} @@ -64,6 +65,9 @@ cp -pr licenses/* $RPM_BUILD_ROOT%{kafka_home}/licenses rm -rf %{buildroot} %changelog +* Mon May 08 2023 zmr_2020 - 2.8.2-2 +- replace obsolescent command egrep + * Sat Sep 24 2022 xiexing - 2.8.2-1 - fix CVE-2022-34917 -- Gitee