1
0
mirror of https://github.com/sjlongland/opennebula-overlay.git synced 2025-09-13 10:03:16 +10:00

Check-in of semi-working package.

This commit is contained in:
Stuart Longland 2017-07-29 17:35:25 +10:00
commit 9c9b731958
Signed by: stuartl
GPG Key ID: F954BBBB7948D546
12 changed files with 305 additions and 0 deletions

23
README.md Normal file
View File

@ -0,0 +1,23 @@
Gentoo OpenNebula overlay
=========================
The purpose of this repository is to provide the necessary packaging files for
installing the OpenNebula Enterprise Cloud software on a Gentoo Linux-based
host.
Status
------
As of this time, the work contained herein is highly experimental and not at
all supported by myself or OpenNebula upstream. While some things may work,
the code is known to be broken on `musl`-based Gentoo systems and quite
possibly won't work in your environment.
If it breaks, you get to keep the pieces.
Usage
-----
Clone the repository somewhere convenient, then add the cloned directory to
your `PORTDIR_OVERLAY` path. You should then be able to run
`emerge -a app-emulation/opennebula` to install OpenNebula on your system.

View File

@ -0,0 +1 @@
DIST opennebula-5.4.0.tar.gz 14626223 SHA256 a0419d624c40d2d72c75801a461f7a6d722acfa4555be1cb921122b3bfd0d4a8 SHA512 4d7d4f6c20a6185539a88006e4d15681d90cee45506d36017a538415a3b3cce809f02ff248013f9e2daa5f1d20afd308a0a014853b8462723ad6ba5acaa84626 WHIRLPOOL 1c9a5d1574a04369c2b3df80e00385045b3931153bab3a98a5f8e8082bf142fd0c95d41959ff50a681569c5ee6abd741d5d68fa9dfc2641403280c93502bce72

View File

@ -0,0 +1,34 @@
#!/sbin/openrc-run
depend() {
need net
use opennebula
}
#
# Function that starts the daemon/service
#
start() {
for d in /var/run/one /var/lock/one /var/log/one /var/lib/one
do
if [ ! -d ${d} ]
then
ebegin "Creating ${d}"
mkdir ${d}
eend $?
fi
chown -R oneadmin:oneadmin ${d}
done
ebegin "Starting OneFlow Service"
su oneadmin -s /bin/sh -c "/usr/bin/oneflow-server start"
eend $?
}
#
# Function that stops the daemon/service
#
stop() {
ebegin "Stopping OneFlow Service"
su oneadmin -s /bin/sh -c "/usr/bin/oneflow-server stop"
eend $?
}

View File

@ -0,0 +1,34 @@
#!/sbin/openrc-run
depend() {
need net
use opennebula
}
#
# Function that starts the daemon/service
#
start() {
for d in /var/run/one /var/lock/one /var/log/one /var/lib/one
do
if [ ! -d ${d} ]
then
ebegin "Creating ${d}"
mkdir ${d}
eend $?
fi
chown -R oneadmin:oneadmin ${d}
done
ebegin "Starting OneGate Service"
su oneadmin -s /bin/sh -c "/usr/bin/onegate-server start"
eend $?
}
#
# Function that stops the daemon/service
#
stop() {
ebegin "Stopping OneGate Service"
su oneadmin -s /bin/sh -c "/usr/bin/onegate-server stop"
eend $?
}

View File

@ -0,0 +1,34 @@
#!/sbin/openrc-run
depend() {
need net
use opennebula
}
#
# Function that starts the daemon/service
#
start() {
for d in /var/run/one /var/lock/one /var/log/one /var/lib/one
do
if [ ! -d ${d} ]
then
ebegin "Creating ${d}"
mkdir ${d}
eend $?
fi
chown -R oneadmin:oneadmin ${d}
done
ebegin "Starting OpenNebula ECONE Service"
su oneadmin -s /bin/sh -c "/usr/bin/econe-server start"
eend $?
}
#
# Function that stops the daemon/service
#
stop() {
ebegin "Stopping OpenNebula ECONE Service"
su oneadmin -s /bin/sh -c "/usr/bin/econe-server stop"
eend $?
}

View File

