!66 [sync] PR-65: 【Mainline】Avoid truncate trailer space and do not escape backslash when read filename

From: @openeuler-sync-bot 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
This commit is contained in:
openeuler-ci-bot 2024-07-25 06:13:01 +00:00 committed by Gitee
commit b008ffa262
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,48 @@
From 7b54410319d5d46e3c098237d1574c711269e90e Mon Sep 17 00:00:00 2001
From: yixiangzhike <yixiangzhike007@163.com>
Date: Mon, 22 Jul 2024 19:36:14 +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 30955c0..a7504d3 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
# on fedora 33, centos 7, 8, the root directory "/" is owned by filesystem package
# but for rpmrebuild, BUILDROOT is juste a symlink, not a directory (cf RpmBuild in rpmrebuild.sh)
@@ -257,6 +257,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 04d62ea..c646842 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.18
Release: 5
Release: 6
Summary: A tool to build a rpm file from the rpm database
License: GPLv2+
URL: http://rpmrebuild.sourceforge.net
@ -9,6 +9,7 @@ Source0: https://downloads.sourceforge.net/rpmrebuild/%{name}-%{version}.
Patch6000: backport-Set-the-directory-mode-to-instead-of-omit.patch
Patch9000: Add-macros-_binaries_in_noarch_packages_terminate_bu.patch
Patch9001: Avoid-truncate-trailer-space-and-do-not-escape-backslash-when-read-filename.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -60,6 +61,9 @@ rm -rf $RPM_BUILD_ROOT%{_mandir}/fr_FR.UTF-8/man1/
%{_mandir}/fr/man1/*.gz
%changelog
* Wed Jul 24 2024 yixiangzhike <yixiangzhike007@163.com> - 2.18-6
- avoid truncate trailer space and do not escape backslash when read filename
* Fri Jan 19 2024 dongyuzhen <dongyuzhen@h-partners.com> - 2.18-5
- revert: remove the require to rpm-build.For consistency with other community-released dependencies