virtual-appliance: OVA support
This commit is contained in:
parent
7ff68a8247
commit
fd59a2cced
|
@ -1,5 +1,7 @@
|
||||||
AUX locale-de.diff 463 SHA256 b178984896c3c7b804b4e7497e1ce2d4b7d31d003e68765f90235f76fdf92c66 SHA512 b817340d60a32ed30206ae602427fa70c8a18929252192a061667ef4a2c8f2cbcad6241e8c71f5b74b2f2d7f59e6d53e8dd10571c41a61ad02dd4a3b494d8bf1 WHIRLPOOL add55c0fd0515e74f31aac5ccf064c297434c2c0ed35be243ed38b457e4a8635ce6e719d62624cc85626660865a281d3bf3d1ace7959272965fccf77152388f9
|
AUX locale-de.diff 463 SHA256 b178984896c3c7b804b4e7497e1ce2d4b7d31d003e68765f90235f76fdf92c66 SHA512 b817340d60a32ed30206ae602427fa70c8a18929252192a061667ef4a2c8f2cbcad6241e8c71f5b74b2f2d7f59e6d53e8dd10571c41a61ad02dd4a3b494d8bf1 WHIRLPOOL add55c0fd0515e74f31aac5ccf064c297434c2c0ed35be243ed38b457e4a8635ce6e719d62624cc85626660865a281d3bf3d1ace7959272965fccf77152388f9
|
||||||
AUX mkfs.ext4-64bit.diff 663 SHA256 ebcf393fdb90ce1673d9913c792bceecc1c54229ad8af860484c695275eb99e0 SHA512 71ab1af0dc4bd930ca40545c8680837dc02f97fa85d7003c4444b4332fd9fbc47b9e59d6d11f9697a0d8b735025c21dc8393a7163449d9b79248438a3e894ad9 WHIRLPOOL b1d18e9b105f8452743e5ddfd4f8dd0bfedd59eaa26a348539be40a124d6a8abd930b9112759c8f3414e868a228d95ee9801bcf965fc2083be6a015f260cbd35
|
AUX mkfs.ext4-64bit.diff 663 SHA256 ebcf393fdb90ce1673d9913c792bceecc1c54229ad8af860484c695275eb99e0 SHA512 71ab1af0dc4bd930ca40545c8680837dc02f97fa85d7003c4444b4332fd9fbc47b9e59d6d11f9697a0d8b735025c21dc8393a7163449d9b79248438a3e894ad9 WHIRLPOOL b1d18e9b105f8452743e5ddfd4f8dd0bfedd59eaa26a348539be40a124d6a8abd930b9112759c8f3414e868a228d95ee9801bcf965fc2083be6a015f260cbd35
|
||||||
|
AUX ova.diff 1497 SHA256 f543d04000e54335b06ed8b25e372123ff7b54afaf27c841c71301544e264e44 SHA512 2758f5c0d6956707bd4d284e3b1e290fa908f4239f7b624d8ed30f1ec692b2ed0cc8c1c6425d96901e22c0788dad7624e4fb791919b6aaf5d4190268836ce3f0 WHIRLPOOL f21cf802174b63a09f58b0e773e861422b343a3afe163894230a7a00b382818cd87965a565be81c66217ba3793e5c98fc3b260afa8c8db9f73986675afb35f81
|
||||||
AUX vmdk-scsi.diff 1309 SHA256 b2d612b158b60987d523219fe9a2b6eff237f69cb74a45249e2fb51e6f73ec03 SHA512 ab01df9c707830804bf8ccc366141360f7ee33b1c423d26aa870ed91f021aa758631243b1d39bc196e063c263e6043715d9ec704fff79d427143ed83496df3e6 WHIRLPOOL f1e202ebf18c560e8bf2adf040c5130cedc4a6298e8e75d505d6127bae3717f7573f2bc172de276e275be1da1eaadfd164ffd169ee5d571b5ff77f54054c2753
|
AUX vmdk-scsi.diff 1309 SHA256 b2d612b158b60987d523219fe9a2b6eff237f69cb74a45249e2fb51e6f73ec03 SHA512 ab01df9c707830804bf8ccc366141360f7ee33b1c423d26aa870ed91f021aa758631243b1d39bc196e063c263e6043715d9ec704fff79d427143ed83496df3e6 WHIRLPOOL f1e202ebf18c560e8bf2adf040c5130cedc4a6298e8e75d505d6127bae3717f7573f2bc172de276e275be1da1eaadfd164ffd169ee5d571b5ff77f54054c2753
|
||||||
EBUILD virtual-appliance-2.0-r20161220.ebuild 1071 SHA256 2c2490af8345956634aff75a3e83045365ff7a6f14f73fe3ede3b754d8f550bf SHA512 bf2bc278c97beb85453993b7162e36c838291f5c168bc4f7f8d1e212f206114a092c7aa154342660062a4dbe95efbb27556794524d6d80ad0e823006db96af24 WHIRLPOOL 77393377916b0a1fcd73b481dabd02008f492038bfacda6f9cee18c084e09cd1b3aaaba571c65fe278d6b2301b2fffe4f2d8098dac545c01625400189c329394
|
EBUILD virtual-appliance-2.0-r20161220.ebuild 1071 SHA256 2c2490af8345956634aff75a3e83045365ff7a6f14f73fe3ede3b754d8f550bf SHA512 bf2bc278c97beb85453993b7162e36c838291f5c168bc4f7f8d1e212f206114a092c7aa154342660062a4dbe95efbb27556794524d6d80ad0e823006db96af24 WHIRLPOOL 77393377916b0a1fcd73b481dabd02008f492038bfacda6f9cee18c084e09cd1b3aaaba571c65fe278d6b2301b2fffe4f2d8098dac545c01625400189c329394
|
||||||
EBUILD virtual-appliance-2.0-r20170528.ebuild 1088 SHA256 e39ca4699977c48ac3d7626951c9fd816dc1a24e4a2e9b080dad86f6db021b8c SHA512 3742ad9f3cd1135362fa9ef7851549ce6830f411b9b882669798de88cc793b1c625d157a63a90d23df3d56e923d356a070309076778c1a65b800cad89231d773 WHIRLPOOL 7d4228fe9f66944cb57dba683be01466aac6ed89c9773b9821c584330a993f9f6b953a181d4bfce446d13a0017793f28109c8ca92dfb5d1737ab01c43855315c
|
EBUILD virtual-appliance-2.0-r20170528.ebuild 1088 SHA256 e39ca4699977c48ac3d7626951c9fd816dc1a24e4a2e9b080dad86f6db021b8c SHA512 3742ad9f3cd1135362fa9ef7851549ce6830f411b9b882669798de88cc793b1c625d157a63a90d23df3d56e923d356a070309076778c1a65b800cad89231d773 WHIRLPOOL 7d4228fe9f66944cb57dba683be01466aac6ed89c9773b9821c584330a993f9f6b953a181d4bfce446d13a0017793f28109c8ca92dfb5d1737ab01c43855315c
|
||||||
|
EBUILD virtual-appliance-2.0-r20170529.ebuild 1149 SHA256 5d0242123d7f3fb620ccdf777440936b1cf4a3ea04fd92393fbedb7a1d078a07 SHA512 8e0833725581622dfab05e8d55ab3f71bb0c4ce56f2cbd79df71650eab5b0acdadfcbbb582efdbf080d4b6802e9f63521b9c854f558679a095eb8fdb3a0c32de WHIRLPOOL d833467682b02075213a7ad0df8346cbe32bf637b8dc9b5eef12b1f066f4b3e17ed5cc75daee1c0605f1d8a3d5257aa91cca1561500ae2070d11a29ec98565f9
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
diff -Naur virtual-appliance.orig/Makefile virtual-appliance/Makefile
|
||||||
|
--- virtual-appliance.orig/Makefile 2017-07-24 11:44:03.000000000 +0200
|
||||||
|
+++ virtual-appliance/Makefile 2017-07-19 13:08:58.000000000 +0200
|
||||||
|
@@ -10,6 +10,9 @@
|
||||||
|
QCOW_IMAGE = $(IMAGES)/$(APPLIANCE).qcow
|
||||||
|
VMDK_IMAGE = $(IMAGES)/$(APPLIANCE).vmdk
|
||||||
|
VMDK_TYPE = IDE
|
||||||
|
+OVA_IMAGE = $(IMAGES)/$(APPLIANCE).ova
|
||||||
|
+OVA_NUM_CPUS = 1
|
||||||
|
+OVA_MEM_SIZE = 1024
|
||||||
|
XVA_IMAGE = $(IMAGES)/$(APPLIANCE).xva
|
||||||
|
LST_FILE = $(IMAGES)/$(APPLIANCE)-packages.lst
|
||||||
|
CHECKSUMS = $(IMAGES)/SHA256SUMS
|
||||||
|
@@ -294,6 +297,16 @@
|
||||||
|
|
||||||
|
vmdk: $(VMDK_IMAGE)
|
||||||
|
|
||||||
|
+NUM_CPUS := $(OVA_NUM_CPUS)
|
||||||
|
+MEM_SIZE := $(OVA_MEM_SIZE)
|
||||||
|
+export NUM_CPUS MEM_SIZE
|
||||||
|
+
|
||||||
|
+$(OVA_IMAGE): $(VMDK_IMAGE)
|
||||||
|
+ @scripts/echo Creating `basename $(OVA_IMAGE)`
|
||||||
|
+ cd $(IMAGES) && mkova.sh $(APPLIANCE) $(VMDK_IMAGE) /usr/share/open-vmdk/template.ovf
|
||||||
|
+
|
||||||
|
+ova: $(OVA_IMAGE)
|
||||||
|
+
|
||||||
|
$(STAGE4_TARBALL): $(PORTAGE_DIR) stage3-$(ARCH).tar.bz2 appliances/$(APPLIANCE) configs/rsync-excludes
|
||||||
|
$(MAKE) $(STAGE3)
|
||||||
|
$(MAKE) $(PREPROOT)
|
||||||
|
@@ -362,6 +375,7 @@
|
||||||
|
@echo 'image - Build a raw VM image from stage4'
|
||||||
|
@echo 'qcow - Build a qcow VM image from a raw image'
|
||||||
|
@echo 'vmdk - Build a vmdk image from a raw image'
|
||||||
|
+ @echo 'ova - Build a ova image from a vmdk image'
|
||||||
|
@echo 'xva - Build an xva image from a raw image'
|
||||||
|
@echo 'appliance-list - List built-in appliances'
|
||||||
|
@echo 'help - Show this help'
|
|
@ -0,0 +1,56 @@
|
||||||
|
# Copyright Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
EAPI=5
|
||||||
|
|
||||||
|
inherit eutils linux-info toolchain-funcs mercurial
|
||||||
|
|
||||||
|
MY_REV="f718935" # checkout revision
|
||||||
|
MY_USR="marduk" # user name
|
||||||
|
|
||||||
|
MY_P="${MY_USR}-${PN}-${MY_REV}"
|
||||||
|
|
||||||
|
DESCRIPTION="Programatically (re)create Gentoo Virtual Appliances"
|
||||||
|
HOMEPAGE="https://bitbucket.org/marduk/virtual-appliance/wiki/Home"
|
||||||
|
EHG_REPO_URI="https://bitbucket.org/${MY_USR}/${PN}"
|
||||||
|
EHG_REVISION=${MY_REV}
|
||||||
|
|
||||||
|
LICENSE="unknown"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
DEPEND="app-emulation/qemu
|
||||||
|
app-emulation/open-vmdk
|
||||||
|
sys-block/parted"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
CONFIG_CHECK="BLK_DEV_NBD"
|
||||||
|
linux-info_pkg_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
rm .hgignore
|
||||||
|
rm .hgtags
|
||||||
|
rm -rf .hg
|
||||||
|
epatch ${FILESDIR}/locale-de.diff
|
||||||
|
epatch ${FILESDIR}/vmdk-scsi.diff
|
||||||
|
epatch ${FILESDIR}/ova.diff
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
einfo "Nothing to compile"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dodir /opt/${PN}/appliances
|
||||||
|
mv appliances appliances-examples
|
||||||
|
cp -r . ${D}/opt/${PN}
|
||||||
|
|
||||||
|
echo "CONFIG_PROTECT=\"/opt/${PN}/configs\"" > "${T}"/99${PN}
|
||||||
|
doenvd "${T}"/99${PN}
|
||||||
|
}
|
Loading…
Reference in New Issue