summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangpeng <wangpengb@uniontech.com>2023-01-06 09:49:50 +0800
committerMichal Domonkos <mdomonko@redhat.com>2023-03-13 15:32:25 +0100
commit53cb48224421a74aa4d0dc3c378420599fdaa152 (patch)
tree109e301a2d4d3cd9ea4d9501d84bc01171d6aebd
parente12ad60e5017a5e6b1133fa8f4c9e2c09f6f9b3a (diff)
downloadrpm-53cb48224421a74aa4d0dc3c378420599fdaa152.tar.gz
Quote source file names in %setup
Resolves: #2335 Signed-off-by: wangpeng <wangpengb@uniontech.com> Co-authored-by Florian Festi <ffesti@redhat.com> (cherry picked from commit 71dedfd2f434ea54fc3a920e4b44a8737ba6cb25)
-rw-r--r--build/parsePrep.c2
-rw-r--r--tests/rpmspec.at2
2 files changed, 2 insertions, 2 deletions
diff --git a/build/parsePrep.c b/build/parsePrep.c
index 0aec1aecc..3f283db79 100644
--- a/build/parsePrep.c
+++ b/build/parsePrep.c
@@ -136,7 +136,7 @@ static char *doUntar(rpmSpec spec, uint32_t c, int quietly)
}
buf = rpmExpand("%{__rpmuncompress} -x ",
- quietly ? "" : "-v ", sp->path, NULL);
+ quietly ? "" : "-v ","%{shescape:", sp->path, "}", NULL);
rstrcat(&buf,
"\nSTATUS=$?\n"
"if [ $STATUS -ne 0 ]; then\n"
diff --git a/tests/rpmspec.at b/tests/rpmspec.at
index 5dfd18d5a..f488a5ed5 100644
--- a/tests/rpmspec.at
+++ b/tests/rpmspec.at
@@ -327,7 +327,7 @@ Simple rpm demonstration.
%prep
cd '/build/BUILD'
rm -rf 'hello-1.0'
-/usr/lib/rpm/rpmuncompress -x /build/SOURCES/hello-1.0.tar.gz
+/usr/lib/rpm/rpmuncompress -x '/build/SOURCES/hello-1.0.tar.gz'
STATUS=$?
if [ $STATUS -ne 0 ]; then
exit $STATUS