commit:     de774cb735fbaf3e1cb20a48a721a48dcabd58a1
Author:     Rafael Martins <rafaelmartins <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  8 20:32:19 2018 +0000
Commit:     Rafael Martins <rafaelmartins <AT> gentoo <DOT> org>
CommitDate: Mon Oct  8 20:32:19 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de774cb7

app-emulation/simplevirt: initial snapshot import

Package-Manager: Portage-2.3.49, Repoman-2.3.11
Signed-off-by: Rafael Martins <rafaelmartins <AT> gentoo.org>

 app-emulation/simplevirt/Manifest                  |  6 ++
 app-emulation/simplevirt/files/simplevirtd.confd   |  4 ++
 app-emulation/simplevirt/files/simplevirtd.initd   | 15 ++++
 app-emulation/simplevirt/metadata.xml              | 18 +++++
 .../simplevirt/simplevirt-0.0_p20181008.ebuild     | 81 ++++++++++++++++++++++
 5 files changed, 124 insertions(+)

diff --git a/app-emulation/simplevirt/Manifest 
b/app-emulation/simplevirt/Manifest
new file mode 100644
index 00000000000..53327df1b39
--- /dev/null
+++ b/app-emulation/simplevirt/Manifest
@@ -0,0 +1,6 @@
+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_p20181008.tar.gz 14418 BLAKE2B 
f7c2274b57c874a26b04bfe0008ab5234a1841e0ca64104725048bbda6dc97086954958779a28e6457da9172f998e7a14298c84dcf5b1e43adf71909fa5c9f48
 SHA512 
003a30d204c02ea196ef23deddd924c2ccad92b861aece35d88be99416664f8b38c4da6e578f56b111a3b5d192032acbf30383cc659160755e8eeeb8b358b8d4

diff --git a/app-emulation/simplevirt/files/simplevirtd.confd 
b/app-emulation/simplevirt/files/simplevirtd.confd
new file mode 100644
index 00000000000..9f679f6221a
--- /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 00000000000..f7ba444d6d9
--- /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 00000000000..25e89f9e595
--- /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>rafaelmart...@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>raf...@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_p20181008.ebuild 
b/app-emulation/simplevirt/simplevirt-0.0_p20181008.ebuild
new file mode 100644
index 00000000000..9310b3a9623
--- /dev/null
+++ b/app-emulation/simplevirt/simplevirt-0.0_p20181008.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="49d0d512f044a20adcabc1b3a0a56a69e5f1f9c7"
+GIT_VERSION="0.0.19-49d0"
+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
+}

Reply via email to