aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Bernardo <samuelbernardo.mail@gmail.com>2020-06-12 23:33:10 +0100
committerSamuel Bernardo <samuelbernardo.mail@gmail.com>2020-06-12 23:33:10 +0100
commit2a4cf534a94309b8b9af65dadadff46a0f1e7b8a (patch)
tree7a799ea1e5f505b2cfec11327aba88df674ba711
parentUpdate rpmlint now supporting python3 (diff)
downloadssnb-2a4cf534a94309b8b9af65dadadff46a0f1e7b8a.tar.gz
ssnb-2a4cf534a94309b8b9af65dadadff46a0f1e7b8a.tar.bz2
ssnb-2a4cf534a94309b8b9af65dadadff46a0f1e7b8a.zip
Update opennebula
Signed-off-by: Samuel Bernardo <samuelbernardo.mail@gmail.com>
-rw-r--r--app-emulation/opennebula/Manifest2
-rw-r--r--app-emulation/opennebula/opennebula-5.10.5.ebuild306
2 files changed, 308 insertions, 0 deletions
diff --git a/app-emulation/opennebula/Manifest b/app-emulation/opennebula/Manifest
index d1d31f1..7ce17c1 100644
--- a/app-emulation/opennebula/Manifest
+++ b/app-emulation/opennebula/Manifest
@@ -61,6 +61,8 @@ AUX tmpfiles.d/opennebula-sunstone.conf 77 BLAKE2B 9988562b0e36bf74fc67af5a1777e
AUX tmpfiles.d/opennebula.conf 77 BLAKE2B 9988562b0e36bf74fc67af5a1777eca18b24e0a1bcfc78735f360f1aceca4602e32f7b6cfbe3b731a13725a9cd14a4dc49b71c12bb7576a29aa00112b37cd2be SHA512 c13210255ebb0f34d464e2799858d6ac2a79afac287ead639821ef5e939b7666a960ebb1ee96bc7098a111ddd6765e72d8a5e53e0647b9a866d0826e02cbd2a1
DIST opennebula-5.10.1.tar.gz 43207580 BLAKE2B de87e839cd772bec769af4a689fed02e81fbdc6fbb35def9ad6344383dc935ebd431137cb194dd3b840965004f4e145ac63443d7034d56a9a6bb19af9030642d SHA512 861293298997c825e94228ea28f0f352db3f56dd28b654be24ca2226edd422fc54cf94665f5ae5cc17dc51d3d52081c936f249b77fc4f8198de6a1ec0006edaf
DIST opennebula-5.10.4.tar.gz 5697792 BLAKE2B fde611cbe5b44ee403b57e915253c9ffba267230bf3a54cd466260615918e871aebeae6f17c246a84ef1686df176134acff272c49e6a9b69c8841bc8fab1f1b5 SHA512 c509ec4a56b7865d118ab79e08227f0a78d1d899361ea2ae2ea3c6ac6ad3ab4a2a38211a4f5b7abf35ef512674d13ffb19f97286fed63515289e4f9a602f3145
+DIST opennebula-5.10.5.tar.gz 5699952 BLAKE2B 35dce44e085342e8d2628bc060ed0644309a6e5aa8ec1898663b537eb698d66f980353cc60ab3b6496bf78b496dcd1097db2d327b54f80d87bf273ab67aeef55 SHA512 e35b9f8c8bc4f1e4424e3a8083c2c31edbe5b799df44a222bd310fdca87c4a3c6d2a3f27da75b12364bdf29883e6f641c2ad5c484e5cc07dce3ebf054681fc58
EBUILD opennebula-5.10.1.ebuild 9405 BLAKE2B fd6dfefc76da0aaadc993b7ed1593b8826fb642a92797220c9ce6226b846539900f6e7914730decfe57f79514654506e9a1aed76ebd28c1fc797d71ee5a6b2ba SHA512 360d3323e46a1253f6489c696e020ea38e260923d6b0fcb50154b0cb412b4bd3db994365a072915f5a8411032cea12dd8b87fe2f730e418d6742dd7218722a66
EBUILD opennebula-5.10.4.ebuild 9735 BLAKE2B dd7f5bf32aea6bd30f4ca75d7db123fb9ce03f1357d789fefa76a46b7a4f1a669df0d68d5239e85a40da591d7bbf993f759a02704ba468b6c04f6445401343f4 SHA512 3c54819ee10cb07fe7ea41dd0b65b8de9075ac96e34524c512cd58457071b00f7be85f3bd062a57aa4459703b29d98c2b577a97c6b03093699b99021b59cfdf5
+EBUILD opennebula-5.10.5.ebuild 9735 BLAKE2B dd7f5bf32aea6bd30f4ca75d7db123fb9ce03f1357d789fefa76a46b7a4f1a669df0d68d5239e85a40da591d7bbf993f759a02704ba468b6c04f6445401343f4 SHA512 3c54819ee10cb07fe7ea41dd0b65b8de9075ac96e34524c512cd58457071b00f7be85f3bd062a57aa4459703b29d98c2b577a97c6b03093699b99021b59cfdf5
MISC metadata.xml 931 BLAKE2B abb0ecf04eb6fc45f64c5d2d6636591c9d706fbf1902943a80f7e058443787824581219fb8457a83192e4e2b672521609449d4eef78ab677f8c093fe939034b6 SHA512 c3770f399572b16601e7eeaf4a1eb4b5eea950ad18239be8719124f60f3edd02da4c7b28b177329d70b0810ee7d8597e522dd62a1bd4c8ea1194acf0d92dfeb2
diff --git a/app-emulation/opennebula/opennebula-5.10.5.ebuild b/app-emulation/opennebula/opennebula-5.10.5.ebuild
new file mode 100644
index 0000000..7d8d079
--- /dev/null
+++ b/app-emulation/opennebula/opennebula-5.10.5.ebuild
@@ -0,0 +1,306 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=7
+USE_RUBY="ruby24 ruby25 ruby26 ruby27"
+PYTHON_COMPAT=( python2_7 python3_6 )
+
+inherit user eutils multilib ruby-ng systemd rpm python-r1
+
+MY_P="one-release-${PV}"
+P_RPM="${P}-1"
+
+DESCRIPTION="OpenNebula Virtual Infrastructure Engine"
+HOMEPAGE="http://www.opennebula.org/"
+
+IUSE="qemu +mysql xen sqlite +extras systemd docker +sunstone vnc +python +doc"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+SRC_URI="https://github.com/OpenNebula/one/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
+
+RDEPEND=">=dev-libs/xmlrpc-c-1.18.02[abyss,cxx,threads]
+ dev-lang/ruby
+ python? ( ${PYTHON_DEPS}
+ >=dev-python/pygobject-2.90.4:3[${PYTHON_USEDEP}] )
+ 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/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/ffi-rzmq
+ dev-ruby/ffi-rzmq-core
+ dev-ruby/rqrcode
+ dev-ruby/rqrcode_core
+ dev-ruby/chunky_png
+ dev-ruby/rotp
+ dev-libs/log4cpp )
+ mysql? ( virtual/mysql )
+ dev-db/sqlite
+ net-misc/openssh
+ net-fs/nfs-utils
+ dev-db/mariadb
+ net-libs/zeromq
+ || ( app-cdr/cdrkit app-cdr/cdrtools )
+ sqlite? ( dev-ruby/sqlite3 )
+ qemu? ( app-emulation/libvirt[libvirtd,qemu] )
+ xen? ( app-emulation/xen-tools )"
+DEPEND="${RDEPEND}
+ dev-lang/ruby:2.5
+ >=dev-util/scons-3.0.0
+ dev-ruby/nokogiri
+ dev-ruby/bundler
+ dev-nodejs/grunt
+ dev-nodejs/bower
+ dev-nodejs/ini
+ dev-nodejs/braces
+ net-libs/nodejs[npm]
+ net-libs/libvncserver
+ app-text/ronn
+ dev-ruby/builder
+ dev-ruby/highline
+ dev-ruby/ipaddress:1
+ docker? ( dev-go/dep )"
+
+# make sure no eclass is running tests
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+ONEUSER="oneadmin"
+ONEGROUP="oneadmin"
+
+PATCHES=(
+ "${FILESDIR}/patches/fix_kvm_emulator.patch"
+ "${FILESDIR}/patches/install.sh.patch"
+)
+
+test_netsandbox() {
+ if use sunstone; then
+ elog "Opennebula hotfix releases needs to build sunstone without network sandbox restriction."
+ has network-sandbox ${FEATURES} && die "Please disable feature network-sandbox: -network-sandbox"
+ fi
+ if use docker; then
+ elog "Opennebula releases needs to build docker without network sandbox restriction."
+ has network-sandbox ${FEATURES} && die "Please disable feature network-sandbox: -network-sandbox"
+ fi
+}
+
+pkg_pretend() {
+ test_netsandbox
+}
+
+pkg_setup () {
+ test_netsandbox
+ enewgroup ${ONEGROUP}
+ enewuser ${ONEUSER} -1 /bin/bash /var/lib/one ${ONEGROUP}
+}
+
+src_unpack() {
+ default
+}
+
+src_prepare() {
+ # install missing source file
+ #cp "${FILESDIR}"/${P}/parsers/* "${S}"/src/parsers/ || die "copy parsers files failed"
+
+ # set correct lib path
+ use docker && make -C src/docker_machine/src/docker_machine vendor
+ for f in $(grep -rlI "/usr/lib/one" .); do sed -i -e "s/\/usr\/lib\/one/\/usr\/$(get_libdir)\/one/g" $f; done || die "correct lib dir failed"
+
+ # grunt-sass and node-sass versions
+ sed -i -e 's|1.2.1|2.1.0|' -e 's|3.10.1|4.13.0|' src/sunstone/public/package.json || die "sed failed"
+
+ # As we install from the github release sources we need to build sunstone as well.
+ # To do that we need the npm environment set up
+ # https://docs.opennebula.org/5.4/integration/references/sunstone_dev.html#sunstone-dev
+ pushd src/sunstone/public/ >/dev/null
+ ./build.sh -d || die "Install required dependencies for npm and bower failed."
+ #export PATH=$PATH:$PWD/node_modules/.bin
+ #./build.sh || die "Prepare minified files failed."
+ popd >/dev/null
+
+ eapply_user
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ # manual pages
+ if use doc; then
+ pushd ${S}/share/man >/dev/null
+ ./build.sh
+ popd >/dev/null
+ fi
+
+ ###########################################################################
+ ## ##
+ ## It is highly recommended that you read the documentation and tweak ##
+ ## the PKGBUILD accordingly: ##
+ ## http://docs.opennebula.org/stable/integration/references/compile.html ##
+ ## ##
+ ###########################################################################
+ local myconf
+ myconf+="parsers=yes new_xmlrpc=yes "
+ use extras && myconf+="new_xmlrpc=yes "
+ use mysql && myconf+="mysql=yes " || myconf+="mysql=no "
+ use sunstone && myconf+="sunstone=yes "
+ use docker && myconf+="docker_machine=yes "
+ use systemd && myconf+="systemd=yes "
+ use vnc && myconf+="svncterm=yes "
+ python3 $(which scons) \
+ ${myconf} \
+ $(sed -r 's/.*(-j\s*|--jobs=)([0-9]+).*/-j\2/' <<< ${MAKEOPTS}) \
+ || die "building ${PN} failed"
+}
+
+src_install() {
+ # Prepare installation
+ keepdir /var/{lib,run}/${PN} || die "keepdir failed"
+
+ dodir /usr/$(get_libdir)/one
+ dodir /var/log/one
+ dodir /var/lib/one
+ dodir /var/tmp/one
+ dodir /var/lib/one
+ dodir /var/lib/one/vms
+ dodir /usr/share/one
+ dodir /etc/tmpfiles.d
+
+ # Installing Opennebula
+ DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} || die "install opennebula core failed"
+ use extras && DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} -c || die "install opennebula client tools failed"
+ use docker && DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} -e -k || die "install docker machine failed"
+
+ pushd "${T}" >/dev/null
+ # Clean files
+ rm -rf etc/{logrotate.d,sudoers.d} lib/ var/{lock,run}
+
+ # setup etc
+ insinto /etc
+ doins -r etc/one
+ rm -rf etc/one
+
+ insinto /etc/one
+ insopts -m 0640
+ doins "${FILESDIR}/one_auth"
+
+ insinto /etc/tmpfiles.d
+ insopts -m 0644
+ doins "${FILESDIR}"/tmpfiles.d/*
+
+ insinto /etc/logrotate.d
+ doins "${FILESDIR}"/logrotate/*
+
+ insinto /etc/sudoers.d
+ doins "${FILESDIR}"/sudoers/*
+
+ # set binaries executable
+ into /usr
+ dobin usr/bin/*
+
+ cp -a usr/$(get_libdir)/one/* "${ED}"/usr/$(get_libdir)/one/
+ cp -a usr/share/one/* "${ED}"/usr/share/one/
+ cp -a var/lib/one/* "${ED}"/var/lib/one/
+ rm -rf usr/bin usr/$(get_libdir)/one usr/share/one var/lib/one
+
+ # add documentation
+ dodoc usr/share/docs/one/*
+ rm -rf usr/share/docs
+
+ # install remaining files
+ insinto /usr/share/man
+ doins -r usr/share/man/man1/
+
+ # set correct owner
+ fowners -R ${ONEUSER}:${ONEGROUP} /etc/one /usr/$(get_libdir)/one /usr/share/one /var/lib/{one,opennebula} /var/log/one /var/tmp/one
+
+ # install daemon files
+ if use systemd; then
+ systemd_dounit "${FILESDIR}"/systemd/*.service
+ else
+ doenvd "${FILESDIR}/openrc/99one"
+ newinitd "${FILESDIR}/openrc/opennebula.initd" opennebula
+ newinitd "${FILESDIR}/openrc/sunstone-server.initd" sunstone-server
+ newinitd "${FILESDIR}/openrc/oneflow-server.initd" oneflow-server
+ newconfd "${FILESDIR}/openrc/opennebula.confd" opennebula
+ newconfd "${FILESDIR}/openrc/sunstone-server.confd" sunstone-server
+ newconfd "${FILESDIR}/openrc/oneflow-server.confd" oneflow-server
+ fi
+
+ popd >/dev/null
+
+}
+
+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/$(get_libdir)/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 rsa -N "" -f "${onedir}/.ssh/id_rsa" || die "ssh-keygen failed"
+ #cat > "${onedir}/.ssh/config" <<EOF
+#UserKnownHostsFile /dev/null
+#Host *
+# StrictHostKeyChecking no
+#EOF
+ #cat "${onedir}/.ssh/id_rsa.pub" >> "${onedir}/.ssh/authorized_keys" || die "adding key failed"
+ #chown -R ${ONEUSER}:${ONEGROUP} "${onedir}/.ssh" || die "changing owner failed"
+ elog "Create directory ${onedir}/.ssh with umask 0027."
+ elog "Then generate ssh key using proper cypher algorithm (at least rsa)."
+ elog "Add public key to ${ONEUSER} authorized_keys:"
+ elog "cat ${onedir}/.ssh/id_rsa.pub >> ${onedir}/.ssh/authorized_keys"
+ elog "${ONEUSER} ssh config for any host with"
+ elog "StrictHostKeyChecking no"
+ elog "and"
+ elog "UserKnownHostsFile /dev/null"
+ elog "In the end set correct owner to ${ONEUSER}:"
+ elog "chown -R ${ONEUSER}:${ONEGROUP} ${onedir}/.ssh"
+ 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"
+
+}
+