!72 【openEuler-20.03-LTS-SP4】revert "avoid truncate trailer space and do not escape backslash when read filename"

From: @yixiangzhike 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
This commit is contained in:
openeuler-ci-bot 2024-08-01 12:12:45 +00:00 committed by Gitee
commit 2570c4b47e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 50 deletions

View File

@ -1,48 +0,0 @@
From ee1f29b3de1fec015e10a2c45b31ce18d871c300 Mon Sep 17 00:00:00 2001
From: yixiangzhike <yixiangzhike007@163.com>
Date: Thu, 25 Jul 2024 14:48:56 +0800
Subject: [PATCH] avoid truncate trailer space and do not escape
backslash when read filename
---
rpmrebuild_files.sh | 4 ++--
rpmrebuild_rpmqf.src | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/rpmrebuild_files.sh b/rpmrebuild_files.sh
index 2088743..3d861fe 100755
--- a/rpmrebuild_files.sh
+++ b/rpmrebuild_files.sh
@@ -83,7 +83,7 @@ while :; do
read file_verify
read file_lang
read file_cap
- read file
+ read -r file
# bash 2 syntaxe
#[[ $file = *\** ]] && file=$(echo "$file"|sed 's/\*/\\*/')
@@ -249,6 +249,6 @@ while :; do
esac
fi
- echo "${miss_str}${lang_str}${dir_str}${fflags_str}${attr_str}${caps_str}${verify_str}\"${file}\""
+ echo "${miss_str}${lang_str}${dir_str}${fflags_str}${attr_str}${caps_str}${verify_str}${file}"
done || Critical "$MY_BASENAME done"
exit 0
diff --git a/rpmrebuild_rpmqf.src b/rpmrebuild_rpmqf.src
index 2e5db9a..968c195 100755
--- a/rpmrebuild_rpmqf.src
+++ b/rpmrebuild_rpmqf.src
@@ -137,7 +137,7 @@ echo '[%{FILEMODES:perms}\
%{FILEVERIFYFLAGS:octal}\
%{FILELANGS}\
%{FILECAPS}\
-%{FILENAMES}\
+\"%{FILENAMES}\"\
]'
}
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: rpmrebuild
Version: 2.15
Release: 5
Release: 6
Summary: A tool to build a rpm file from the rpm database
License: GPLv2+
URL: http://rpmrebuild.sourceforge.net
@ -9,7 +9,6 @@ Source0: https://downloads.sourceforge.net/rpmrebuild/%{name}-%{version}.
Patch9000: bugfix-reset-defattr-when-users-want-to-keep-files-permissi.patch
Patch9001: fix-k-may-not-keep-uid-or-gid.patch
Patch9002: fix-errors-found-from-shellcheck-scan.patch
Patch9003: Avoid-truncate-trailer-space-and-do-not-escape-backslash-when-read-filename.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -61,6 +60,12 @@ rm -rf $RPM_BUILD_ROOT%{_mandir}/fr_FR.UTF-8/man1/
%{_mandir}/fr/man1/*.gz
%changelog
* Thu Aug 1 2024 yixiangzhike <yixiangzhike007@163.com> - 2.15-6
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:revert "avoid truncate trailer space and do not escape backslash when read filename"
* Thu Jul 25 2024 yixiangzhike <yixiangzhike007@163.com> - 2.15-5
- Type:bugfix
- CVE:NA