commit:     c78be9354fc487b07110f88114b8a40d469c25c3
Author:     Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
AuthorDate: Sat Oct 15 18:12:24 2016 +0000
Commit:     Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
CommitDate: Sat Oct 15 18:12:24 2016 +0000
URL:        https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=c78be935

add opennebula

 app-emulation/opennebula/Manifest                  |  22 ++
 app-emulation/opennebula/files/99one               |   1 +
 .../opennebula/files/OpenNebulaVNC.rb.diff         |  11 +
 app-emulation/opennebula/files/one_auth            |   1 +
 .../opennebula/files/oneflow-server.confd          |  10 +
 .../opennebula/files/oneflow-server.initd          |  34 +++
 .../opennebula/files/opennebula-econe.service      |  15 ++
 .../opennebula/files/opennebula-oneflow.service    |  15 ++
 .../opennebula/files/opennebula-onegate.service    |  15 ++
 .../opennebula/files/opennebula-sunstone.service   |  15 ++
 app-emulation/opennebula/files/opennebula.confd    |  12 ++
 app-emulation/opennebula/files/opennebula.initd    |  40 ++++
 app-emulation/opennebula/files/opennebula.service  |  18 ++
 .../opennebula/files/sunstone-server.confd         |  10 +
 .../opennebula/files/sunstone-server.initd         |  34 +++
 .../opennebula/files/tmpfilesd.opennebula.conf     |   2 +
 app-emulation/opennebula/files/websocket.py.diff   |   8 +
 .../opennebula/files/websocketproxy.py.diff        |   8 +
 app-emulation/opennebula/metadata.xml              |  17 ++
 app-emulation/opennebula/opennebula-4.14.2.ebuild  | 240 +++++++++++++++++++++
 app-emulation/opennebula/opennebula-5.0.2.ebuild   | 175 +++++++++++++++
 21 files changed, 703 insertions(+)

diff --git a/app-emulation/opennebula/Manifest 
b/app-emulation/opennebula/Manifest
new file mode 100644
index 0000000..ac2ea27
--- /dev/null
+++ b/app-emulation/opennebula/Manifest
@@ -0,0 +1,22 @@
+AUX 99one 29 SHA256 
23f712a26b7a9d679a7c515635e2733d67e3968e820ca786dbebe9ddc9a3fed7 SHA512 
6a8287ff68a6489a65ead46a9e456c4f985874ed3a307fae0c623d070383c663f3748124c48d3fb05df6511e0388278d8afe00fb7427e6674903d079ee611f2d
 WHIRLPOOL 
7e63f6312558ba5dad28f7fa56812dd55fcaf4022998ac466405967f9175110d168dc8ea18dff7b27eea3384423166a3dc77a0cf32fc6900c1b60bdf8fa93c0e
+AUX OpenNebulaVNC.rb.diff 428 SHA256 
c90ca535030d2c847fe708613cb287b6c3ba4082b9bb2799a8e516be505260c6 SHA512 
f8597bd1ee6577e5dc2b06e03cd2ccd7fb9a0262d3e645822be54eb34a1fdec8f420b0ee8b53eb1902a0c94d22f09a7077e1e47960e36d854973ec9e45143182
 WHIRLPOOL 
c9ab1e2240db6b9358d3958aac99159f29f4b929bf946d4d6a7018e1348a0561ada4cdee8128ba5e6c2cb5491f3a7e003cdc8f68cc1f381542b5bf50d8e51475
+AUX one_auth 18 SHA256 
dc0dc9ebd04d211e795a6407c8431e4950407d42fde53755fa09bf06234543d1 SHA512 
c4cc94b521013fffbaba6c0949e753e3239b5e5555734b783dc9f5929d212a8530215fddd311424cee51228ebfdb61d622bbdfaa768dc08603341ac70b010c14
 WHIRLPOOL 
f6ae1dec20c7057d2f6a17b2d76edb9df870bc88b1f404c5f22d417819f17af798d34cbb8753862631d5702ee4deb56b7bcfd701cd5a818e10ad637caa729752
+AUX oneflow-server.confd 162 SHA256 
a467adec388b323907c4ed5d62e7015004cac47a674412537e3a21509cb29315 SHA512 
0b9ac8968731b1da1e66725b18491014949d7225e38ca8ad7c0cfedf44d055dd9c170298b5ead6b10dcc13a2d60c30013288d9b818f09ff05f3c8905924e9532
 WHIRLPOOL 
040fc3e0aefc277fa2d85639ba653a6f36b36845e6ee62794bdd4dbb2c5e953207f9957a1940abeafb1632735b71cb9acbd1d538f826c940a3d5971de1ad1e39
+AUX oneflow-server.initd 780 SHA256 
1829972bbf671b75ae2c2975aed8d88f7bb1788474961db25ebbc737529cdf87 SHA512 
4fa3c5339c8baadaeb48e6bf1beab1a25c2bd3af3c389414e4456fafa6582e80abcdafd46e6f497ac950316b8859a673cf2f2012e840c5ac2edcf95cc3fb7eb1
 WHIRLPOOL 
d979b1fff77e6afb6c63d2a9f551f25853999b27fa2a175796721ad0931dffff4be855d262ffd2f85ff66613c21e19c2c36f5d26a5139d91f90ce6818f3f5ae5
+AUX opennebula-econe.service 335 SHA256 
5f95bac1eca00d126c16b7515f27c713894470a391cc6ee02f3f4592602b4265 SHA512 
07c0da1ca2e40cdb479b733c542eb66624963397d7a8916060614b5b9426cc059e438a86839b70da30dc293e6d4b72a80b35a73f6596a0d91fc2101365f6f95c
 WHIRLPOOL 
