1 |
commit: de774cb735fbaf3e1cb20a48a721a48dcabd58a1 |
2 |
Author: Rafael Martins <rafaelmartins <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 8 20:32:19 2018 +0000 |
4 |
Commit: Rafael Martins <rafaelmartins <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 8 20:32:19 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de774cb7 |
7 |
|
8 |
app-emulation/simplevirt: initial snapshot import |
9 |
|
10 |
Package-Manager: Portage-2.3.49, Repoman-2.3.11 |
11 |
Signed-off-by: Rafael Martins <rafaelmartins <AT> gentoo.org> |
12 |
|
13 |
app-emulation/simplevirt/Manifest | 6 ++ |
14 |
app-emulation/simplevirt/files/simplevirtd.confd | 4 ++ |
15 |
app-emulation/simplevirt/files/simplevirtd.initd | 15 ++++ |
16 |
app-emulation/simplevirt/metadata.xml | 18 +++++ |
17 |
.../simplevirt/simplevirt-0.0_p20181008.ebuild | 81 ++++++++++++++++++++++ |
18 |
5 files changed, 124 insertions(+) |
19 |
|
20 |
diff --git a/app-emulation/simplevirt/Manifest b/app-emulation/simplevirt/Manifest |
21 |
new file mode 100644 |
22 |
index 00000000000..53327df1b39 |
23 |
--- /dev/null |
24 |
+++ b/app-emulation/simplevirt/Manifest |
25 |
@@ -0,0 +1,6 @@ |
26 |
+DIST github.com-go-check-check-20d25e2804050c1cd24a7eea1e7a6447dd0e74ec.tar.gz 30367 BLAKE2B c18a0f1aff1bde8e6fc533ea627377ca4de4830d84289355f68163855ec97ac47f537b3b2627568c31714ac3a7672ebf86d60452269c75c80c2cd7565d7c97a0 SHA512 94342de3aad4db1c4442062f4cf4e57c723a43bbcb0069a8bed3b719e3864eef7500a24c9c99c755114708d6822e9b23f296b6d0b2b46f32cc6ffc65944d1729 |
27 |
+DIST github.com-go-yaml-yaml-v2.2.1.tar.gz 70217 BLAKE2B 4ba34bd9432699ec60348d13d8b95498abf751a922f782bf177695e6854faf907c1728d1dc13ad1cb63215fe3a86366cd99068247d15c726ba77bd0cf434b9c6 SHA512 d49267ee361196b0a1e1b9ad6f6cfa903627ccf7925fc3acc8d1bd214b64d362a9dcee10ba524fb8887226235c5baa2c8812a9f62adc7e6719d4ed84baa4ce4b |
28 |
+DIST github.com-inconshreveable-mousetrap-v1.0.0.tar.gz 2290 BLAKE2B bd46103e50dd916bad41aafbf8c1945d835222c131a88f4d3fba35feb4b11ae83c900280c9dafc6f0ef92f71b6a3ba02996dcb31d67eb49314b29d23fda2c8b8 SHA512 6f68bd6b7b1c7aa6651fe83b5230b6c8398b85561b01ca6a36ee638e186c325cc70444818de7a569db240159ba5840ed24f212e0defdf9f9890803a7641285d9 |
29 |
+DIST github.com-spf13-cobra-v0.0.3.tar.gz 101526 BLAKE2B 8613eccdd5bbd31429b7aa8260ee9367e34a5cc78075b394b09db91a97445ed1dadfb53a86105b55cb6ea3b4c2f9d50553e9198d64dfb6033dd1db2805984a2c SHA512 c38db9432a168f913b41a1e1b11d84bedfade82ff70791be9d343a6cc86b8a05b18bae344d67ebd8bae4c98662db7ac664a9dc86fa9b9ad4aa5c96cbf0178efb |
30 |
+DIST github.com-spf13-pflag-v1.0.2.tar.gz 44042 BLAKE2B 157fa6c2b1efa594abebd76ff03121050187974d62475b1aa66af325a2198ea64105655597703c37f25e22c4a07864d9fc31a6a29ba9233fdeefcceef400d5e5 SHA512 fd3cefd683329316eda4ec660193a970e38435515c16805190235e2c969c8d65a6f602fdc7c2f7cf3d9740c5a321ee5be5e8034bd6cd7c05c12722cf64d1e8ae |
31 |
+DIST simplevirt-0.0_p20181008.tar.gz 14418 BLAKE2B f7c2274b57c874a26b04bfe0008ab5234a1841e0ca64104725048bbda6dc97086954958779a28e6457da9172f998e7a14298c84dcf5b1e43adf71909fa5c9f48 SHA512 003a30d204c02ea196ef23deddd924c2ccad92b861aece35d88be99416664f8b38c4da6e578f56b111a3b5d192032acbf30383cc659160755e8eeeb8b358b8d4 |
32 |
|
33 |
diff --git a/app-emulation/simplevirt/files/simplevirtd.confd b/app-emulation/simplevirt/files/simplevirtd.confd |
34 |
new file mode 100644 |
35 |
index 00000000000..9f679f6221a |
36 |
--- /dev/null |
37 |
+++ b/app-emulation/simplevirt/files/simplevirtd.confd |
38 |
@@ -0,0 +1,4 @@ |
39 |
+# /etc/conf.d/simplevirtd: config file for simplevirtd |
40 |
+ |
41 |
+# See `simplevirtd --help` |
42 |
+SIMPLEVIRTD_OPTS="" |
43 |
|
44 |
diff --git a/app-emulation/simplevirt/files/simplevirtd.initd b/app-emulation/simplevirt/files/simplevirtd.initd |
45 |
new file mode 100755 |
46 |
index 00000000000..f7ba444d6d9 |
47 |
--- /dev/null |
48 |
+++ b/app-emulation/simplevirt/files/simplevirtd.initd |
49 |
@@ -0,0 +1,15 @@ |
50 |
+#!/sbin/openrc-run |
51 |
+# Copyright 1999-2018 Gentoo Authors |
52 |
+# Distributed under the terms of the GNU General Public License v2 |
53 |
+ |
54 |
+name="simplevirtd" |
55 |
+pidfile="/run/simplevirtd.pid" |
56 |
+retry="SIGTERM/7200" |
57 |
+command="/usr/sbin/simplevirtd" |
58 |
+command_background="1" |
59 |
+command_args="--syslog ${SIMPLEVIRTD_ARGS}" |
60 |
+ |
61 |
+depend() { |
62 |
+ need net |
63 |
+ use dns logger |
64 |
+} |
65 |
|
66 |
diff --git a/app-emulation/simplevirt/metadata.xml b/app-emulation/simplevirt/metadata.xml |
67 |
new file mode 100644 |
68 |
index 00000000000..25e89f9e595 |
69 |
--- /dev/null |
70 |
+++ b/app-emulation/simplevirt/metadata.xml |
71 |
@@ -0,0 +1,18 @@ |
72 |
+<?xml version="1.0" encoding="UTF-8"?> |
73 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
74 |
+<pkgmetadata> |
75 |
+ <maintainer type="person"> |
76 |
+ <email>rafaelmartins@g.o</email> |
77 |
+ <name>Rafael G. Martins</name> |
78 |
+ </maintainer> |
79 |
+ <longdescription lang="en"> |
80 |
+ Simple virtual machine manager for Linux (QEMU/KVM) |
81 |
+ </longdescription> |
82 |
+ <upstream> |
83 |
+ <maintainer status="active"> |
84 |
+ <email>rafael@×××××××××××××××××.br</email> |
85 |
+ <name>Rafael G. Martins</name> |
86 |
+ </maintainer> |
87 |
+ <remote-id type="github">rafaelmartins/simplevirt</remote-id> |
88 |
+ </upstream> |
89 |
+</pkgmetadata> |
90 |
|
91 |
diff --git a/app-emulation/simplevirt/simplevirt-0.0_p20181008.ebuild b/app-emulation/simplevirt/simplevirt-0.0_p20181008.ebuild |
92 |
new file mode 100644 |
93 |
index 00000000000..9310b3a9623 |
94 |
--- /dev/null |
95 |
+++ b/app-emulation/simplevirt/simplevirt-0.0_p20181008.ebuild |
96 |
@@ -0,0 +1,81 @@ |
97 |
+# Copyright 1999-2018 Gentoo Authors |
98 |
+# Distributed under the terms of the GNU General Public License v2 |
99 |
+ |
100 |
+EAPI=6 |
101 |
+ |
102 |
+EGO_VENDOR=( |
103 |
+ "github.com/inconshreveable/mousetrap v1.0.0" |
104 |
+ "github.com/spf13/cobra v0.0.3" |
105 |
+ "github.com/spf13/pflag v1.0.2" |
106 |
+ "gopkg.in/check.v1 20d25e2804050c1cd24a7eea1e7a6447dd0e74ec github.com/go-check/check" |
107 |
+ "gopkg.in/yaml.v2 v2.2.1 github.com/go-yaml/yaml" |
108 |
+) |
109 |
+ |
110 |
+inherit linux-info golang-vcs-snapshot user |
111 |
+ |
112 |
+EGO_PN="github.com/rafaelmartins/simplevirt" |
113 |
+GIT_COMMIT="49d0d512f044a20adcabc1b3a0a56a69e5f1f9c7" |
114 |
+GIT_VERSION="0.0.19-49d0" |
115 |
+ARCHIVE_URI="https://${EGO_PN}/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz" |
116 |
+ |
117 |
+DESCRIPTION="Simple virtual machine manager for Linux (QEMU/KVM)" |
118 |
+HOMEPAGE="https://github.com/rafaelmartins/simplevirt" |
119 |
+SRC_URI=" |
120 |
+ ${ARCHIVE_URI} |
121 |
+ ${EGO_VENDOR_URI}" |
122 |
+ |
123 |
+LICENSE="BSD" |
124 |
+SLOT="0" |
125 |
+KEYWORDS="" |
126 |
+IUSE="" |
127 |
+ |
128 |
+RDEPEND=" |
129 |
+ virtual/logger |
130 |
+ app-emulation/qemu" |
131 |
+ |
132 |
+CONFIG_CHECK="~TUN ~BRIDGE" |
133 |
+ERROR_TUN="CONFIG_TUN: Universal TUN/TAP driver required to setup bridge networking" |
134 |
+ERROR_BRIDGE="CONFIG_BRIDGE: 802.1d Ethernet Bridging required to setup bridge networking" |
135 |
+ |
136 |
+pkg_setup() { |
137 |
+ enewgroup simplevirt |
138 |
+ |
139 |
+ linux-info_pkg_setup |
140 |
+} |
141 |
+ |
142 |
+src_compile() { |
143 |
+ pushd src/${EGO_PN} > /dev/null || die |
144 |
+ GOPATH="${S}" go install -v -ldflags "-X ${EGO_PN}.Version=${GIT_VERSION}" ./cmd/... || die |
145 |
+ popd > /dev/null || die |
146 |
+} |
147 |
+ |
148 |
+src_install() { |
149 |
+ dobin bin/simplevirtctl |
150 |
+ dosbin bin/simplevirtd |
151 |
+ |
152 |
+ newinitd "${FILESDIR}/simplevirtd.initd" simplevirtd |
153 |
+ newconfd "${FILESDIR}/simplevirtd.confd" simplevirtd |
154 |
+ |
155 |
+ dodoc "src/${EGO_PN}/README.md" |
156 |
+ |
157 |
+ keepdir /etc/simplevirt |
158 |
+} |
159 |
+ |
160 |
+src_test() { |
161 |
+ pushd src/${EGO_PN} > /dev/null || die |
162 |
+ GOPATH="${S}" go test -v ./pkg/... || die |
163 |
+ popd > /dev/null || die |
164 |
+} |
165 |
+ |
166 |
+pkg_postinst() { |
167 |
+ elog |
168 |
+ elog "To use simplevirt, the simplevirtd daemon must be running as root." |
169 |
+ elog "To automatically start the daemon at boot, add it to the default runlevel:" |
170 |
+ elog " rc-update add simplevirtd default" |
171 |
+ elog |
172 |
+ elog "systemd is not supported for now." |
173 |
+ elog |
174 |
+ elog "To use simplevirtctl as a non-root user, add yourself to the 'simplevirt' group:" |
175 |
+ elog " usermod -aG simplevirt youruser" |
176 |
+ elog |
177 |
+} |