From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A3B661382C5 for ; Tue, 8 May 2018 19:55:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E4688E0864; Tue, 8 May 2018 19:55:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B4E23E0864 for ; Tue, 8 May 2018 19:55:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4A4DB335C09 for ; Tue, 8 May 2018 19:55:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1347237 for ; Tue, 8 May 2018 19:55:01 +0000 (UTC) From: "Samuel Bernardo" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Samuel Bernardo" Message-ID: <1525809284.58eb4b2bb22da9e0a38a134a4efb4db2cba3c50f.samuelbernardo@gentoo> Subject: [gentoo-commits] repo/user/ssnb:master commit in: app-emulation/opennebula/ X-VCS-Repository: repo/user/ssnb X-VCS-Files: app-emulation/opennebula/Manifest app-emulation/opennebula/opennebula-5.4.11.ebuild X-VCS-Directories: app-emulation/opennebula/ X-VCS-Committer: samuelbernardo X-VCS-Committer-Name: Samuel Bernardo X-VCS-Revision: 58eb4b2bb22da9e0a38a134a4efb4db2cba3c50f X-VCS-Branch: master Date: Tue, 8 May 2018 19:55:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a120677c-f2d3-454c-ac99-a7de08613bc9 X-Archives-Hash: 30787937de72177eadfed31ed5e52443 commit: 58eb4b2bb22da9e0a38a134a4efb4db2cba3c50f Author: Samuel Bernardo gmail com> AuthorDate: Tue May 8 19:54:44 2018 +0000 Commit: Samuel Bernardo gmail com> CommitDate: Tue May 8 19:54:44 2018 +0000 URL: https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=58eb4b2b add opennebula-5.4.11 app-emulation/opennebula/Manifest | 1 + app-emulation/opennebula/opennebula-5.4.11.ebuild | 219 ++++++++++++++++++++++ 2 files changed, 220 insertions(+) diff --git a/app-emulation/opennebula/Manifest b/app-emulation/opennebula/Manifest index 10c1ecd..2f9179d 100644 --- a/app-emulation/opennebula/Manifest +++ b/app-emulation/opennebula/Manifest @@ -30,6 +30,7 @@ EBUILD opennebula-5.0.2.ebuild 5178 BLAKE2B 987bf171438c6409dc6f0f5f88ac50425e48 EBUILD opennebula-5.2.0.ebuild 5178 BLAKE2B 987bf171438c6409dc6f0f5f88ac50425e485e6c81c14f4c5af96b7431e5a0f255ce55f2d6d40cf9523a9370abbfeb2190ad42d54e3e2230d63a04896288b0d6 SHA512 d758667dd121fa812e420de93c7b18edd2d15582088c8f995f69028d8afd48d10a5d683d35a18f2b41d5ce4b568f93ae0e8df98b0f211b2168c77547365d212e EBUILD opennebula-5.2.1.ebuild 5376 BLAKE2B 0f3f5565e1a445ed2144018195244fe3b1d3db27665fa94b624e7c53ea1115c2c553694e2abef9fa5e0eabfbfeb0badc3cae14fffc4ee14dd72a43e75bc30a04 SHA512 d175ce386029b824ccd3f2f59a9f3c4cb607fe2548b49d8b8bb436542f46852553e5fe2dcacfcfac71a63710344148637bada6659758f3248552d1b31099768c EBUILD opennebula-5.4.1.ebuild 5394 BLAKE2B be801a88a64fb6c2345845bdb389a41b7f29664a8421639977058ea6e6b419fda65db70328fbf74782859e52979e52807bd77c1e3ce71a64d456e2b8e831d12b SHA512 a4fd17509e5363838e699abbb609c9ff33de519949aa61121ffc7551405e3204dd7e6f2e0c764fc80c4a8d3f7b68693fe92ffd54c47f36095d949758b653e1dd +EBUILD opennebula-5.4.11.ebuild 6415 BLAKE2B d011ee9a835c65314964ea62b6aa3d0bb23e74310857114af4f751e5c0114a3b674a73c50c6889fc222a8161abf4ff8fc85494b6c5d2140b0df09d019a3f4ac0 SHA512 da259c64b8aa2b569b70c7afa9c834e1c19939a01201c9954736064378decfa5020e8a5eec655b413d901e2578901197139cd545897068e41525dd255c1f4168 EBUILD opennebula-5.4.12.ebuild 6415 BLAKE2B d011ee9a835c65314964ea62b6aa3d0bb23e74310857114af4f751e5c0114a3b674a73c50c6889fc222a8161abf4ff8fc85494b6c5d2140b0df09d019a3f4ac0 SHA512 da259c64b8aa2b569b70c7afa9c834e1c19939a01201c9954736064378decfa5020e8a5eec655b413d901e2578901197139cd545897068e41525dd255c1f4168 EBUILD opennebula-5.4.6.ebuild 5394 BLAKE2B be801a88a64fb6c2345845bdb389a41b7f29664a8421639977058ea6e6b419fda65db70328fbf74782859e52979e52807bd77c1e3ce71a64d456e2b8e831d12b SHA512 a4fd17509e5363838e699abbb609c9ff33de519949aa61121ffc7551405e3204dd7e6f2e0c764fc80c4a8d3f7b68693fe92ffd54c47f36095d949758b653e1dd MISC metadata.xml 471 BLAKE2B fecada7f873a86295bd66aa16126682170731bb4cd87dc2cfc7f46503d1d10880cc92f87c388dc6b2d3e8a4d4cba73c4b88a97ce8d23c2254b0d91cb3f820779 SHA512 0be6058785693cef097e2b3ffcffbc7b0011719afcaaf4d10116f490dc23291bdbb9e91f42977c82ef002967a4cbd56f1bebe1f1e61a053a659250a54d7d67d1 diff --git a/app-emulation/opennebula/opennebula-5.4.11.ebuild b/app-emulation/opennebula/opennebula-5.4.11.ebuild new file mode 100644 index 0000000..f4c0da3 --- /dev/null +++ b/app-emulation/opennebula/opennebula-5.4.11.ebuild @@ -0,0 +1,219 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=6 +USE_RUBY="ruby22 ruby23 ruby24 ruby25" + +inherit user eutils multilib ruby-ng systemd git-r3 flag-o-matic + +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" +EGIT_REPO_URI="https://github.com/OpenNebula/one.git" +EGIT_COMMIT="release-${PV}" +EGIT_CHECKOUT_DIR=${WORKDIR}/${P} +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-ruby/uuidtools + dev-ruby/amazon-ec2 + dev-ruby/aws-sdk + dev-ruby/webmock + dev-ruby/mysql + dev-ruby/mysql2 + dev-ruby/parse-cron + dev-ruby/sequel + dev-ruby/treetop + dev-ruby/xml-simple + dev-ruby/zendesk_api + dev-ruby/ruby-net-ldap + dev-ruby/rack + dev-ruby/sinatra + dev-ruby/thin + dev-ruby/memcache-client + dev-ruby/curb + dev-ruby/trollop + dev-ruby/azure + dev-ruby/safe_yaml + 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-python/configparser + dev-ruby/configparser + dev-ruby/rubygems + dev-ruby/rake + dev-ruby/xmlparser + dev-ruby/ox + dev-ruby/builder + sys-devel/make + dev-ruby/nokogiri" + +# make sure no eclass is running tests +RESTRICT="test" + +#S="${WORKDIR}/${PN}-${PV}" +S="${WORKDIR}/${P}" + +ONEUSER="oneadmin" +ONEGROUP="oneadmin" + +pkg_setup () { + enewgroup ${ONEGROUP} + enewuser ${ONEUSER} -1 /bin/bash /var/lib/one ${ONEGROUP} +} + +#src_unpack() { +# default +#} + +src_prepare() { + epatch "${FILESDIR}/fix_kvm_emulator.patch" + default + sed -i -e 's|chmod|true|' install.sh || die "sed failed" +} + +src_configure() { + : +} + +src_compile() { + + # http://lists.ceph.com/pipermail/users-opennebula.org/2011-June/033132.html + #filter-ldflags -lpthread + + local myconf + # This builds the vanilla OpenNebula package. Tweak this line as desired. + myconf+="sunstone=no parsers=yes " + use extras && myconf+="new_xmlrpc=yes " + use mysql && myconf+="mysql=yes " || myconf+="mysql=no " + use sqlite && myconf+="sqlite=yes " || myconf+="sqlite=no " + use systemd && myconf+="systemd=yes " || myconf+="systemd=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,-scheduler,-novnc}.service + + insinto /etc/one + insopts -m 0640 + doins -r etc/* + doins "${FILESDIR}/one_auth" + + insinto /etc/tmpfiles.d + newins "${FILESDIR}/tmpfilesd.opennebula.conf" "opennebula.conf" + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotated.opennebula" "opennebula" + +} + +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" <> "${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 treetop zendesk_api mysql parse-cron" + + +} +