0873a98059662e16e98bda13c73eac1b594c730b3d056f58e56d874a4b8623c00bcb4ce6d0958ffb2f77e2faa7236967ef92f29b65fac65fe5f918bb10d3ea38
+AUX opennebula-oneflow.service 339 SHA256 
ed04fc1a6957a8926611e0ed8553fdf0075e714b9c5fec556e838ec31e503eb0 SHA512 
35bf121270602462f180d621e210ae814c240774c834150c971c1db0f96266e1b23844e0f460a13f401f9290a2155b5ea2732b831f4af5fa8010a06b1ead3ae8
 WHIRLPOOL 
18422c3067bf3621941b6079b9d78fb9da657fd5a7ee078a1c5273a7ef33d16802fa350860f23ec147b04007b412cfbacbadb6085d119a50cd8f476b864349f2
+AUX opennebula-onegate.service 341 SHA256 
e90299f1f3edffe523b3bd39dfed9579156c17bed4039fc1065a1d2a1f112a8b SHA512 
5da2c794d6c207765901573813cbb03198e34022a574f47c90cdc9f6c5e023c98860afe9a4f3847de1a2b5f759fb48c3cf01881d3fa0876b919ecd9c7dd8b6da
 WHIRLPOOL 
fd7cc053c8c4dce01bbfaa69a02033ab60202a314f09ed1719bc7f479385830e1b65a45a36ff6a3c23a2ff2ea8cbd2f657fe4cbfa07289871f705052bb55e1c9
+AUX opennebula-sunstone.service 342 SHA256 
fb85b22d93521d43254bbaad1c41188512b555f93c592d4497e5637cfd1036a8 SHA512 
8fb6f829ffdcb6ea60b38ef61972127d82691ff91b6cb1ab0f3fc5addac3a6299504533e0145e2a544d4d39f54e216ce872d60586d98e2cebd146480e5fea0f4
 WHIRLPOOL 
fa12d36613de688a026a4b39eae3d3e7a06aa2ff493627fe6863420a9bb2579171ae53bfc281ec160c05539ebc5ae030f0d48659f77844e98b39b91cab60d716
+AUX opennebula.confd 189 SHA256 
365f51b85f300ec658a7af6d5fb784bc15e9d6ca90e4fca63fa19e112967d089 SHA512 
78378b3046cb2d267502349250155f1f805f86465219cf8644064cf3227323b270777f73637fe5e2136691e8564c99b47a61aae47dda9d6c1177bf50b551d746
 WHIRLPOOL 
c591d8eba2b9f889f3f8c2393f00f9db90b652e4b9ffcdc05a1c2cfb98acd0f55ec3b8d7ca7bbcc32b1bc6bcf3ea95c4cd57c2dc037bdaf90dc61ba8b0bbd592
+AUX opennebula.initd 913 SHA256 
46b73e063c1ce85f7f3787c84638daaa26dec419d9b4434a570b9dc43167f33e SHA512 
74fb19970136d6d1b4a7b9d6279249c47ca7cbb6e4e9f90555a6ffd93963957fbc9ccb1b97c9355211057d715fb947aea968db40f7d89d61fff34c3b1331879e
 WHIRLPOOL 
431bb8db102116ce96a27127396e1dea139ffa8e397e62258489e43c48c6edf66fbedae9348ed652d364859881f2cc9eefb8669df03b2e65dd263b6984ed72ed
+AUX opennebula.service 498 SHA256 
fa65dc8009108be88d4cd76696ba6d7f401610cd885d1ea402445886a28fb919 SHA512 
e0a67a04fa1ec1098f123cd05b88f14a624f7251f5972a753f1f38a097edb7fc2562db3ccce7173bd6927da948e3abc4e306d8ef7bdb84e2eab9f64f2e05b530
 WHIRLPOOL 
92ee386ea21f0e252fa1758837f549fe08e884c355212e206e35110521ff50f262bf30833c4859b19d6fd1695d0d032be803c864a765c2433ac8846760020be0
+AUX sunstone-server.confd 166 SHA256 
e64d5a40cf3ce666f76e36ffdd2da8c60bfcacc8d7ddc9306a16ead9a3451cb4 SHA512 
fe70685cd1aad949c8f46c85764ff62f67b55477879b5d125f2f5ed176d13171762e9ef953b6d5cd6e27d4fb9f503b9fe7ac4ef0fa1f9790f86f9698d3b82079
 WHIRLPOOL 
83c25758930b52a2cb8abdb6024db51c3e74280d4fc5d4d7647d23b32a5b04d61539a0a53a597f3a8af210e6862f66a645c33fb86a1e01bfef395e1c4b032c58
+AUX sunstone-server.initd 788 SHA256 
7232a684536e2d1c12bd2a5ee10bb48ec19ea6a92301aa585807cc2f48221d0e SHA512 
fa2d6ee6e86e2497adc7792e67140810761c7403ffec3a9def57e7568180c99f17561381462648c8cbe43b12e4b36a146e48973de979b321002c1a566beb727e
 WHIRLPOOL 
30a3d05dbcd5478af47a0cda70156c7ddc1612ba8f77ebf194be4e11aee964ba33589d9d3c89ae7f1016b73ee46ffcf3d6a06faa207c05f912f28c911ac4857e
+AUX tmpfilesd.opennebula.conf 85 SHA256 
2e1ab17fb0378c72a7882eb9ece43d82834185886f4e438c39539d80859a5569 SHA512 
d9ce8bd7b6be43e3129acf51eb6b17b06cecd06e4d92a064a168b0296ae3b5703b80255806e0e7f8e533d291e3e65f38cc4a4372a4d811eae725775fdd54e44a
 WHIRLPOOL 
