From 717d9b4ec0337d94cd575aeebc0a6a483655ee9a Mon Sep 17 00:00:00 2001 From: zhangtao2020 <18066722603@163.com> Date: Tue, 15 Jun 2021 14:34:50 +0800 Subject: [PATCH] bugfix invalid variable name (cherry picked from commit e2dc2f262458bc7474878f674b186dd217b065e1) --- 0001-bugfix-invalid-variable-name.patch | 36 +++++++++++++++++++++++++ hadoop-3.1.spec | 7 ++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-bugfix-invalid-variable-name.patch diff --git a/0001-bugfix-invalid-variable-name.patch b/0001-bugfix-invalid-variable-name.patch new file mode 100644 index 0000000..1aecf47 --- /dev/null +++ b/0001-bugfix-invalid-variable-name.patch @@ -0,0 +1,36 @@ +diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh +index bcb8158..e207519 100755 +--- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh ++++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh +@@ -2355,6 +2355,9 @@ function hadoop_verify_user_perm + declare command=$2 + declare uvar + ++ if [[ $command =~ \. ]];then ++ return 1 ++ fi + uvar=$(hadoop_build_custom_subcmd_var "${program}" "${command}" USER) + + if [[ -n ${!uvar} ]]; then +@@ -2381,7 +2384,9 @@ function hadoop_need_reexec + declare uvar + + # we've already been re-execed, bail +- ++ if [[ $command =~ \. ]];then ++ return 1 ++ fi + if [[ "${HADOOP_REEXECED_CMD}" = true ]]; then + return 1 + fi +@@ -2421,7 +2426,9 @@ function hadoop_subcommand_opts + if [[ -z "${program}" || -z "${command}" ]]; then + return 1 + fi +- ++ if [[ $command =~ \. ]];then ++ return 1 ++ fi + # bash 4 and up have built-in ways to upper and lower + # case the contents of vars. This is faster than + # calling tr. diff --git a/hadoop-3.1.spec b/hadoop-3.1.spec index 7f9a949..e09d342 100644 --- a/hadoop-3.1.spec +++ b/hadoop-3.1.spec @@ -12,7 +12,7 @@ %define _binaries_in_noarch_packages_terminate_build 0 Name: hadoop-3.1 Version: 3.1.4 -Release: 7 +Release: 8 Summary: A software platform for processing vast amounts of data # The BSD license file is missing # https://issues.apache.org/jira/browse/HADOOP-9849 @@ -33,6 +33,8 @@ Source11: %{real_name}-hdfs-site.xml Source12: %{real_name}-mapred-site.xml Source13: %{real_name}-yarn-site.xml +Patch0001: 0001-bugfix-invalid-variable-name.patch + BuildRoot: %{_tmppath}/%{real_name}-%{version}-%{release}-root BuildRequires: java-1.8.0-openjdk-devel maven hostname maven-local tomcat cmake snappy openssl-devel BuildRequires: cyrus-sasl-devel chrpath systemd protobuf2-compiler protobuf2-devel protobuf2-java protobuf2 @@ -1109,6 +1111,9 @@ fi %config(noreplace) %{_sysconfdir}/%{real_name}/container-executor.cfg %changelog +* Tue Jun 15 2021 zhangtao - 3.1.4-8 +- bugfix invalid variable name + * Wed May 11 2021 Ge Wang -3.1.4-7 - Remove redundancy install requires -- Gitee