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