d0b26b8f8edccdd00e991c248a9ab91c3c07b66fe73c9c20b0f85aac311cd8bc5339a1a0e31c63c13a842d4eea298ea1e0ee2d8a2aaf08700c1a25ec56d56b2f
+AUX websocket.py.diff 274 SHA256 
820cbe4f6cf23fc5edd30ce96b3786c07b5d8b55a3a9856632e4c3176faa7fe1 SHA512 
37536922c0160ee36b115f8ccfce54f2eef589f1a10df8022316247e996ccf542e193f7af13c8c00f89ab4993008a5d6f31561ccafbc0e6e4dd14eeb9ac2ea29
 WHIRLPOOL 
b0b7386d6e30c1f6f29e86c301e7f45e1d9d914db7c5f72650128ce7037ef62ba74991e220f66810b200a629b1c591a3bef127f4df5524ad9bc4b9720589a66b
+AUX websocketproxy.py.diff 291 SHA256 
a48ccd67ba84e624dfb9730f38ba39509379afe3e52ace8135579c576623dd8b SHA512 
3c176c8709d28a2b506cb915bc00947b031e621267650b7282e26ffaf810f3a5aa128576c9cebd7cec0f320f6a173a4f8aa723898d7d5fdcf7710d484da1416a
 WHIRLPOOL 
cd79508aada3d20334e1fa6a333f792d65d49e03475334f8e58d5d9c56448468413d230f274ee175b811ed61fd6e18e67a4b10c13f18c1062bcf2172f7f603b4
+DIST opennebula-4.14.2.tar.gz 9283555 SHA256 
b9a3b2389d83ff1a5fa5d4e4fad34628c1b0ce0e2ff0e52fbc21d5ebb2420c67 SHA512 
ed572bf1a6e0a4eecb85c1f2beb1f686e6729f74a354f41dbb5113fd089af06013f63d022ee8c068234e5be64df818771a0ba0c452ffbf4fd096dd16cf878926
 WHIRLPOOL 
56ab92ec379e47f795373d4755956764b37bf96aec8bedc5503e38aa6acb00a94c928dcc66169aa769434270eb1caefd77a2094771612a8ee1a3d08d8e0e953c
+DIST opennebula-5.0.2.tar.gz 12041225 SHA256 
4867fe44739136ffbb9f91ea9a56501bd1cc2d1f19d813818ab5bf21c0cc9878 SHA512 
95d61476538e32b75c3ac870c4ba19e4f352a90e1d6e76355efab4f4679291ba2fcd223ec39f9b3cbd29bc5c5c7a5388c1c402c5c84b22f81729ff240b6d34b6
 WHIRLPOOL 
77e04bfb9054872d91570b196256e247b7e9d2df1dcf01f946bc6776ea237f8dd236a82b0bc58c172672f8667537df61a3cce4052fb5777b130795291c4e6b59
+EBUILD opennebula-4.14.2.ebuild 5992 SHA256 
83518d6e6199aacd9c9f7c35bf5c0d88d905f34736773217819924850ae85a51 SHA512 
cc18db5d7480f2067d95deb6a61df6c0a40a11ab9e4f6e2491fccdac34f349d527b6ffeedb2d2d2f04c3dba210c2a1316c635b4f69064a69bfd378ea0c4f9ebe
 WHIRLPOOL 
ec9208b6607382b3f3985d1c6255ec9c66455f9c1bf2ae8979b328216d35e9536ad7ce55b85e52f06c44af1dc7cb6174e1fb2faa1b45eff11c686a9dbabd7f16
+EBUILD opennebula-5.0.2.ebuild 5141 SHA256 
d900142aae83b24902e288dac45e77c69c6a4cf525b2b264d89155754ae1f1b6 SHA512 
bb795f1c68dfa232cdca9a67a50b892d2eaf3c5c43db2344864cfc81af25f1486f7762d721c1a29d39aae135c91d57cc1b5a37691e2500783bf546ba615d08a9
 WHIRLPOOL 
154ceb6990ba596f6d5abcabad3a686007eca1546deeee0e36594827ead744cf8851dfb08b89c32a9a833af15e808310cf283a130164a5abb3c5088d8a224e87
+MISC metadata.xml 471 SHA256 
7e7ba4805811857e33a2374831129a50002448d7dcceb640585a4166103e4e63 SHA512 
0be6058785693cef097e2b3ffcffbc7b0011719afcaaf4d10116f490dc23291bdbb9e91f42977c82ef002967a4cbd56f1bebe1f1e61a053a659250a54d7d67d1
 WHIRLPOOL 
b7039f60c5f28c905a0332ff5cffc0c9ffa1ae8897faa927fb21bfbc909d11fcca95af2bf822c014f4d9c5ca325d3c1cd2446331bcb7f8b639a0a523dd14ad95

diff --git a/app-emulation/opennebula/files/99one 
b/app-emulation/opennebula/files/99one
new file mode 100644
index 0000000..53e21b1
--- /dev/null
+++ b/app-emulation/opennebula/files/99one
@@ -0,0 +1 @@
+ONE_AUTH="/etc/one/one_auth"

diff --git a/app-emulation/opennebula/files/OpenNebulaVNC.rb.diff 
b/app-emulation/opennebula/files/OpenNebulaVNC.rb.diff
new file mode 100644
index 0000000..dd81359
--- /dev/null
+++ b/app-emulation/opennebula/files/OpenNebulaVNC.rb.diff
@@ -0,0 +1,11 @@
+--- src/sunstone/OpenNebulaVNC.rb      2015-11-24 14:40:58.913099865 +0100
++++ src/sunstone/OpenNebulaVNC.rb      2015-11-25 06:53:11.945501334 +0100
+@@ -146,7 +146,7 @@
+             proxy_options << " -6"
+         end
+ 
+-        cmd ="python #{@proxy_path} #{proxy_options} #{@proxy_port}"
++        cmd ="python2 #{@proxy_path} #{proxy_options} #{@proxy_port}"
+ 
+         begin
+             @logger.info { "Starting VNC proxy: #{cmd}" }

