diff --git a/pyporter/pyporter.py b/pyporter/pyporter.py index 448fcdfef278d08aa49a5ac1cba124038d484d59..fcd06caf3c495b1cc79b208070252ab2d8059674 100755 --- a/pyporter/pyporter.py +++ b/pyporter/pyporter.py @@ -540,20 +540,23 @@ def build_spec(porter, output): print("if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi") print("pushd %{buildroot}") print("if [ -d usr/lib ]; then") - print("\tfind usr/lib -type f -printf \"/%h/%f\\n\" >> filelist.lst") + # we double quota the path for the case: + # whitespace in filename or dirname + # see: https://rpm-list.redhat.narkive.com/7WUOZXa6/basic-question-space-in-file-name + print("\tfind usr/lib -type f -printf \"\\\"/%h/%f\\\"\\n\" >> filelist.lst") print("fi") print("if [ -d usr/lib64 ]; then") - print("\tfind usr/lib64 -type f -printf \"/%h/%f\\n\" >> filelist.lst") + print("\tfind usr/lib64 -type f -printf \"\\\"/%h/%f\\\"\\n\" >> filelist.lst") print("fi") print("if [ -d usr/bin ]; then") - print("\tfind usr/bin -type f -printf \"/%h/%f\\n\" >> filelist.lst") + print("\tfind usr/bin -type f -printf \"\\\"/%h/%f\\\"\\n\" >> filelist.lst") print("fi") print("if [ -d usr/sbin ]; then") - print("\tfind usr/sbin -type f -printf \"/%h/%f\\n\" >> filelist.lst") + print("\tfind usr/sbin -type f -printf \"\\\"/%h/%f\\\"\\n\" >> filelist.lst") print("fi") print("touch doclist.lst") print("if [ -d usr/share/man ]; then") - print("\tfind usr/share/man -type f -printf \"/%h/%f.gz\\n\" >> doclist.lst") + print("\tfind usr/share/man -type f -printf \"\\\"/%h/%f.gz\\\"\\n\" >> doclist.lst") print("fi") print("popd") print("mv %{buildroot}/filelist.lst .")