diff --git a/0002-replace-obsolescent-command-egrep.patch b/0002-replace-obsolescent-command-egrep.patch new file mode 100644 index 0000000000000000000000000000000000000000..4a884c9be5eb9f8a5679f0c48fbd2f34633dba32 --- /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 e91f7015e55d7c6fa8f125edd479d6a43069590f..11b90d1c9e55ec64fdeb9cbb339293bdcc20b709 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