Generic: unbrand ovf.template

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
This commit is contained in:
Christian Hewitt 2025-04-07 13:47:59 +00:00
parent 92797638da
commit 2525a6d73d
No known key found for this signature in database
3 changed files with 10 additions and 7 deletions

View File

@ -19,14 +19,14 @@ xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemS
<Name>@DISTRO@</Name>
<ProductSection>
<Info>Meta-information about the installed software</Info>
<Product>LibreELEC</Product>
<Vendor>LibreELEC</Vendor>
<ProductUrl>https://libreelec.tv</ProductUrl>
<VendorUrl>https://libreelec.tv</VendorUrl>
<Product>@DISTRO@</Product>
<Vendor>@DISTRO@</Vendor>
<ProductUrl>@DISTRO_HOME_URL@</ProductUrl>
<VendorUrl>@DISTRO_HOME_URL@</VendorUrl>
</ProductSection>
<AnnotationSection>
<Info>A human-readable annotation</Info>
<Annotation>LibreELEC is &#x2018;Just enough OS&#x2019; for Kodi, a Linux distribution built to run Kodi on current and popular mediacentre hardware. After importing the OVA image adjust CPU, RAM, and HDD storage to the required configuration before first boot.</Annotation>
<Annotation>After importing the OVA image, adjust CPU, RAM, and HDD storage to the required configuration before first boot.</Annotation>
</AnnotationSection>
<OperatingSystemSection ovf:id="94" vmw:osType="Ubuntu 64-bit">
<Info>The kind of installed guest operating system</Info>
@ -35,7 +35,7 @@ xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemS
<System>
<vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
<vssd:InstanceID>0</vssd:InstanceID>
<vssd:VirtualSystemIdentifier>LibreELEC</vssd:VirtualSystemIdentifier>
<vssd:VirtualSystemIdentifier>@DISTRO@</vssd:VirtualSystemIdentifier>
<vssd:VirtualSystemType>vmx-12</vssd:VirtualSystemType>
</System>
<Item>

View File

@ -38,6 +38,7 @@ function do_mkimage() {
PROJECT="${PROJECT}" \
DEVICE="${DEVICE}" \
DISTRO="${DISTRO}" \
DISTRO_HOME_URL="${DISTRO_HOME_URL}" \
TARGET_IMG="${TARGET_IMG}" \
BUILD_NAME="${IMAGE_NAME}" \
IMAGE_NAME="${1:-${IMAGE_NAME}}" \

View File

@ -313,7 +313,9 @@ if [ "${PROJECT}" = "Generic" ]; then
echo "image: creating vmdk for open virtual appliance..."
qemu-img convert -O vmdk -o subformat=streamOptimized "${DISK_BASENAME}.tmp" "${DISK_BASENAME}.vmdk"
# generate ovf from template
sed -e "s,@DISTRO@,${DISTRO},g" -e "s,@DISK@,${IMAGE_NAME},g" \
sed -e "s,@DISTRO@,${DISTRO},g" \
-e "s,@DISTRO_HOME_URL@,${DISTRO_HOME_URL},g" \
-e "s,@DISK@,${IMAGE_NAME},g" \
-e "s,@OVA_SIZE@,$((${OVA_SIZE} * 1024 * 1024)),g" \
"${PROJECT_DIR}/${PROJECT}/config/ovf.template" >"${DISK_BASENAME}.ovf"
# combine ovf and vmdk into official ova