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: Tue, 08 May 2018 19:55:05
Message-Id: 1525809284.58eb4b2bb22da9e0a38a134a4efb4db2cba3c50f.samuelbernardo@gentoo
1 commit: 58eb4b2bb22da9e0a38a134a4efb4db2cba3c50f
2 Author: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
3 AuthorDate: Tue May 8 19:54:44 2018 +0000
4 Commit: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
5 CommitDate: Tue May 8 19:54:44 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=58eb4b2b
7
8 add opennebula-5.4.11
9
10 app-emulation/opennebula/Manifest | 1 +
11 app-emulation/opennebula/opennebula-5.4.11.ebuild | 219 ++++++++++++++++++++++
12 2 files changed, 220 insertions(+)
13
14 diff --git a/app-emulation/opennebula/Manifest b/app-emulation/opennebula/Manifest
15 index 10c1ecd..2f9179d 100644
16 --- a/app-emulation/opennebula/Manifest
17 +++ b/app-emulation/opennebula/Manifest
18 @@ -30,6 +30,7 @@ EBUILD opennebula-5.0.2.ebuild 5178 BLAKE2B 987bf171438c6409dc6f0f5f88ac50425e48
19 EBUILD opennebula-5.2.0.ebuild 5178 BLAKE2B 987bf171438c6409dc6f0f5f88ac50425e485e6c81c14f4c5af96b7431e5a0f255ce55f2d6d40cf9523a9370abbfeb2190ad42d54e3e2230d63a04896288b0d6 SHA512 d758667dd121fa812e420de93c7b18edd2d15582088c8f995f69028d8afd48d10a5d683d35a18f2b41d5ce4b568f93ae0e8df98b0f211b2168c77547365d212e
20 EBUILD opennebula-5.2.1.ebuild 5376 BLAKE2B 0f3f5565e1a445ed2144018195244fe3b1d3db27665fa94b624e7c53ea1115c2c553694e2abef9fa5e0eabfbfeb0badc3cae14fffc4ee14dd72a43e75bc30a04 SHA512 d175ce386029b824ccd3f2f59a9f3c4cb607fe2548b49d8b8bb436542f46852553e5fe2dcacfcfac71a63710344148637bada6659758f3248552d1b31099768c
21 EBUILD opennebula-5.4.1.ebuild 5394 BLAKE2B be801a88a64fb6c2345845bdb389a41b7f29664a8421639977058ea6e6b419fda65db70328fbf74782859e52979e52807bd77c1e3ce71a64d456e2b8e831d12b SHA512 a4fd17509e5363838e699abbb609c9ff33de519949aa61121ffc7551405e3204dd7e6f2e0c764fc80c4a8d3f7b68693fe92ffd54c47f36095d949758b653e1dd
22 +EBUILD opennebula-5.4.11.ebuild 6415 BLAKE2B d011ee9a835c65314964ea62b6aa3d0bb23e74310857114af4f751e5c0114a3b674a73c50c6889fc222a8161abf4ff8fc85494b6c5d2140b0df09d019a3f4ac0 SHA512 da259c64b8aa2b569b70c7afa9c834e1c19939a01201c9954736064378decfa5020e8a5eec655b413d901e2578901197139cd545897068e41525dd255c1f4168
23 EBUILD opennebula-5.4.12.ebuild 6415 BLAKE2B d011ee9a835c65314964ea62b6aa3d0bb23e74310857114af4f751e5c0114a3b674a73c50c6889fc222a8161abf4ff8fc85494b6c5d2140b0df09d019a3f4ac0 SHA512 da259c64b8aa2b569b70c7afa9c834e1c19939a01201c9954736064378decfa5020e8a5eec655b413d901e2578901197139cd545897068e41525dd255c1f4168
24 EBUILD opennebula-5.4.6.ebuild 5394 BLAKE2B be801a88a64fb6c2345845bdb389a41b7f29664a8421639977058ea6e6b419fda65db70328fbf74782859e52979e52807bd77c1e3ce71a64d456e2b8e831d12b SHA512 a4fd17509e5363838e699abbb609c9ff33de519949aa61121ffc7551405e3204dd7e6f2e0c764fc80c4a8d3f7b68693fe92ffd54c47f36095d949758b653e1dd
25 MISC metadata.xml 471 BLAKE2B fecada7f873a86295bd66aa16126682170731bb4cd87dc2cfc7f46503d1d10880cc92f87c388dc6b2d3e8a4d4cba73c4b88a97ce8d23c2254b0d91cb3f820779 SHA512 0be6058785693cef097e2b3ffcffbc7b0011719afcaaf4d10116f490dc23291bdbb9e91f42977c82ef002967a4cbd56f1bebe1f1e61a053a659250a54d7d67d1
26
27 diff --git a/app-emulation/opennebula/opennebula-5.4.11.ebuild b/app-emulation/opennebula/opennebula-5.4.11.ebuild
28 new file mode 100644
29 index 0000000..f4c0da3
30 --- /dev/null
31 +++ b/app-emulation/opennebula/opennebula-5.4.11.ebuild
32 @@ -0,0 +1,219 @@
33 +# Copyright 1999-2016 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Header: $
36 +
37 +EAPI=6
38 +USE_RUBY="ruby22 ruby23 ruby24 ruby25"
39 +
40 +inherit user eutils multilib ruby-ng systemd git-r3 flag-o-matic
41 +
42 +MY_P="opennebula-${PV/_/-}"
43 +
44 +DESCRIPTION="OpenNebula Virtual Infrastructure Engine"
45 +HOMEPAGE="http://www.opennebula.org/"
46 +#SRC_URI="http://downloads.opennebula.org/packages/${PN}-${PV}/${PN}-${PV}.tar.gz"
47 +EGIT_REPO_URI="https://github.com/OpenNebula/one.git"
48 +EGIT_COMMIT="release-${PV}"
49 +EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
50 +LICENSE="Apache-2.0"
51 +SLOT="0"
52 +KEYWORDS="~amd64"
53 +IUSE="qemu +mysql xen sqlite +extras systemd"
54 +
55 +RDEPEND=">=dev-libs/xmlrpc-c-1.18.02[abyss,cxx,threads]
56 + dev-lang/ruby
57 + extras? ( dev-libs/openssl
58 + dev-ruby/libxml
59 + net-misc/curl
60 + dev-libs/libxslt
61 + dev-libs/expat
62 + dev-ruby/uuidtools
63 + dev-ruby/amazon-ec2
64 + dev-ruby/aws-sdk
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-ruby/ruby-net-ldap
74 + dev-ruby/rack
75 + dev-ruby/sinatra
76 + dev-ruby/thin
77 + dev-ruby/memcache-client
78 + dev-ruby/curb
79 + dev-ruby/trollop
80 + dev-ruby/azure
81 + dev-ruby/safe_yaml
82 + dev-libs/log4cpp )
83 + mysql? ( virtual/mysql )
84 + dev-db/sqlite
85 + net-misc/openssh
86 + || ( app-cdr/cdrkit app-cdr/cdrtools )
87 + sqlite? ( dev-ruby/sqlite3 )
88 + qemu? ( app-emulation/libvirt[libvirtd,qemu] )
89 + xen? ( app-emulation/xen-tools )"
90 +DEPEND="${RDEPEND}
91 + >=dev-util/scons-1.2.0-r1
92 + dev-python/configparser
93 + dev-ruby/configparser
94 + dev-ruby/rubygems
95 + dev-ruby/rake
96 + dev-ruby/xmlparser
97 + dev-ruby/ox
98 + dev-ruby/builder
99 + sys-devel/make
100 + dev-ruby/nokogiri"
101 +
102 +# make sure no eclass is running tests
103 +RESTRICT="test"
104 +
105 +#S="${WORKDIR}/${PN}-${PV}"
106 +S="${WORKDIR}/${P}"
107 +
108 +ONEUSER="oneadmin"
109 +ONEGROUP="oneadmin"
110 +
111 +pkg_setup () {
112 + enewgroup ${ONEGROUP}
113 + enewuser ${ONEUSER} -1 /bin/bash /var/lib/one ${ONEGROUP}
114 +}
115 +
116 +#src_unpack() {
117 +# default
118 +#}
119 +
120 +src_prepare() {
121 + epatch "${FILESDIR}/fix_kvm_emulator.patch"
122 + default
123 + sed -i -e 's|chmod|true|' install.sh || die "sed failed"
124 +}
125 +
126 +src_configure() {
127 + :
128 +}
129 +
130 +src_compile() {
131 +
132 + # http://lists.ceph.com/pipermail/users-opennebula.org/2011-June/033132.html
133 + #filter-ldflags -lpthread
134 +
135 + local myconf
136 + # This builds the vanilla OpenNebula package. Tweak this line as desired.
137 + myconf+="sunstone=no parsers=yes "
138 + use extras && myconf+="new_xmlrpc=yes "
139 + use mysql && myconf+="mysql=yes " || myconf+="mysql=no "
140 + use sqlite && myconf+="sqlite=yes " || myconf+="sqlite=no "
141 + use systemd && myconf+="systemd=yes " || myconf+="systemd=no "
142 + scons \
143 + ${myconf} \
144 + $(sed -r 's/.*(-j\s*|--jobs=)([0-9]+).*/-j\2/' <<< ${MAKEOPTS}) \
145 + || die "building ${PN} failed"
146 +}
147 +
148 +src_install() {
149 + DESTDIR=${T} ./install.sh -u ${ONEUSER} -g ${ONEGROUP} || die "install failed"
150 +
151 + cd "${T}"
152 +
153 + # installing things for real
154 + dobin bin/*
155 +
156 + keepdir /var/{lib,run}/${PN} || die "keepdir failed"
157 +
158 + dodir /usr/$(get_libdir)/one
159 + dodir /var/lock/one
160 + dodir /var/log/one
161 + dodir /var/lib/one
162 + dodir /var/run/one
163 + dodir /var/tmp/one
164 + # we have to preserve the executable bits
165 + cp -a lib/* "${D}/usr/$(get_libdir)/one/" || die "copying lib files failed"
166 +
167 + insinto /usr/share/doc/${PF}
168 + doins -r share/examples
169 +
170 + dodir /var/lib/one
171 + dodir /var/lib/one/vms
172 + dodir /usr/share/one
173 + dodir /etc/tmpfiles.d
174 + # we have to preserve the executable bits
175 + cp -a var/remotes "${D}/var/lib/one/" || die "copying remotes failed"
176 + cp -a share/* "${D}/usr/share/one/" || die "copying share failed"
177 +
178 + doenvd "${FILESDIR}/99one"
179 +
180 + newinitd "${FILESDIR}/opennebula.initd" opennebula
181 + newinitd "${FILESDIR}/sunstone-server.initd" sunstone-server
182 + newinitd "${FILESDIR}/oneflow-server.initd" oneflow-server
183 + newconfd "${FILESDIR}/opennebula.confd" opennebula
184 + newconfd "${FILESDIR}/sunstone-server.confd" sunstone-server
185 + newconfd "${FILESDIR}/oneflow-server.confd" oneflow-server
186 +
187 + use systemd && systemd_dounit "${FILESDIR}"/opennebula{,-sunstone,-econe,-oneflow,-onegate,-scheduler,-novnc}.service
188 +
189 + insinto /etc/one
190 + insopts -m 0640
191 + doins -r etc/*
192 + doins "${FILESDIR}/one_auth"
193 +
194 + insinto /etc/tmpfiles.d
195 + newins "${FILESDIR}/tmpfilesd.opennebula.conf" "opennebula.conf"
196 +
197 + insinto /etc/logrotate.d
198 + newins "${FILESDIR}/logrotated.opennebula" "opennebula"
199 +
200 +}
201 +
202 +pkg_postinst() {
203 +
204 +
205 + chown -R oneadmin:oneadmin ${ROOT}var/{lock,lib,log,run,tmp}/one
206 + chown -R oneadmin:oneadmin ${ROOT}usr/share/one
207 + chown -R oneadmin:oneadmin ${ROOT}etc/one
208 + chown -R oneadmin:oneadmin ${ROOT}usr/lib/one
209 +
210 + local onedir="${EROOT}var/lib/one"
211 + if [ ! -d "${onedir}/.ssh" ] ; then
212 + einfo "Generating ssh-key..."
213 + umask 0027 || die "setting umask failed"
214 + mkdir "${onedir}/.ssh" || die "creating ssh directory failed"
215 + ssh-keygen -q -t dsa -N "" -f "${onedir}/.ssh/id_dsa" || die "ssh-keygen failed"
216 + cat > "${onedir}/.ssh/config" <<EOF
217 +UserKnownHostsFile /dev/null
218 +Host *
219 + StrictHostKeyChecking no
220 +EOF
221 + cat "${onedir}/.ssh/id_dsa.pub" >> "${onedir}/.ssh/authorized_keys" || die "adding key failed"
222 + chown -R ${ONEUSER}:${ONEGROUP} "${onedir}/.ssh" || die "changing owner failed"
223 + fi
224 +
225 + if use qemu ; then
226 + elog "Make sure that the user ${ONEUSER} has access to the libvirt control socket"
227 + elog " /var/run/libvirt/libvirt-sock"
228 + elog "You can easily check this by executing the following command as ${ONEUSER} user"
229 + elog " virsh -c qemu:///system nodeinfo"
230 + elog "If not using using policykit in libvirt, the file you should take a look at is:"
231 + elog " /etc/libvirt/libvirtd.conf (look for the unix_sock_*_perms parameters)"
232 + elog "Failure to do so may lead to nodes hanging in PENDING state forever without further notice."
233 + echo ""
234 + elog "Should a node hang in PENDING state even with correct permissions, try the following to get more information."
235 + elog "In /tmp/one-im execute the following command for the biggest one_im-* file:"
236 + elog " ruby -wd one_im-???"
237 + echo ""
238 + elog "OpenNebula doesn't allow you to specify the disc format."
239 + elog "Unfortunately the default in libvirt is not to guess and"
240 + elog "it therefores assumes a 'raw' format when using qemu/kvm."
241 + elog "Set 'allow_disk_format_probing = 0' in /etc/libvirt/qemu.conf"
242 + elog "to work around this until OpenNebula fixes it."
243 + fi
244 +
245 + elog "If you wish to use the sunstone server, please issue the command"
246 + #elog "/usr/share/one/install_gems as oneadmin user"
247 + elog "gem install sequel thin json rack sinatra builder treetop zendesk_api mysql parse-cron"
248 +
249 +
250 +}
251 +