Bug 861230 - spacecmd does not upload binary files correctly
spacecmd does not upload binary files correctly
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Aron Parsons
Red Hat Satellite QA List
Depends On:
Blocks: space19
  Show dependency treegraph
Reported: 2012-09-27 17:30 EDT by Zailo Leite
Modified: 2013-03-06 10:56 EST (History)
3 users (show)

See Also:
Fixed In Version: spacecmd-1.9.3-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-03-03 17:49:32 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Zailo Leite 2012-09-27 17:30:10 EDT
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)")
     *  #struct_end()

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 @@
         if options.binary:
             file_info['contents_enc64'] = True
+            file_info['binary'] = True

I did a buzilla ticket for the API docs as well.

Comment 1 Jan Pazdziora 2012-10-01 03:23:06 EDT
The APIC doc bug 861225 closed as NEXTRELEASE -- the binary upload is *not* in Spacewalk 1.7.
Comment 2 Michael Mráka 2012-10-31 07:01:54 EDT
Reassigning to spacecmd maintainer.
Comment 3 Steven Hardy 2013-02-21 06:46:37 EST
Reassigning to Aron Parsons, spacecmd maintainer
Comment 4 Aron Parsons 2013-03-03 17:49:32 EST
commit e05e2f3b0afb1ffb95a6aa57815c80e9b98304b5.  Thanks Zailo.
Comment 5 Jan Pazdziora 2013-03-04 03:08:57 EST
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.

Note You need to log in before you can comment on or make changes to this bug.