diff --git a/app-emulation/opennebula/files/one_auth 
b/app-emulation/opennebula/files/one_auth
new file mode 100644
index 0000000..b80189c
--- /dev/null
+++ b/app-emulation/opennebula/files/one_auth
@@ -0,0 +1 @@
+oneadmin:oneadmin

diff --git a/app-emulation/opennebula/files/oneflow-server.confd 
b/app-emulation/opennebula/files/oneflow-server.confd
new file mode 100644
index 0000000..67d6db8
--- /dev/null
+++ b/app-emulation/opennebula/files/oneflow-server.confd
@@ -0,0 +1,10 @@
+
+# opennebula user
+USER="oneadmin"
+GROUP="oneadmin"
+
+ONEFLOWSERVER_STARTOPTIONS="start"
+ONEFLOWSERVER_STOPOPTIONS="stop"
+
+ONEFLOW_PID="/var/run/one/oneflow.pid"
+

diff --git a/app-emulation/opennebula/files/oneflow-server.initd 
b/app-emulation/opennebula/files/oneflow-server.initd
new file mode 100644
index 0000000..1d62127
--- /dev/null
+++ b/app-emulation/opennebula/files/oneflow-server.initd
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: 
/var/cvsroot/gentoo-x86/app-emulation/opennebula/files/opennebula.initd,v 1.1 
2010/08/11 16:07:57 dev-zero Exp $
+
+depend() {
+    after mysql
+    use libvirtd
+}
+
+start() {
+
+    ebegin "Starting Oneflow Server"
+    start-stop-daemon \
+        --start \
+        --exec /usr/bin/oneflow-server \
+        --user ${USER}:${GROUP} \
+       --pidfile ${ONEFLOW_PID} \
+        -- ${ONEFLOWSERVER_STARTOPTIONS}
+    eend $?
+}
+
+stop() {
+
+    ebegin "Stopping Oneflow Server"
+    start-stop-daemon \
+        --stop \
+        --exec /usr/bin/oneflow-server \
+       --user ${USER}:${GROUP} \
+       --pidfile ${ONEFLOW_PID} \
+       -- ${ONEFLOWSERVER_STOPOPTIONS} \
+    eend $?
+
+}

diff --git a/app-emulation/opennebula/files/opennebula-econe.service 
b/app-emulation/opennebula/files/opennebula-econe.service
new file mode 100644
index 0000000..ee0d0ab
--- /dev/null
+++ b/app-emulation/opennebula/files/opennebula-econe.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=OpenNebula econe Server
+After=network.target local-fs.target remote-fs.target opennebula.service
+Requires=opennebula.service
+
+[Service]
+User=oneadmin
+Group=oneadmin
+Type=forking
+PermissionsStartOnly=true
+ExecStart=/usr/bin/econe-server start
+ExecStop=/usr/bin/econe-server stop
+
+[Install]
+WantedBy=multi-user.target

diff --git a/app-emulation/opennebula/files/opennebula-oneflow.service 
b/app-emulation/opennebula/files/opennebula-oneflow.service
new file mode 100644
index 0000000..360dcc7
--- /dev/null
+++ b/app-emulation/opennebula/files/opennebula-oneflow.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=OpenNebula econe Server
+After=network.target local-fs.target remote-fs.target opennebula.service
+Requires=opennebula.service
+
+[Service]
+User=oneadmin
+Group=oneadmin
+Type=forking
+PermissionsStartOnly=true
+ExecStart=/usr/bin/oneflow-server start
+ExecStop=/usr/bin/oneflow-server stop
+
+[Install]
+WantedBy=multi-user.target

diff --git a/app-emulation/opennebula/files/opennebula-onegate.service 
b/app-emulation/opennebula/files/opennebula-onegate.service
new file mode 100644
index 0000000..821aa28
--- /dev/null
+++ b/app-emulation/opennebula/files/opennebula-onegate.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=OpenNebula onegate Server
+After=network.target local-fs.target remote-fs.target opennebula.service
+Requires=opennebula.service
+
+[Service]
+User=oneadmin
+Group=oneadmin
+Type=forking
+PermissionsStartOnly=true
+ExecStart=/usr/bin/onegate-server start
+ExecStop=/usr/bin/onegate-server stop
+
+[Install]
+WantedBy=multi-user.target

diff --git a/app-emulation/opennebula/files/opennebula-sunstone.service 
b/app-emulation/opennebula/files/opennebula-sunstone.service
new file mode 100644
index 0000000..a3787b6
--- /dev/null
+++ b/app-emulation/opennebula/files/opennebula-sunstone.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=OpenNebula Web Interface
+After=network.target local-fs.target remote-fs.target opennebula.service
+Requires=opennebula.service
+
+[Service]
+User=oneadmin
+Group=oneadmin
+Type=forking
+PermissionsStartOnly=true
+ExecStart=/usr/bin/sunstone-server start
+ExecStop=/usr/bin/sunstone-server stop
+
+[Install]
+WantedBy=multi-user.target

diff --git a/app-emulation/opennebula/files/opennebula.confd 
b/app-emulation/opennebula/files/opennebula.confd
new file mode 100644
index 0000000..0a14ca8
--- /dev/null
+++ b/app-emulation/opennebula/files/opennebula.confd
@@ -0,0 +1,12 @@
+
+# opennebula user
+USER="oneadmin"
+GROUP="oneadmin"
+
+# options for oned
+ONE_STARTOPTIONS="start"
+ONE_STOPOPTIONS="stop"
+
+ONE_PID="/var/run/one/oned.pid"
+SCHED_PID="/var/run/one/sched.pid"
+

