Hi,maintainer:
I found that the current version of rpmrebuild does not build successfully when dealing with some packages, such as giac-doc and deco-archive.You can easily verify this out using fedora 40,like in my screenshot.
The reason is that in the rpmrebuild_files.sh file, the read command cannot read filenames containing spaces and special characters. giac-doc contains filenames with spaces, and deco-archive contains filenames with “\”.
Problem code in rpmrebuild_files.sh file:
while :; do
read file_type
[ -z "$file_type" ] && break
read file_flags
read file_perm
read file_user
read file_group
read file_verify
read file_lang
read file_cap
read file
My mentor yixiangzhike provided a fix that allows the read command to read these special symbols:
1. Mask the built-in IFS separator (the default separator is <space><tab><newline>) when read reads a filename, back up the IFS and set IFS=“” before reading, and restore the old setting after reading. In this way the space at the end of the filename will be preserved when read reads the filename.
2. For directory names that contain the special character '\', change the command “read file” to “read -r file”.
Fix:</newline></tab></space>
read file_verify
read file_lang
read file_cap
Will upstream adopt the fix?
Anonymous
Oops, I may have had some formatting issues when I was editing the issue, I'm very sorry. Please see the patch for the exact fix!
Last edit: yuzhen Dong 2024-09-04
the code has been merged into the devel branch, and will be in next 2.19 release
the new 2.19 release includes this bugfix
thanks to report and for the patch