Red Hat Bugzilla – Bug 861230
spacecmd does not upload binary files correctly
Last modified: 2013-03-06 10:56:28 EST
Description of problem:
Me and the spacecmd developer fell in the same trap, apparently:
On http://spacewalk.redhat.com/documentation/api/1.7/handlers/ServerConfigHandler.html#createOrUpdatePath , there's a missing value in the path_info struct, 'binary'. It is documented in the source:
* #struct("path info")
* #prop_desc("boolean", "binary", "mark the binary content, if True,
* base64 encoded content is expected (only for non-directories)")
Without this the uploaded files are treated as text by the spacewalk server and rendered unusable.
This patchlet adds the value:
--- /0usr/lib/python2.4/site-packages/spacecmd/configchannel.py 2012-09-27 13:51:41.000000000 -0700
+++ /usr/lib/python2.4/site-packages/spacecmd/configchannel.py 2012-09-27 13:54:25.000000000 -0700
@@ -533,6 +533,7 @@
file_info['contents_enc64'] = True
+ file_info['binary'] = True
I did a buzilla ticket for the API docs as well.
The APIC doc bug 861225 closed as NEXTRELEASE -- the binary upload is *not* in Spacewalk 1.7.
Reassigning to spacecmd maintainer.
Reassigning to Aron Parsons, spacecmd maintainer
commit e05e2f3b0afb1ffb95a6aa57815c80e9b98304b5. Thanks Zailo.
Aron, we prefer to set the state to MODIFIED when changes were done for the bugzilla, fill the Fixed In Version (I did that now) and leave it for the release nanny to close the bugzilla when the new Spacewalk release is released.