!69 【openEuler-20.03-LTS-SP4】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:
commit
c6d73928ac
@ -0,0 +1,48 @@
|
|||||||
|
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
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: rpmrebuild
|
Name: rpmrebuild
|
||||||
Version: 2.15
|
Version: 2.15
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: A tool to build a rpm file from the rpm database
|
Summary: A tool to build a rpm file from the rpm database
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://rpmrebuild.sourceforge.net
|
URL: http://rpmrebuild.sourceforge.net
|
||||||
@ -9,6 +9,7 @@ Source0: https://downloads.sourceforge.net/rpmrebuild/%{name}-%{version}.
|
|||||||
Patch9000: bugfix-reset-defattr-when-users-want-to-keep-files-permissi.patch
|
Patch9000: bugfix-reset-defattr-when-users-want-to-keep-files-permissi.patch
|
||||||
Patch9001: fix-k-may-not-keep-uid-or-gid.patch
|
Patch9001: fix-k-may-not-keep-uid-or-gid.patch
|
||||||
Patch9002: fix-errors-found-from-shellcheck-scan.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)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -60,6 +61,12 @@ rm -rf $RPM_BUILD_ROOT%{_mandir}/fr_FR.UTF-8/man1/
|
|||||||
%{_mandir}/fr/man1/*.gz
|
%{_mandir}/fr/man1/*.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 25 2024 yixiangzhike <yixiangzhike007@163.com> - 2.15-5
|
||||||
|
- Type:bugfix
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:avoid truncate trailer space and do not escape backslash when read filename
|
||||||
|
|
||||||
* Fri Jan 12 2024 dongyuzhen <dongyuzhen@h-partners.com> - 2.15-4
|
* Fri Jan 12 2024 dongyuzhen <dongyuzhen@h-partners.com> - 2.15-4
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user