#30 Source URLs cannot include whitespaces
Closed: Invalid Opened by cqi.

This was reported by @cwickert in ticket.

I know that whitespaces in file names are a very bad idea, but they are out there and sometimes we need to build from them.

Imagine you have a SourceX that with a whitespace, e.g. "Concept Design.zip". The Source URL then becomes ​http://mypaintatelier.googlecode.com/files/Concept%20Design.zip

Works fine for rpmbuild and spectool. After downloading the file with spectool I uploaded it with 'fedpkg upload Concept%20Design.zip'. The URL of the file becomes ​http://pkgs.fedoraproject.org/repo/pkgs/mypaint/Concept%2520Design.zip/fdd6b6f028d1ce9240ea084403d15ec4/Concept%2520Design.zip instead of ​http://pkgs.fedoraproject.org/repo/pkgs/mypaint/Concept%20Design.zip/fdd6b6f028d1ce9240ea084403d15ec4/Concept%2520Design.zip

%20 becomes %2520 and therefor koji cannot download the package. Currently the only solution is to rename the file to something without whitespace.

If you want to reproduce this, use the files from ​http://pkgs.fedoraproject.org/gitweb/?p=mypaint.git;a=tree;h=310d6e36f2e70b4699b290165dc7e27391014b1f;hb=ee08b1bc5e2697696ca8a146910880a923b5f0da


rpmdevtools should be the right place to fix this issue.

First, I tried to upload a file, that filename contains space character, e.g. "read me.txt", it works.

Secondly, I tried to reproduce this issue in these steps

$ fedpkg clone -a dbus-glib
Cloning into 'dbus-glib'...
remote: Counting objects: 506, done.
remote: Compressing objects: 100% (320/320), done.
remote: Total 506 (delta 241), reused 366 (delta 166)
Receiving objects: 100% (506/506), 89.51 KiB | 0 bytes/s, done.
Resolving deltas: 100% (241/241), done.
Checking connectivity... done.
$ cd dbus-glib/
# Add https://cqi.fedorapeople.org/pkgtool/read%20me.txt to SPEC as a fake Source file
$ vim dbus-glib.spec 
$ spectool --get-files dbus-glib.spec 
Getting http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.106.tar.gz to ./dbus-glib-0.106.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   364  100   364    0     0    191      0  0:00:01  0:00:01 --:--:--   191
100  774k  100  774k    0     0   201k      0  0:00:03  0:00:03 --:--:--  544k
Getting https://cqi.fedorapeople.org/pkgtool/read%20me.txt to ./read%20me.txt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    44  100    44    0     0     39      0  0:00:01  0:00:01 --:--:--    39
$ ls re*
read%20me.txt
^^^^^^^^^^^^^^

From this result, we can see that after spectool downloads the "read me.txt", it doesn't decode %20 into a space character. This is why Concept%2520Design.zip is generated.

spectool should be responsible for handling the filename properly, so that it can be a valid and usable input for other tools.

From fedpkg point of view, it just handles file name read%20me.txt directly without any assumption. fedpkg doesn't know if %20 are valid characters in a filename that packager just wants that, or it's an space character that wasn't decoded properly.

@cwickert so, I would suggest you ask for help from rpmdevtools developers to fix it in spectool.

@cqi changed the status to Invalid

Metadata