@ -0,0 +1,34 @@
#!/sbin/openrc-run
depend() {
need net
use opennebula
}
#
# Function that starts the daemon/service
#
start() {
for d in /var/run/one /var/lock/one /var/log/one /var/lib/one
do
if [ ! -d ${d} ]
then
ebegin "Creating ${d}"
mkdir ${d}
eend $?
fi
chown -R oneadmin:oneadmin ${d}
done
ebegin "Starting OpenNebula NoVNC Server"
su oneadmin -s /bin/sh -c "/usr/bin/novnc-server start"
eend $?
}
#
# Function that stops the daemon/service
#
stop() {
ebegin "Stopping OpenNebula NoVNC Server"
su oneadmin -s /bin/sh -c "/usr/bin/novnc-server stop"
eend $?
}

View File

@ -0,0 +1,31 @@
#!/sbin/openrc-run
depend() {
need net opennebula-sunstone-novnc
use opennebula
}
#
# Function that starts the daemon/service
#
start() {
for d in /var/run/one /var/lock/one /var/log/one /var/lib/one
do
if [ ! -d ${d} ]
then
ebegin "Creating ${d}"
mkdir ${d}
eend $?
fi
chown -R oneadmin:oneadmin ${d}
done
ebegin "Starting OpenNebula Sunstone Web Interface"
su oneadmin -s /bin/sh -c "/usr/bin/sunstone-server start-sunstone"
eend $?
}
stop() {
ebegin "Stopping OpenNebula Sunstone Web Interface"
su oneadmin -s /bin/sh -c "/usr/bin/sunstone-server stop-sunstone"
eend $?
}

View File

@ -0,0 +1,33 @@
#!/sbin/openrc-run
depend() {
need net
}
#
# Function that starts the daemon/service
#
start() {
for d in /var/run/one /var/lock/one /var/log/one /var/lib/one
do
if [ ! -d ${d} ]
then
ebegin "Creating ${d}"
mkdir ${d}
eend $?
fi
chown -R oneadmin:oneadmin ${d}
done
ebegin "Starting OpenNebula cloud"
su oneadmin -s /bin/sh -c '/usr/bin/one start'
eend $?
}
#
# Function that stops the daemon/service
#
stop() {
ebegin "Stopping OpenNebula cloud"
su oneadmin -s /bin/sh -c '/usr/bin/one stop'
eend $?
}

View File

@ -0,0 +1,75 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
DESCRIPTION="OpenNebula Enterprise Cloud manager"
HOMEPAGE="https://opennebula.org"
SRC_URI="http://downloads.opennebula.org/packages/opennebula-${PV}/opennebula-${PV}.tar.gz"
inherit scons-utils toolchain-funcs user
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="mysql"
DEPEND="dev-lang/ruby
dev-db/sqlite
mysql? ( || ( dev-db/mariadb dev-db/mysql ) )
dev-ruby/sqlite3
dev-libs/xmlrpc-c[abyss]
dev-util/scons
dev-ruby/json
dev-ruby/sinatra
dev-ruby/uuidtools
dev-ruby/curb
dev-ruby/nokogiri"
RDEPEND="${DEPEND}"
src_prepare() {
# Call this, or the setup will barf!
eapply_user
# Patch the SUNSTONE_MINIFIED_DIRS variable, which is missing a
# $ sign
sed -i -e '/^SUNSTONE_MINIFIED_DIRS/ s/="SUNSTONE_LOCATION/="$SUNSTONE_LOCATION/g' \
"${S}/install.sh"
}
src_configure() {
MYSCONS=(
CC="$(tc-getCC)"
)
if use mysql
then
MYSCONS[1]='mysql=yes'
fi
}
src_compile() {
escons "${MYSCONS[@]}"
}
src_install() {
cd "${S}"
unset ROOT
DESTDIR="${D}" ./install.sh -u oneadmin -g oneadmin || die
# Install sunstone components, because the above script doesn't.
DESTDIR="${D}" ./install.sh -u oneadmin -g oneadmin -s -p || die
# These directories should not be installed by us, so remove them
rm -fr "${D}/var/lock" "${D}/var/run"
# Init scripts
for f in "${FILESDIR}"/*.init
do
newinitd "${f}" "$( basename "${f}" .init )"
done
}
pkg_setup() {
enewgroup oneadmin
enewuser oneadmin -1 /bin/bash /var/lib/one oneadmin
}

4
metadata/layout.conf Normal file
View File

@ -0,0 +1,4 @@
masters = gentoo
repo-name = sjlongland-opennebula
use-manifests = true
thin-manifests = true

1
profiles/categories Normal file
View File

@ -0,0 +1 @@
app-emulation

1
profiles/repo_name Normal file
View File

@ -0,0 +1 @@
sjlongland-opennebula