diff --git a/app-emulation/opennebula/files/opennebula.initd 
b/app-emulation/opennebula/files/opennebula.initd
new file mode 100644
index 0000000..d8ba3d1
--- /dev/null
+++ b/app-emulation/opennebula/files/opennebula.initd
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: 
/var/cvsroot/gentoo-x86/app-emulation/opennebula/files/opennebula.initd,v 1.1 
2010/08/11 16:07:57 dev-zero Exp $
+
+depend() {
+    after mysql
+    use libvirtd
+}
+
+start() {
+    ebegin "Starting OpenNebula daemon"
+    start-stop-daemon \
+        --start \
+        --exec /usr/bin/one \
+        --user ${USER}:${GROUP} \
+       --pidfile ${ONE_PID} \
+        -- ${ONE_STARTOPTIONS}
+    eend $?
+
+}
+
+stop() {
+    ebegin "Stopping OpenNebula daemon"
+    start-stop-daemon \
+        --stop \
+        --exec /usr/bin/one \
+       --user ${USER}:${GROUP} \
+       --pidfile ${ONE_PID} \
+       -- ${ONE_STOPOPTIONS}
+    eend $?
+
+    ebegin "Stopping Scheduler Deamon"
+    start-stop-daemon \
+        --stop \
+        --exec /usr/bin/mm_sched \
+       --user ${USER}:${GROUP} \
+       --pidfile ${SCHED_PID} \
+    eend $?
+}

diff --git a/app-emulation/opennebula/files/opennebula.service 
b/app-emulation/opennebula/files/opennebula.service
new file mode 100644
index 0000000..3d7d641
--- /dev/null
+++ b/app-emulation/opennebula/files/opennebula.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=OpenNebula management
+After=network.target local-fs.target remote-fs.target mysqld.service 
+
+[Service]
+User=oneadmin
+Group=oneadmin
+Type=forking
+PermissionsStartOnly=true
+ExecStartPre=/usr/bin/mkdir -p /var/run/one
+ExecStartPre=/usr/bin/mkdir -p /var/lock/one
+ExecStartPre=/usr/bin/chown -R oneadmin:oneadmin /var/run/one
+ExecStartPre=/usr/bin/chown -R oneadmin:oneadmin /var/lock/one
+ExecStart=/usr/bin/one start
+ExecStop=/usr/bin/one stop
+
+[Install]
+WantedBy=multi-user.target

diff --git a/app-emulation/opennebula/files/sunstone-server.confd 
b/app-emulation/opennebula/files/sunstone-server.confd
new file mode 100644
index 0000000..b073c4a
--- /dev/null
+++ b/app-emulation/opennebula/files/sunstone-server.confd
@@ -0,0 +1,10 @@
+
+# opennebula user
+USER="oneadmin"
+GROUP="oneadmin"
+
+SUNSTONESERVER_STARTOPTIONS="start"
+SUNSTONESERVER_STOPOPTIONS="stop"
+
+SUNSTONE_PID="/var/run/one/sunstone.pid"
+

diff --git a/app-emulation/opennebula/files/sunstone-server.initd 
b/app-emulation/opennebula/files/sunstone-server.initd
new file mode 100644
index 0000000..af2e7a7
--- /dev/null
+++ b/app-emulation/opennebula/files/sunstone-server.initd
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: 
/var/cvsroot/gentoo-x86/app-emulation/opennebula/files/opennebula.initd,v 1.1 
2010/08/11 16:07:57 dev-zero Exp $
+
+depend() {
+    after mysql
+    use libvirtd
+}
+
+start() {
+
+    ebegin "Starting Sunstone Server"
+    start-stop-daemon \
+        --start \
+        --exec /usr/bin/sunstone-server \
+        --user ${USER}:${GROUP} \
+       --pidfile ${SUNSTONE_PID} \
+        -- ${SUNSTONESERVER_STARTOPTIONS}
+    eend $?
+}
+
+stop() {
+
+    ebegin "Stopping Sunstone Server"
+    start-stop-daemon \
+        --stop \
+        --exec /usr/bin/sunstone-server \
+       --user ${USER}:${GROUP} \
+       --pidfile ${SUNSTONE_PID} \
+       -- ${SUNSTONESERVER_STOPOPTIONS} \
+    eend $?
+
+}

diff --git a/app-emulation/opennebula/files/tmpfilesd.opennebula.conf 
b/app-emulation/opennebula/files/tmpfilesd.opennebula.conf
new file mode 100644
index 0000000..e5fcf81
--- /dev/null
+++ b/app-emulation/opennebula/files/tmpfilesd.opennebula.conf
@@ -0,0 +1,2 @@
+d /var/run/one 0775    oneadmin oneadmin 10d
+d /var/lock/one        0775    oneadmin oneadmin 10d

diff --git a/app-emulation/opennebula/files/websocket.py.diff 
b/app-emulation/opennebula/files/websocket.py.diff
new file mode 100644
index 0000000..a0c2ae6
--- /dev/null
+++ b/app-emulation/opennebula/files/websocket.py.diff
@@ -0,0 +1,8 @@
+--- share/websockify/websocket.py      2015-11-24 14:40:59.913067107 +0100
++++ share/websockify/websocket.py      2015-11-25 06:42:55.812870475 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ '''
+ Python WebSocket library with support for "wss://" encryption.

diff --git a/app-emulation/opennebula/files/websocketproxy.py.diff 
b/app-emulation/opennebula/files/websocketproxy.py.diff
new file mode 100644
index 0000000..73d4454
--- /dev/null
+++ b/app-emulation/opennebula/files/websocketproxy.py.diff
@@ -0,0 +1,8 @@
+--- share/websockify/websocketproxy.py 2015-11-24 14:40:59.913067107 +0100
++++ share/websockify/websocketproxy.py 2015-11-25 06:41:56.997543031 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ '''
+ A WebSocket to TCP socket proxy with support for "wss://" encryption.

