summaryrefslogtreecommitdiff
path: root/app-emulation/simplevirt
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/simplevirt')
-rw-r--r--app-emulation/simplevirt/Manifest10
-rw-r--r--app-emulation/simplevirt/files/simplevirtd.confd4
-rwxr-xr-xapp-emulation/simplevirt/files/simplevirtd.initd15
-rw-r--r--app-emulation/simplevirt/metadata.xml18
-rw-r--r--app-emulation/simplevirt/simplevirt-0.0_p20181011.ebuild81
5 files changed, 128 insertions, 0 deletions
diff --git a/app-emulation/simplevirt/Manifest b/app-emulation/simplevirt/Manifest
new file mode 100644
index 000000000000..7ac2633fea54
--- /dev/null
+++ b/app-emulation/simplevirt/Manifest
@@ -0,0 +1,10 @@
+AUX simplevirtd.confd 103 BLAKE2B 897b17aac8b81b60171267560c36a742dcd812cb3c883bb2855b2ec6fc0664d582f0779f2a5593105c94c0e18b82468dcbfc1b935f215f7d6b42f33043cd7121 SHA512 3e529de36a18bf082d7de220c8c0b52aedf6a1eb3860192db7a79cad5dc0d224d727d7377c8afde3c8d899d42b3ac4a6c56cbb4e17cd5b9217413b1657d0a516
+AUX simplevirtd.initd 334 BLAKE2B 356fcfa12c26bd1d26f4a2bfeee9c598d7c543739b2ea94a73fabce8f7180fcf2abec9ba9384be1c91e5415ae07786c513400ec627e81e4c2bf7f5f01a5dde12 SHA512 642efacdbfce06f6e78a2f9d62ee8417d230f94e55e79d2334c5b049ada1b38174a8ff057b27c00c5a87e64500ca37c542aaeb37a9eb59125e0ef5fe0b39ca28
+DIST github.com-go-check-check-20d25e2804050c1cd24a7eea1e7a6447dd0e74ec.tar.gz 30367 BLAKE2B c18a0f1aff1bde8e6fc533ea627377ca4de4830d84289355f68163855ec97ac47f537b3b2627568c31714ac3a7672ebf86d60452269c75c80c2cd7565d7c97a0 SHA512 94342de3aad4db1c4442062f4cf4e57c723a43bbcb0069a8bed3b719e3864eef7500a24c9c99c755114708d6822e9b23f296b6d0b2b46f32cc6ffc65944d1729
+DIST github.com-go-yaml-yaml-v2.2.1.tar.gz 70217 BLAKE2B 4ba34bd9432699ec60348d13d8b95498abf751a922f782bf177695e6854faf907c1728d1dc13ad1cb63215fe3a86366cd99068247d15c726ba77bd0cf434b9c6 SHA512 d49267ee361196b0a1e1b9ad6f6cfa903627ccf7925fc3acc8d1bd214b64d362a9dcee10ba524fb8887226235c5baa2c8812a9f62adc7e6719d4ed84baa4ce4b
+DIST github.com-inconshreveable-mousetrap-v1.0.0.tar.gz 2290 BLAKE2B bd46103e50dd916bad41aafbf8c1945d835222c131a88f4d3fba35feb4b11ae83c900280c9dafc6f0ef92f71b6a3ba02996dcb31d67eb49314b29d23fda2c8b8 SHA512 6f68bd6b7b1c7aa6651fe83b5230b6c8398b85561b01ca6a36ee638e186c325cc70444818de7a569db240159ba5840ed24f212e0defdf9f9890803a7641285d9
+DIST github.com-spf13-cobra-v0.0.3.tar.gz 101526 BLAKE2B 8613eccdd5bbd31429b7aa8260ee9367e34a5cc78075b394b09db91a97445ed1dadfb53a86105b55cb6ea3b4c2f9d50553e9198d64dfb6033dd1db2805984a2c SHA512 c38db9432a168f913b41a1e1b11d84bedfade82ff70791be9d343a6cc86b8a05b18bae344d67ebd8bae4c98662db7ac664a9dc86fa9b9ad4aa5c96cbf0178efb
+DIST github.com-spf13-pflag-v1.0.2.tar.gz 44042 BLAKE2B 157fa6c2b1efa594abebd76ff03121050187974d62475b1aa66af325a2198ea64105655597703c37f25e22c4a07864d9fc31a6a29ba9233fdeefcceef400d5e5 SHA512 fd3cefd683329316eda4ec660193a970e38435515c16805190235e2c969c8d65a6f602fdc7c2f7cf3d9740c5a321ee5be5e8034bd6cd7c05c12722cf64d1e8ae
+DIST simplevirt-0.0_p20181011.tar.gz 14667 BLAKE2B 02a7ecdf9ec9983a83c31fb728fbf61ffcb2ca71683ebf24d159815314b064e465da303b5c8712b18aff3ecd1da0c5170c4aa4be365855e233497f62c44ed888 SHA512 b290cbff14a3679600ca2cadcfd17184ea789c0f1556a6f1de64679ef9983eb7988ac7ebadd0de729286d8a86dbdaab3a9f7b7bbc300780c3a28aa9920610288
+EBUILD simplevirt-0.0_p20181011.ebuild 2111 BLAKE2B 1bb539551e4190aa9e278857c3e763198b48d4c8af657f52992ebb8810664f8fe571b3ddde0051506f14b745eb19f8325f14fdcd80d6a60568ce888d2191f32c SHA512 3bea399a586a3369c884fff30c34b2f2782d68f1c3f69b3fd6c3403b99f2d96468cf79487be165ac0359b99bae69a13b76253d3b2357ab8c1f63fccfd4b97303
+MISC metadata.xml 576 BLAKE2B d62570b65053dc9cb9c264b5fdc90aec72d429b6a166e0c4298e4d27105b127094b1a5ad2f96fe8ba6d23118d82faa3aada90643a5165e3874f2f425dc7d37f1 SHA512 91031a71f21466b4782efe38f645169a585dcc29346c4a6e98b129549b8ccb197cb00f03ce3d9d51306284bc24494afcf117efb003c33855f262177daf077987
diff --git a/app-emulation/simplevirt/files/simplevirtd.confd b/app-emulation/simplevirt/files/simplevirtd.confd
new file mode 100644
index 000000000000..9f679f6221ac
--- /dev/null
+++ b/app-emulation/simplevirt/files/simplevirtd.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/simplevirtd: config file for simplevirtd
+
+# See `simplevirtd --help`
+SIMPLEVIRTD_OPTS=""
diff --git a/app-emulation/simplevirt/files/simplevirtd.initd b/app-emulation/simplevirt/files/simplevirtd.initd
new file mode 100755
index 000000000000..f7ba444d6d98
--- /dev/null
+++ b/app-emulation/simplevirt/files/simplevirtd.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="simplevirtd"
+pidfile="/run/simplevirtd.pid"
+retry="SIGTERM/7200"
+command="/usr/sbin/simplevirtd"
+command_background="1"
+command_args="--syslog ${SIMPLEVIRTD_ARGS}"
+
+depend() {
+ need net
+ use dns logger
+}
diff --git a/app-emulation/simplevirt/metadata.xml b/app-emulation/simplevirt/metadata.xml
new file mode 100644
index 000000000000..25e89f9e5959
--- /dev/null
+++ b/app-emulation/simplevirt/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+ </maintainer>
+ <longdescription lang="en">
+ Simple virtual machine manager for Linux (QEMU/KVM)
+ </longdescription>
+ <upstream>
+ <maintainer status="active">
+ <email>rafael@rafaelmartins.eng.br</email>
+ <name>Rafael G. Martins</name>
+ </maintainer>
+ <remote-id type="github">rafaelmartins/simplevirt</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-emulation/simplevirt/simplevirt-0.0_p20181011.ebuild b/app-emulation/simplevirt/simplevirt-0.0_p20181011.ebuild
new file mode 100644
index 000000000000..0dceee42cb54
--- /dev/null
+++ b/app-emulation/simplevirt/simplevirt-0.0_p20181011.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_VENDOR=(
+ "github.com/inconshreveable/mousetrap v1.0.0"
+ "github.com/spf13/cobra v0.0.3"
+ "github.com/spf13/pflag v1.0.2"
+ "gopkg.in/check.v1 20d25e2804050c1cd24a7eea1e7a6447dd0e74ec github.com/go-check/check"
+ "gopkg.in/yaml.v2 v2.2.1 github.com/go-yaml/yaml"
+)
+
+inherit linux-info golang-vcs-snapshot user
+
+EGO_PN="github.com/rafaelmartins/simplevirt"
+GIT_COMMIT="2427500bce5bf9b365dc601790704694cd6c772e"
+GIT_VERSION="0.0.24-2427"
+ARCHIVE_URI="https://${EGO_PN}/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+DESCRIPTION="Simple virtual machine manager for Linux (QEMU/KVM)"
+HOMEPAGE="https://github.com/rafaelmartins/simplevirt"
+SRC_URI="
+ ${ARCHIVE_URI}
+ ${EGO_VENDOR_URI}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="
+ virtual/logger
+ app-emulation/qemu"
+
+CONFIG_CHECK="~TUN ~BRIDGE"
+ERROR_TUN="CONFIG_TUN: Universal TUN/TAP driver required to setup bridge networking"
+ERROR_BRIDGE="CONFIG_BRIDGE: 802.1d Ethernet Bridging required to setup bridge networking"
+
+pkg_setup() {
+ enewgroup simplevirt
+
+ linux-info_pkg_setup
+}
+
+src_compile() {
+ pushd src/${EGO_PN} > /dev/null || die
+ GOPATH="${S}" go install -v -ldflags "-X ${EGO_PN}.Version=${GIT_VERSION}" ./cmd/... || die
+ popd > /dev/null || die
+}
+
+src_install() {
+ dobin bin/simplevirtctl
+ dosbin bin/simplevirtd
+
+ newinitd "${FILESDIR}/simplevirtd.initd" simplevirtd
+ newconfd "${FILESDIR}/simplevirtd.confd" simplevirtd
+
+ dodoc "src/${EGO_PN}/README.md"
+
+ keepdir /etc/simplevirt
+}
+
+src_test() {
+ pushd src/${EGO_PN} > /dev/null || die
+ GOPATH="${S}" go test -v ./pkg/... || die
+ popd > /dev/null || die
+}
+
+pkg_postinst() {
+ elog
+ elog "To use simplevirt, the simplevirtd daemon must be running as root."
+ elog "To automatically start the daemon at boot, add it to the default runlevel:"
+ elog " rc-update add simplevirtd default"
+ elog
+ elog "systemd is not supported for now."
+ elog
+ elog "To use simplevirtctl as a non-root user, add yourself to the 'simplevirt' group:"
+ elog " usermod -aG simplevirt youruser"
+ elog
+}