From 45abf7c253a816b11711e89d0267a31b0ddc8cd2 Mon Sep 17 00:00:00 2001 From: John Chittum Date: Tue, 17 Nov 2020 14:54:54 -0600 Subject: [PATCH] re-add sed command Older version of vmdk-stream-converter has an incorrect header. The original sed command replaced the incorrect "Description File" comment with the correct "Disk DescriptorFile". --- live-build/functions | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/live-build/functions b/live-build/functions index 0f4eb8df..fa4bfd10 100644 --- a/live-build/functions +++ b/live-build/functions @@ -213,12 +213,25 @@ modify_vmdk_header() { # trim null bytes to treat as standard text file tr -d '\000' < $descriptor > $newdescriptor + # remove the vmdk-stream-converter comment and replace with + # # Disk DescriptorFile. This is needed for Virtualbox + # remove the comments from vmdk-stream-converter which causes + # VirtualBox and others to fail VMDK validation + sed -i -e 's|# Description file.*|# Disk DescriptorFile|' \ + -e '/# Believe this is random*/d' \ + -e '/# Indicates no parent/d' \ + -e '/# The Disk Data Base/d' \ + ${newdescriptor} + # add newline to newdescriptor echo "" >> $newdescriptor # add required tools version echo -n 'ddb.toolsVersion = "2147483647"' >> $newdescriptor + echo "Cat'ing modified descriptor for debugging." + cat $newdescriptor + # diff original descriptor and new descriptor for debugging # diff exits 1 if difference. pipefail not set so piping diff # to cat prints diff and swallows exit 1