Importing a custom .DMG file into the Software Catalog results in the error: "The stream is too short to be a valid binary plist. Parameter name: stream"

book

Article ID: 158369

calendar_today

Updated On:

Products

Software Management Solution

Issue/Introduction

Importing a custom .DMG file into the Software Catalog results in the error:
"The stream is too short to be a valid binary plist. Parameter name: stream".

The stream is too short to be a valid binary plist. Parameter name: stream

Cause

The image creation, if not parsed correctly, can leave files within the image at 0kb, thus making the image file invalid or corrupt (for example 7-zip does this in certain circumstances).

Resolution

To workaround this problem it's required to perform more complex routine:
Create new image and attach to /Volumes/calc, the size of the image will be 20m, this can be increased by specifing larger number of the -size param:
/usr/bin/hdiutil create calc.dmg -fs "HFS+" -volname "calc" -size 20m -attach

Copy calculator app to dmg:
cp -r /Applications/Calculator.app /Volumes/calc/

Detach image:
hdiutil detach /Volumes/calc

Convert current .dmg to a copressed format that is parsable by NS:
hdiutil convert -format UDZO -o calc_final.dmg calc.dmg

Now it's possible to upload the "calc_final.dmg" to NS and import it into NS software catalog.
 


Applies To

Software Management Solution 7.1, 7.5