diff --git a/app-emulation/opennebula/metadata.xml 
b/app-emulation/opennebula/metadata.xml
new file mode 100644
index 0000000..e96ef82
--- /dev/null
+++ b/app-emulation/opennebula/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <herd>opennebula</herd>
+       <longdescription>
+               Virtual management infrastructure as a service (IaaS) toolkit
+               for cloud computing.
+
+               Official documentation at
+               http://docs.opennebula.org/stable
+       </longdescription>
+       <use>
+               <flag name='extras'>Enables additional packages found on
+                       arch aur opennebula version.
+               </flag>
+       </use>
+</pkgmetadata>

diff --git a/app-emulation/opennebula/opennebula-4.14.2.ebuild 
b/app-emulation/opennebula/opennebula-4.14.2.ebuild
new file mode 100644
index 0000000..56fba6a
--- /dev/null
+++ b/app-emulation/opennebula/opennebula-4.14.2.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+#
+# Official documentation
+#  * Build dependencies - 
http://docs.opennebula.org/4.14/integration/references/build_deps.html
+#  * Building from source - 
http://docs.opennebula.org/4.14/integration/references/compile.html
+#
+# Inspired by 
+#  * http://gpo.zugaina.org/app-emulation/opennebula/ChangeLog
+#  * https://github.com/himbeere/opennebula
+#
+
+EAPI=5
+USE_RUBY="ruby20 ruby21"
+
+inherit eutils multilib user ruby-ng
+
+DESCRIPTION="OpenNebula exists to help companies build simple, cost-effective, 
reliable, open enterprise clouds on existing IT infrastructure."
+HOMEPAGE="http://www.opennebula.org/";
+SRC_URI="http://downloads.opennebula.org/packages/${P}/${P}.tar.gz";
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64"
+
+IUSE="-flow frontend -gate -node mysql -sqlite -sunstone syslog qemu -xen"
+REQUIRED_USE="
+       ?? ( node frontend )
+       node? ( ||  ( !flow !frontend !gate !sunstone qemu xen ) )
+       frontend? ( || ( mysql sqlite ) )
+       flow? ( frontend )
+       gate? ( frontend )
+       sunstone? ( frontend )
+"
+
+ONE_DEPEND="
+       >=dev-ruby/sequel-4
+       dev-ruby/json
+       dev-ruby/rack
+       dev-ruby/sinatra
+       www-servers/thin
+"
+
+RDEPEND="
+       dev-libs/libxml2
+       net-misc/openssh
+       sys-apps/pciutils
+       sys-apps/usbutils
+       >=dev-libs/xmlrpc-c-1.31[abyss,cxx,threads]
+       >=dev-lang/ruby-1.8.7
+       >=dev-libs/openssl-0.9.8
+       !node? (
+               mysql? ( 
+                       >=virtual/mysql-5.5
+                       dev-ruby/mysql2
+               )
+               sqlite? (
+                       dev-db/sqlite:3
+                       dev-ruby/sqlite3
+               )
+               syslog? (
+                       dev-libs/log4cpp
+                       virtual/logger
+               )
+               flow? (${ONE_DEPEND})
+               gate? (${ONE_DEPEND})
+               sunstone? (
+                       ${ONE_DEPEND}
+                       www-apps/novnc
+               )
+       )
+    qemu? ( 
+               app-emulation/libvirt[libvirtd,qemu]
+               app-emulation/qemu[vnc]
+       )
+       xen? (
+               app-emulation/xen-tools
+       )
+"
+DEPEND="
+       >=dev-util/scons-1.2.0-r1
+       ${RDEPEND}
+"
+
+ruby_add_rdepend "
+       dev-ruby/nokogiri
+       dev-ruby/crack
+       dev-ruby/curb
+"
+
+# make sure no eclass is running tests
+RESTRICT="test"
+
+# opennebula-4.12.0/work/opennebula-4.12.0
+S="${S}/${P}"
+
+ONEUSER="oneadmin"
+ONEGROUP="oneadmin"
+
+pkg_setup () {
+       enewgroup ${ONEGROUP}
+       if use qemu; then
+               enewuser ${ONEUSER} -1 /bin/bash /var/lib/one 
"${ONEGROUP},kvm,qemu"
+       else
+               enewuser ${ONEUSER} -1 /bin/bash /var/lib/one "${ONEGROUP}"
+       fi
+}
+
+src_unpack() {
+       default
+}
+
+src_prepare() {
+    epatch "${FILESDIR}/OpenNebulaVNC.rb.diff"
+    epatch "${FILESDIR}/websocketproxy.py.diff"
+    epatch "${FILESDIR}/websocket.py.diff"
+}
+
+
+src_configure() {
+       :
+}
+
+src_compile() {
+       local myconf="new_xmlrpc=yes "
+
+       use mysql \
+               && myconf+="mysql=yes " \
+               || myconf+="mysql=no "
+
+       use sqlite \
+               && myconf+="sqlite=yes " \
+               || myconf+="sqlite=no "
+
+       use syslog \
+               && myconf+="syslog=yes "
+
+       # FIXME
+       # creates minified css and js only, it is not required for sunstone to 
run
+       # fails because it needs grunt, sass and possibly something else
+       #use sunstone \
+       #       && myconf+="sunstone=yes "
+
+       if use frontend; then
+               scons \
+                       ${myconf} \
+                       $(sed -r 's/.*(-j\s*|--jobs=)([0-9]+).*/-j\2/' <<< 
${MAKEOPTS}) \
+                       || die "building ${PN} failed"
+       fi
+}
+
+src_install() { 
+       if use node; then
+               src_install_node
+       elif use frontend; then
+               src_install_frontend
+       fi
+}
+
+src_install_node() {
+       dodir /var/{lib,log,run,tmp}/one /var/lib/one/{datastores,remotes} || 
die "dodir failed"
+}
+
+src_install_frontend() {
+       DESTDIR="${T}/one" ./install.sh -u "$ONEUSER" -g "$ONEGROUP"
+       cd "${T}/one"
+       # installing things for real
+       dodir /var/{lib,lock,log,run,tmp}/one /var/lib/one/datastores 
/usr/$(get_libdir)/one /usr/share/one  || die "dodir failed"
+       cp -a lib/* "${D}/usr/$(get_libdir)/one/" || die "copying lib files 
failed"
+       cp -a var/remotes "${D}/var/lib/one/" || die "copying remotes failed"
+       cp -a share/websockify "${D}/usr/share/one/" || die "copying websockify 
failed"
+       dobin bin/*
+    doman share/man/*/*[0-9].gz
+       insinto /usr/share/doc/${PF}
+       doins -r share/docs/*
+       doins -r share/examples
+       doenvd "${FILESDIR}/99one"
+       newinitd "${FILESDIR}/opennebula.initd" opennebula
+       newconfd "${FILESDIR}/opennebula.confd" opennebula
+       newinitd "${FILESDIR}/sunstone-server.initd" sunstone-server
+       newconfd "${FILESDIR}/sunstone-server.confd" sunstone-server
+       newinitd "${FILESDIR}/oneflow-server.initd" oneflow-server
+       newconfd "${FILESDIR}/oneflow-server.confd" oneflow-server
+       insinto /etc/one
+       insopts -m 0640
+       doins -r etc/*
+       doins "${FILESDIR}/one_auth"
+       doins "${FILESDIR}/tmpfilesd.opennebula.conf"
+       fowners -R root:${ONEGROUP} /etc/one
+       fowners ${ONEUSER}:${ONEGROUP} /etc/one/one_auth
+}
+
+src_install_sunstone() {
+       :
+}
+
+src_install_gate() {
+       :
+}
+
+src_install_flow() {
+       :
+}
+
+pkg_postinst() {
+       chown -R oneadmin:oneadmin ${ROOT}var/{lock,lib,log,run,tmp}/one
+
+       if use qemu ; then
+               elog "Make sure that the user ${ONEUSER} has access to the 
libvirt"
+               elog "control socket /var/run/libvirt/libvirt-sock"
+               elog "To check this as ${ONEUSER} user issue command:"
+               elog "  virsh -c qemu:///system nodeinfo"
+               echo ""
+               elog "Make sure to set user = ${ONEUSER} and group = 
${ONEGROUP} and"
+               elog "dynamic_ownership = 0 in /etc/libvirt/qemu.conf."
+               echo ""
+               elog "OpenNebula doesn't allow you to specify the disc format."
+               elog "Unfortunately the default in libvirt is not to guess and"
+               elog "it therefores assumes a 'raw' format when using qemu/kvm."
+               elog "Set 'allow_disk_format_probing = 0' in 
/etc/libvirt/qemu.conf"
+               elog "to work around this until OpenNebula fixes it."
+       fi
+
+
+#      local onedir="${EROOT}var/lib/one"
+#      if [ ! -d "${onedir}/.ssh" ] ; then
+#              einfo "Generating ssh-key..."
+#              umask 0027 || die "setting umask failed"
+#              mkdir "${onedir}/.ssh" || die "creating ssh directory failed"
+#              ssh-keygen -q -t dsa -N "" -f "${onedir}/.ssh/id_dsa" || die 
"ssh-keygen failed"
+#              cat > "${onedir}/.ssh/config" <<EOF
+#UserKnownHostsFile /dev/null
+#Host *
+#    StrictHostKeyChecking no
+#EOF
+#              cat "${onedir}/.ssh/id_dsa.pub"  >> 
"${onedir}/.ssh/authorized_keys" || die "adding key failed"
+#              chown -R ${ONEUSER}:${ONEGROUP} "${onedir}/.ssh" || die 
"changing owner failed"
+#      fi
+}

diff --git a/app-emulation/opennebula/opennebula-5.0.2.ebuild 
b/app-emulation/opennebula/opennebula-5.0.2.ebuild
new file mode 100644
index 0000000..6b6aded
--- /dev/null
+++ b/app-emulation/opennebula/opennebula-5.0.2.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+USE_RUBY="ruby20 ruby21"
+
+inherit user eutils multilib ruby-ng systemd
+
+MY_P="opennebula-${PV/_/-}"
+
+DESCRIPTION="OpenNebula Virtual Infrastructure Engine"
+HOMEPAGE="http://www.opennebula.org/";
+SRC_URI="http://downloads.opennebula.org/packages/${PN}-${PV}/${PN}-${PV}.tar.gz";
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="qemu +mysql xen sqlite +extras systemd"
+
+RDEPEND=">=dev-libs/xmlrpc-c-1.18.02[abyss,cxx,threads]
+       dev-lang/ruby
+       extras? ( dev-libs/openssl
+               dev-ruby/libxml
+               net-misc/curl
+               dev-libs/libxslt
+               dev-libs/expat
+               dev-libs/log4cpp )
+       mysql? ( virtual/mysql )
+       dev-db/sqlite
+       net-misc/openssh
+       || ( app-cdr/cdrkit app-cdr/cdrtools )
+       sqlite? ( dev-ruby/sqlite3 )
+       qemu? ( app-emulation/libvirt[libvirtd,qemu] )
+       xen? ( app-emulation/xen-tools )"
+DEPEND="${RDEPEND}
+       >=dev-util/scons-1.2.0-r1
+       dev-ruby/nokogiri"
+
+# make sure no eclass is running tests
+RESTRICT="test"
+
+S="${WORKDIR}/${PN}-${PV}"
+
+ONEUSER="oneadmin"
+ONEGROUP="oneadmin"
+
+pkg_setup () {
+       enewgroup ${ONEGROUP}
+       enewuser ${ONEUSER} -1 /bin/bash /var/lib/one ${ONEGROUP}
+}
+
+src_unpack() {
+       default
+}
+
+src_prepare() {
+       sed -i -e 's|chmod|true|' install.sh || die "sed failed"
+}
+
+src_configure() {
+       :
+}
+
+src_compile() {
+
+       local myconf
+       use extras && myconf+="new_xmlrpc=yes "
+       use mysql && myconf+="mysql=yes " || myconf+="mysql=no "
+       scons \
+               ${myconf} \
+               $(sed -r 's/.*(-j\s*|--jobs=)([0-9]+).*/-j\2/' <<< ${MAKEOPTS}) 
\
+               || die "building ${PN} failed"
+}
+
+src_install() {
+       DESTDIR=${T} ./install.sh -u ${ONEUSER} -g ${ONEGROUP} || die "install 
failed"
+
+       cd "${T}"
+
+       # installing things for real
+       dobin bin/*
+
+       keepdir /var/{lib,run}/${PN} || die "keepdir failed"
+
+       dodir /usr/$(get_libdir)/one
+       dodir /var/lock/one
+       dodir /var/log/one
+       dodir /var/lib/one
+       dodir /var/run/one
+       dodir /var/tmp/one
+       # we have to preserve the executable bits
+       cp -a lib/* "${D}/usr/$(get_libdir)/one/" || die "copying lib files 
failed"
+
+       insinto /usr/share/doc/${PF}
+       doins -r share/examples
+
+       dodir /var/lib/one
+       dodir /var/lib/one/vms
+       dodir /usr/share/one
+       dodir /etc/tmpfiles.d
+       # we have to preserve the executable bits
+       cp -a var/remotes "${D}/var/lib/one/" || die "copying remotes failed"
+       cp -a share/* "${D}/usr/share/one/" || die "copying share failed"
+
+       doenvd "${FILESDIR}/99one"
+
+       newinitd "${FILESDIR}/opennebula.initd" opennebula
+       newinitd "${FILESDIR}/sunstone-server.initd" sunstone-server
+       newinitd "${FILESDIR}/oneflow-server.initd" oneflow-server
+       newconfd "${FILESDIR}/opennebula.confd" opennebula
+       newconfd "${FILESDIR}/sunstone-server.confd" sunstone-server
+       newconfd "${FILESDIR}/oneflow-server.confd" oneflow-server
+
+       use systemd && systemd_dounit 
"${FILESDIR}"/opennebula{,-sunstone,-econe,-oneflow,-onegate}.service
+
+       insinto /etc/one
+       insopts -m 0640
+       doins -r etc/*
+       doins "${FILESDIR}/one_auth"
+
+       insinto /etc/tmpfiles.d
+       doins "${FILESDIR}/tmpfilesd.opennebula.conf"
+
+}
+
+pkg_postinst() {
+
+
+       chown -R oneadmin:oneadmin ${ROOT}var/{lock,lib,log,run,tmp}/one
+       chown -R oneadmin:oneadmin ${ROOT}usr/share/one
+       chown -R oneadmin:oneadmin ${ROOT}etc/one
+       chown -R oneadmin:oneadmin ${ROOT}usr/lib/one
+
+       local onedir="${EROOT}var/lib/one"
+       if [ ! -d "${onedir}/.ssh" ] ; then
+               einfo "Generating ssh-key..."
+               umask 0027 || die "setting umask failed"
+               mkdir "${onedir}/.ssh" || die "creating ssh directory failed"
+               ssh-keygen -q -t dsa -N "" -f "${onedir}/.ssh/id_dsa" || die 
"ssh-keygen failed"
+               cat > "${onedir}/.ssh/config" <<EOF
+UserKnownHostsFile /dev/null
+Host *
+    StrictHostKeyChecking no
+EOF
+               cat "${onedir}/.ssh/id_dsa.pub"  >> 
"${onedir}/.ssh/authorized_keys" || die "adding key failed"
+               chown -R ${ONEUSER}:${ONEGROUP} "${onedir}/.ssh" || die 
"changing owner failed"
+       fi
+
+       if use qemu ; then
+               elog "Make sure that the user ${ONEUSER} has access to the 
libvirt control socket"
+               elog "  /var/run/libvirt/libvirt-sock"
+               elog "You can easily check this by executing the following 
command as ${ONEUSER} user"
+               elog "  virsh -c qemu:///system nodeinfo"
+               elog "If not using using policykit in libvirt, the file you 
should take a look at is:"
+               elog "  /etc/libvirt/libvirtd.conf (look for the 
unix_sock_*_perms parameters)"
+               elog "Failure to do so may lead to nodes hanging in PENDING 
state forever without further notice."
+               echo ""
+               elog "Should a node hang in PENDING state even with correct 
permissions, try the following to get more information."
+               elog "In /tmp/one-im execute the following command for the 
biggest one_im-* file:"
+               elog "  ruby -wd one_im-???"
+               echo ""
+               elog "OpenNebula doesn't allow you to specify the disc format."
+               elog "Unfortunately the default in libvirt is not to guess and"
+               elog "it therefores assumes a 'raw' format when using qemu/kvm."
+               elog "Set 'allow_disk_format_probing = 0' in 
/etc/libvirt/qemu.conf"
+               elog "to work around this until OpenNebula fixes it."
+       fi
+
+       elog "If you wish to use the sunstone server, please issue the command"
+       #elog "/usr/share/one/install_gems as oneadmin user"
+       elog "gem install sequel thin json rack sinatra builder"
+
+
+}

Reply via email to