Gentoo Archives: gentoo-commits

From: Samuel Bernardo <samuelbernardo.mail@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/user/ssnb:master commit in: app-emulation/opennebula/
Date: Sun, 01 Oct 2017 15:29:45
Message-Id: 1506871755.63ca0d3c6c8bacc9e10c49dc577bcc6a95bda3ef.samuelbernardo@gentoo
1 commit: 63ca0d3c6c8bacc9e10c49dc577bcc6a95bda3ef
2 Author: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
3 AuthorDate: Sun Oct 1 15:29:15 2017 +0000
4 Commit: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
5 CommitDate: Sun Oct 1 15:29:15 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=63ca0d3c
7
8 update opennebula
9
10 app-emulation/opennebula/Manifest | 2 +
11 app-emulation/opennebula/opennebula-5.4.1.ebuild | 186 +++++++++++++++++++++++
12 2 files changed, 188 insertions(+)
13
14 diff --git a/app-emulation/opennebula/Manifest b/app-emulation/opennebula/Manifest
15 index 30dd296..79b8ea3 100644
16 --- a/app-emulation/opennebula/Manifest
17 +++ b/app-emulation/opennebula/Manifest
18 @@ -19,8 +19,10 @@ DIST opennebula-4.14.2.tar.gz 9283555 SHA256 b9a3b2389d83ff1a5fa5d4e4fad34628c1b
19 DIST opennebula-5.0.2.tar.gz 12041225 SHA256 4867fe44739136ffbb9f91ea9a56501bd1cc2d1f19d813818ab5bf21c0cc9878 SHA512 95d61476538e32b75c3ac870c4ba19e4f352a90e1d6e76355efab4f4679291ba2fcd223ec39f9b3cbd29bc5c5c7a5388c1c402c5c84b22f81729ff240b6d34b6 WHIRLPOOL 77e04bfb9054872d91570b196256e247b7e9d2df1dcf01f946bc6776ea237f8dd236a82b0bc58c172672f8667537df61a3cce4052fb5777b130795291c4e6b59
20 DIST opennebula-5.2.0.tar.gz 12220329 SHA256 b1360a050645a3d135dabb4e834b5c656a98018308fc7a2fabc214c0730eefa3 SHA512 e0095bb452198bbd72e946651a004005c0315137b9a7093226298138226f59630147e07ec66766ac8def74a580dc4f1f5d90739033d445b61d8f98fc2239ab58 WHIRLPOOL 1cce691266947583a1716a8d41ae449e69b30da750e253b898a6564f386e4378c4c0ad85077fa5fe864200bc17c9c4d626d899ba02e91b2d418e675503f67f7e
21 DIST opennebula-5.2.1.tar.gz 12224129 SHA256 3864e209ffc99c474f5dd7eeebaf3c4c00ff51b0059680c63ee0ad4330f3a211 SHA512 f46d722b6fbea4406000dafeb0ed3d26c61e35645a8de028c39d160879af5ab93352a8f2407fc637b39d5a600d39015be3cc29af32d9fc69a678a8e8cf4f7400 WHIRLPOOL fbe685ec32fd02d65c60ad13f5e63d6f76b528084759e732b263d22218e10585f05808a3dab6022fea59f2fdc6920a7247685f808795c905204dcc743342eadc
22 +DIST opennebula-5.4.1.tar.gz 14652947 SHA256 424857591dffe1beb4891e1c4769d2824f254b594a1f2fb102fb351d67b03404 SHA512 e6660c44c7fcb1d32077b483814ccaad03bca0f6264671548b6ef9cc60f544b134ea3d9ade13a959340bb1f8c94cf08c8246ea929073cf89d6ee35f8b2e19904 WHIRLPOOL 46ee7f2052b935c1dff22b80f0432c56b03e405dbf6c799ff0aa3789920546af5e3b3951a6acb88d175d1e8164833fb11e087ea025a16eebebc0bf1f2ea7d11a
23 EBUILD opennebula-4.14.2.ebuild 5992 SHA256 83518d6e6199aacd9c9f7c35bf5c0d88d905f34736773217819924850ae85a51 SHA512 cc18db5d7480f2067d95deb6a61df6c0a40a11ab9e4f6e2491fccdac34f349d527b6ffeedb2d2d2f04c3dba210c2a1316c635b4f69064a69bfd378ea0c4f9ebe WHIRLPOOL ec9208b6607382b3f3985d1c6255ec9c66455f9c1bf2ae8979b328216d35e9536ad7ce55b85e52f06c44af1dc7cb6174e1fb2faa1b45eff11c686a9dbabd7f16
24 EBUILD opennebula-5.0.2.ebuild 5141 SHA256 d900142aae83b24902e288dac45e77c69c6a4cf525b2b264d89155754ae1f1b6 SHA512 bb795f1c68dfa232cdca9a67a50b892d2eaf3c5c43db2344864cfc81af25f1486f7762d721c1a29d39aae135c91d57cc1b5a37691e2500783bf546ba615d08a9 WHIRLPOOL 154ceb6990ba596f6d5abcabad3a686007eca1546deeee0e36594827ead744cf8851dfb08b89c32a9a833af15e808310cf283a130164a5abb3c5088d8a224e87
25 EBUILD opennebula-5.2.0.ebuild 5178 SHA256 c4ed7aa44b496ff05820f993cfb51c420014afba40ff95c516ee71ea093f5e93 SHA512 d758667dd121fa812e420de93c7b18edd2d15582088c8f995f69028d8afd48d10a5d683d35a18f2b41d5ce4b568f93ae0e8df98b0f211b2168c77547365d212e WHIRLPOOL f3310dbb4c39f79a3dc142f0d032252a08d785c1937797876d8f5b1fc927a70e80e8256ca97f5ef535bb5922689af13fa01291665f39e4f6a8f6e8f56a66fa3a
26 EBUILD opennebula-5.2.1.ebuild 5376 SHA256 db1366cd13a7622af290319fac459da7b6f16fc479d343172239d0e4ee71dd43 SHA512 d175ce386029b824ccd3f2f59a9f3c4cb607fe2548b49d8b8bb436542f46852553e5fe2dcacfcfac71a63710344148637bada6659758f3248552d1b31099768c WHIRLPOOL cb811f0007cffce360c4a73f758c6c531c3b1c721195d00e4a5afe3f8cb7a4e29a480b319add42fa3949d946b9ea3032140d37b99c869c1beb09bb09e8d6ee8d
27 +EBUILD opennebula-5.4.1.ebuild 5394 SHA256 6d51fc9f1dca059ec24ec5cb81bbfa34b21042d9579ef8fc9199a63d85da9e2a SHA512 a4fd17509e5363838e699abbb609c9ff33de519949aa61121ffc7551405e3204dd7e6f2e0c764fc80c4a8d3f7b68693fe92ffd54c47f36095d949758b653e1dd WHIRLPOOL e4e5db90f53365073c61df5622ca7ebdcb27908f30ab7ad9fc75f10d8a2bce01018069cca7e04c0fa2165052a7535c14c66667a76a618229e6ee915d2f9fc211
28 MISC metadata.xml 471 SHA256 7e7ba4805811857e33a2374831129a50002448d7dcceb640585a4166103e4e63 SHA512 0be6058785693cef097e2b3ffcffbc7b0011719afcaaf4d10116f490dc23291bdbb9e91f42977c82ef002967a4cbd56f1bebe1f1e61a053a659250a54d7d67d1 WHIRLPOOL b7039f60c5f28c905a0332ff5cffc0c9ffa1ae8897faa927fb21bfbc909d11fcca95af2bf822c014f4d9c5ca325d3c1cd2446331bcb7f8b639a0a523dd14ad95
29
30 diff --git a/app-emulation/opennebula/opennebula-5.4.1.ebuild b/app-emulation/opennebula/opennebula-5.4.1.ebuild
31 new file mode 100644
32 index 0000000..9d48554
33 --- /dev/null
34 +++ b/app-emulation/opennebula/opennebula-5.4.1.ebuild
35 @@ -0,0 +1,186 @@
36 +# Copyright 1999-2016 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +# $Header: $
39 +
40 +EAPI=5
41 +USE_RUBY="ruby20 ruby21 ruby22 ruby23"
42 +
43 +inherit user eutils multilib ruby-ng systemd
44 +
45 +MY_P="opennebula-${PV/_/-}"
46 +
47 +DESCRIPTION="OpenNebula Virtual Infrastructure Engine"
48 +HOMEPAGE="http://www.opennebula.org/"
49 +SRC_URI="http://downloads.opennebula.org/packages/${PN}-${PV}/${PN}-${PV}.tar.gz"
50 +
51 +LICENSE="Apache-2.0"
52 +SLOT="0"
53 +KEYWORDS="~amd64"
54 +IUSE="qemu +mysql xen sqlite +extras systemd"
55 +
56 +RDEPEND=">=dev-libs/xmlrpc-c-1.18.02[abyss,cxx,threads]
57 + dev-lang/ruby
58 + extras? ( dev-libs/openssl
59 + dev-ruby/libxml
60 + net-misc/curl
61 + dev-libs/libxslt
62 + dev-libs/expat
63 + dev-ruby/uuidtools
64 + dev-ruby/amazon-ec2
65 + dev-ruby/webmock
66 + dev-ruby/mysql
67 + dev-ruby/mysql2
68 + dev-ruby/parse-cron
69 + dev-ruby/sequel
70 + dev-ruby/treetop
71 + dev-ruby/xml-simple
72 + dev-ruby/zendesk_api
73 + dev-libs/log4cpp )
74 + mysql? ( virtual/mysql )
75 + dev-db/sqlite
76 + net-misc/openssh
77 + || ( app-cdr/cdrkit app-cdr/cdrtools )
78 + sqlite? ( dev-ruby/sqlite3 )
79 + qemu? ( app-emulation/libvirt[libvirtd,qemu] )
80 + xen? ( app-emulation/xen-tools )"
81 +DEPEND="${RDEPEND}
82 + >=dev-util/scons-1.2.0-r1
83 + dev-ruby/nokogiri"
84 +
85 +# make sure no eclass is running tests
86 +RESTRICT="test"
87 +
88 +S="${WORKDIR}/${PN}-${PV}"
89 +
90 +ONEUSER="oneadmin"
91 +ONEGROUP="oneadmin"
92 +
93 +pkg_setup () {
94 + enewgroup ${ONEGROUP}
95 + enewuser ${ONEUSER} -1 /bin/bash /var/lib/one ${ONEGROUP}
96 +}
97 +
98 +src_unpack() {
99 + default
100 +}
101 +
102 +src_prepare() {
103 + sed -i -e 's|chmod|true|' install.sh || die "sed failed"
104 +}
105 +
106 +src_configure() {
107 + :
108 +}
109 +
110 +src_compile() {
111 +
112 + local myconf
113 + use extras && myconf+="new_xmlrpc=yes "
114 + use mysql && myconf+="mysql=yes " || myconf+="mysql=no "
115 + scons \
116 + ${myconf} \
117 + $(sed -r 's/.*(-j\s*|--jobs=)([0-9]+).*/-j\2/' <<< ${MAKEOPTS}) \
118 + || die "building ${PN} failed"
119 +}
120 +
121 +src_install() {
122 + DESTDIR=${T} ./install.sh -u ${ONEUSER} -g ${ONEGROUP} || die "install failed"
123 +
124 + cd "${T}"
125 +
126 + # installing things for real
127 + dobin bin/*
128 +
129 + keepdir /var/{lib,run}/${PN} || die "keepdir failed"
130 +
131 + dodir /usr/$(get_libdir)/one
132 + dodir /var/lock/one
133 + dodir /var/log/one
134 + dodir /var/lib/one
135 + dodir /var/run/one
136 + dodir /var/tmp/one
137 + # we have to preserve the executable bits
138 + cp -a lib/* "${D}/usr/$(get_libdir)/one/" || die "copying lib files failed"
139 +
140 + insinto /usr/share/doc/${PF}
141 + doins -r share/examples
142 +
143 + dodir /var/lib/one
144 + dodir /var/lib/one/vms
145 + dodir /usr/share/one
146 + dodir /etc/tmpfiles.d
147 + # we have to preserve the executable bits
148 + cp -a var/remotes "${D}/var/lib/one/" || die "copying remotes failed"
149 + cp -a share/* "${D}/usr/share/one/" || die "copying share failed"
150 +
151 + doenvd "${FILESDIR}/99one"
152 +
153 + newinitd "${FILESDIR}/opennebula.initd" opennebula
154 + newinitd "${FILESDIR}/sunstone-server.initd" sunstone-server
155 + newinitd "${FILESDIR}/oneflow-server.initd" oneflow-server
156 + newconfd "${FILESDIR}/opennebula.confd" opennebula
157 + newconfd "${FILESDIR}/sunstone-server.confd" sunstone-server
158 + newconfd "${FILESDIR}/oneflow-server.confd" oneflow-server
159 +
160 + use systemd && systemd_dounit "${FILESDIR}"/opennebula{,-sunstone,-econe,-oneflow,-onegate}.service
161 +
162 + insinto /etc/one
163 + insopts -m 0640
164 + doins -r etc/*
165 + doins "${FILESDIR}/one_auth"
166 +
167 + insinto /etc/tmpfiles.d
168 + doins "${FILESDIR}/tmpfilesd.opennebula.conf"
169 +
170 +}
171 +
172 +pkg_postinst() {
173 +
174 +
175 + chown -R oneadmin:oneadmin ${ROOT}var/{lock,lib,log,run,tmp}/one
176 + chown -R oneadmin:oneadmin ${ROOT}usr/share/one
177 + chown -R oneadmin:oneadmin ${ROOT}etc/one
178 + chown -R oneadmin:oneadmin ${ROOT}usr/lib/one
179 +
180 + local onedir="${EROOT}var/lib/one"
181 + if [ ! -d "${onedir}/.ssh" ] ; then
182 + einfo "Generating ssh-key..."
183 + umask 0027 || die "setting umask failed"
184 + mkdir "${onedir}/.ssh" || die "creating ssh directory failed"
185 + ssh-keygen -q -t dsa -N "" -f "${onedir}/.ssh/id_dsa" || die "ssh-keygen failed"
186 + cat > "${onedir}/.ssh/config" <<EOF
187 +UserKnownHostsFile /dev/null
188 +Host *
189 + StrictHostKeyChecking no
190 +EOF
191 + cat "${onedir}/.ssh/id_dsa.pub" >> "${onedir}/.ssh/authorized_keys" || die "adding key failed"
192 + chown -R ${ONEUSER}:${ONEGROUP} "${onedir}/.ssh" || die "changing owner failed"
193 + fi
194 +
195 + if use qemu ; then
196 + elog "Make sure that the user ${ONEUSER} has access to the libvirt control socket"
197 + elog " /var/run/libvirt/libvirt-sock"
198 + elog "You can easily check this by executing the following command as ${ONEUSER} user"
199 + elog " virsh -c qemu:///system nodeinfo"
200 + elog "If not using using policykit in libvirt, the file you should take a look at is:"
201 + elog " /etc/libvirt/libvirtd.conf (look for the unix_sock_*_perms parameters)"
202 + elog "Failure to do so may lead to nodes hanging in PENDING state forever without further notice."
203 + echo ""
204 + elog "Should a node hang in PENDING state even with correct permissions, try the following to get more information."
205 + elog "In /tmp/one-im execute the following command for the biggest one_im-* file:"
206 + elog " ruby -wd one_im-???"
207 + echo ""
208 + elog "OpenNebula doesn't allow you to specify the disc format."
209 + elog "Unfortunately the default in libvirt is not to guess and"
210 + elog "it therefores assumes a 'raw' format when using qemu/kvm."
211 + elog "Set 'allow_disk_format_probing = 0' in /etc/libvirt/qemu.conf"
212 + elog "to work around this until OpenNebula fixes it."
213 + fi
214 +
215 + elog "If you wish to use the sunstone server, please issue the command"
216 + #elog "/usr/share/one/install_gems as oneadmin user"
217 + elog "gem install sequel thin json rack sinatra builder treetop zendesk_api mysql parse-cron"
218 +
219 +
220 +}
221 +