commit:     b5e607094495e8c79399d8bf8caf632148af764e
Author:     Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
AuthorDate: Mon May 11 00:02:27 2020 +0000
Commit:     Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
CommitDate: Mon May 11 00:02:27 2020 +0000
URL:        https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=b5e60709

Add test for network sandbox in setup phase. Change dependency in opennebula 
from grunt-cli to grunt.

Signed-off-by: Samuel Bernardo <samuelbernardo.mail <AT> gmail.com>

 app-emulation/opennebula/Manifest                 |   4 +-
 app-emulation/opennebula/opennebula-5.10.3.ebuild | 299 ----------------------
 app-emulation/opennebula/opennebula-5.10.4.ebuild |  11 +-
 3 files changed, 9 insertions(+), 305 deletions(-)

diff --git a/app-emulation/opennebula/Manifest 
b/app-emulation/opennebula/Manifest
index 65bc162..8d7d1a4 100644
--- a/app-emulation/opennebula/Manifest
+++ b/app-emulation/opennebula/Manifest
@@ -60,9 +60,7 @@ AUX tmpfiles.d/opennebula-node.conf 17 BLAKE2B 
cfd907f606a7b9b24d897960720f97ed3
 AUX tmpfiles.d/opennebula-sunstone.conf 77 BLAKE2B 
9988562b0e36bf74fc67af5a1777eca18b24e0a1bcfc78735f360f1aceca4602e32f7b6cfbe3b731a13725a9cd14a4dc49b71c12bb7576a29aa00112b37cd2be
 SHA512 
c13210255ebb0f34d464e2799858d6ac2a79afac287ead639821ef5e939b7666a960ebb1ee96bc7098a111ddd6765e72d8a5e53e0647b9a866d0826e02cbd2a1
 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.3.tar.gz 5694695 BLAKE2B 
09e20f0bcea43a454692c7bc5ac7e167024bc838755a2fed31ef5e4a0dea85f97a4334ec950a0a6c3f16a6d49837262dd7791b02298f58da600f65521de59764
 SHA512 
a0b581a6522054241d61255aba3a1754dd16052b058f0de244a3ec35fd99972aed36fef25d087a2a76566fa0d8c875c9e95766294d80adb4c5491231447ec839
 DIST opennebula-5.10.4.tar.gz 5697792 BLAKE2B 
fde611cbe5b44ee403b57e915253c9ffba267230bf3a54cd466260615918e871aebeae6f17c246a84ef1686df176134acff272c49e6a9b69c8841bc8fab1f1b5
 SHA512 
c509ec4a56b7865d118ab79e08227f0a78d1d899361ea2ae2ea3c6ac6ad3ab4a2a38211a4f5b7abf35ef512674d13ffb19f97286fed63515289e4f9a602f3145
 EBUILD opennebula-5.10.1.ebuild 9405 BLAKE2B 
fd6dfefc76da0aaadc993b7ed1593b8826fb642a92797220c9ce6226b846539900f6e7914730decfe57f79514654506e9a1aed76ebd28c1fc797d71ee5a6b2ba
 SHA512 
360d3323e46a1253f6489c696e020ea38e260923d6b0fcb50154b0cb412b4bd3db994365a072915f5a8411032cea12dd8b87fe2f730e418d6742dd7218722a66
-EBUILD opennebula-5.10.3.ebuild 9653 BLAKE2B 
ad5ca71e2d22173d6a8815b1e38a82dc745e0d99d92ff0bdd9d24d86628fd5609213b1a984a984239fa68220877cf5781046164c3314f7bd358283052963e412
 SHA512 
43f66b8361cea0cad56efacf2a0187fd15ee4d49cf6f4c0b0bc563b9dcaa1ee4f23554475a7d23da412c9f58f1f6e26e95db26f5009c1c4270c3fe6e193a6e0c
-EBUILD opennebula-5.10.4.ebuild 9653 BLAKE2B 
ad5ca71e2d22173d6a8815b1e38a82dc745e0d99d92ff0bdd9d24d86628fd5609213b1a984a984239fa68220877cf5781046164c3314f7bd358283052963e412
 SHA512 
43f66b8361cea0cad56efacf2a0187fd15ee4d49cf6f4c0b0bc563b9dcaa1ee4f23554475a7d23da412c9f58f1f6e26e95db26f5009c1c4270c3fe6e193a6e0c
+EBUILD opennebula-5.10.4.ebuild 9705 BLAKE2B 
6fcfa4e006240a45629ea3ed7fa09ac60736fc3efad771cc69b39d7b9a6102b66e3659301f064ca8f7941130e6883812a57ef9c636f52fea5b9c2f3b86507021
 SHA512 
4455c0c4338f47219828b70a68d44c30f53cc9ddbb8352a5b4d4fc6867476236fd4a5fe41be646cb98ad0728407d1afd902fa0714fc01fd71bae005edb0a5ec2
 MISC metadata.xml 931 BLAKE2B 
abb0ecf04eb6fc45f64c5d2d6636591c9d706fbf1902943a80f7e058443787824581219fb8457a83192e4e2b672521609449d4eef78ab677f8c093fe939034b6
 SHA512 
c3770f399572b16601e7eeaf4a1eb4b5eea950ad18239be8719124f60f3edd02da4c7b28b177329d70b0810ee7d8597e522dd62a1bd4c8ea1194acf0d92dfeb2

diff --git a/app-emulation/opennebula/opennebula-5.10.3.ebuild 
b/app-emulation/opennebula/opennebula-5.10.3.ebuild
deleted file mode 100644
index 6db137d..0000000
--- a/app-emulation/opennebula/opennebula-5.10.3.ebuild
+++ /dev/null
@@ -1,299 +0,0 @@
-# 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-cli
-       dev-nodejs/bower
-       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"
-)
-
-pkg_pretend() {
-       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_setup () {
-       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/man1
-       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"
-
-}
-

diff --git a/app-emulation/opennebula/opennebula-5.10.4.ebuild 
b/app-emulation/opennebula/opennebula-5.10.4.ebuild
index 6db137d..6025799 100644
--- a/app-emulation/opennebula/opennebula-5.10.4.ebuild
+++ b/app-emulation/opennebula/opennebula-5.10.4.ebuild
@@ -18,7 +18,7 @@ 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"
+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]
@@ -62,7 +62,7 @@ DEPEND="${RDEPEND}
        >=dev-util/scons-3.0.0
        dev-ruby/nokogiri
        dev-ruby/bundler
-       dev-nodejs/grunt-cli
+       dev-nodejs/grunt
        dev-nodejs/bower
        net-libs/nodejs[npm]
        net-libs/libvncserver
@@ -85,7 +85,7 @@ PATCHES=(
        "${FILESDIR}/patches/install.sh.patch"
 )
 
-pkg_pretend() {
+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"
@@ -96,7 +96,12 @@ pkg_pretend() {
        fi
 }
 
+pkg_pretend() {
+       test_netsandbox
+}
+
 pkg_setup () {
+       test_netsandbox
        enewgroup ${ONEGROUP}
        enewuser ${ONEUSER} -1 /bin/bash /var/lib/one ${ONEGROUP}
 }

Reply via email to