rpmrebuild/Fix-missing-trailer-space-and-do-not-treat-backslash-as-escape-char.patch

34 lines
1003 B
Diff

From 58f8f36e276432f47e04fed8e14aaef23a5efa06 Mon Sep 17 00:00:00 2001
From: yixiangzhike <yixiangzhike007@163.com>
Date: Fri, 16 Aug 2024 14:01:15 +0800
Subject: [PATCH] Fix missing trailer space and do not treat backslash as
escape char
Trailer space may be part of filename.
Character backslash may be part of filename also.
---
rpmrebuild_files.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/rpmrebuild_files.sh b/rpmrebuild_files.sh
index 30955c0..7329742 100755
--- a/rpmrebuild_files.sh
+++ b/rpmrebuild_files.sh
@@ -83,7 +83,12 @@ while :; do
read file_verify
read file_lang
read file_cap
- read file
+ # Trailer space may be part of filename.
+ OLD_IFS="$IFS"
+ IFS=""
+ # Character backslash may be part of filename also.
+ read -r file
+ IFS="$OLD_IFS"
# 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)
--
2.33.0