diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-04-29 08:14:50 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-04-29 12:36:41 +0000 |
commit | b7d9e547caa397ec439a817492948b2f5356fc0f (patch) | |
tree | efe42605e85affabd0c5523d53c0c9ac76bf0a83 /unmaintained/opennebula | |
parent | 80acbaee801184140fac0c967cbb8aa051db2b06 (diff) | |
download | aports-b7d9e547caa397ec439a817492948b2f5356fc0f.tar.bz2 aports-b7d9e547caa397ec439a817492948b2f5356fc0f.tar.xz |
move testing/opennebula to unmaintained
it was broken and not touched since 2014.
Diffstat (limited to 'unmaintained/opennebula')
-rw-r--r-- | unmaintained/opennebula/APKBUILD | 91 | ||||
-rw-r--r-- | unmaintained/opennebula/getopt.patch | 15 | ||||
-rw-r--r-- | unmaintained/opennebula/one_auth | 1 | ||||
-rw-r--r-- | unmaintained/opennebula/opennebula-node-kvm.pre-install | 13 | ||||
-rw-r--r-- | unmaintained/opennebula/opennebula.confd | 25 | ||||
-rw-r--r-- | unmaintained/opennebula/opennebula.initd | 60 | ||||
-rw-r--r-- | unmaintained/opennebula/opennebula.pre-install | 9 | ||||
-rw-r--r-- | unmaintained/opennebula/ssh.config | 4 |
8 files changed, 218 insertions, 0 deletions
diff --git a/unmaintained/opennebula/APKBUILD b/unmaintained/opennebula/APKBUILD new file mode 100644 index 0000000000..2cc1e687a5 --- /dev/null +++ b/unmaintained/opennebula/APKBUILD @@ -0,0 +1,91 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: +pkgname=opennebula +pkgver=4.9.80 +pkgrel=2 +pkgdesc="Virtual management infrastructure as a service (IaaS) toolkit for cloud computing" +url="http://opennebula.org" +arch="" +license="Apache" +depends="ruby-json ruby-sequel ruby-nokogiri ruby-sqlite ruby-mysql2 ruby-nokogiri + ruby-rack14 ruby-sinatra ruby-thin ruby-crack ruby-thin ruby-net-ldap + ruby-uuidtools ruby-curb ruby-amazon-ec2 ruby-io-console bash + curl wget" +depends_dev="xmlrpc-c-dev sqlite-dev openssl-dev libxml2-dev curl-dev" +makedepends="$depends_dev scons ruby bash" +install="opennebula.pre-install" +pkgusers=oneadmin +pkggroups=oneadmin +subpackages="$pkgname-dev $pkgname-doc $pkgname-node-kvm:node_kvm" +source="http://downloads.opennebula.org/packages/opennebula-$pkgver/opennebula-$pkgver.tar.gz + opennebula.initd + opennebula.confd + getopt.patch + ssh.config + one_auth" + +_builddir="$srcdir"/opennebula-$pkgver + +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + scons -j${JOBS:-2} || return 1 +} + +package() { + cd "$_builddir" + DESTDIR="$pkgdir" ./install.sh \ + -u $pkgusers -g $pkggroups || return 1 + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 + install -m644 -D "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/$pkgname || return 1 + install -o $pkgusers -g $pkggroups -d \ + "$pkgdir"/var/lib/one/.ssh \ + "$pkgdir"/var/lib/one/.one || return 1 + install -m600 -o $pkgusers -g $pkggroups -D \ + "$srcdir"/ssh.config \ + "$pkgdir"/var/lib/one/.ssh/config || return 1 + install -m600 -o $pkgusers -g $pkggroups -D \ + "$srcdir"/one_auth \ + "$pkgdir"/var/lib/one/.one/one_auth || return 1 + # set the default emulator + echo -e "\nEMULATOR = /usr/bin/qemu-system-x86_64" >> \ + "$pkgdir"/etc/one/vmm_exec/vmm_exec_kvm.conf || return 1 +} + +node_kvm() { + pkgdesc="KVM node for OpenNebula" + arch="noarch" + install="opennebula-node-kvm.pre-install" + depends="ruby openssh qemu-x86_64 libvirt-qemu procps bash" + mkdir -p "$subpkgdir" +} + +md5sums="43ef6a658b5ae121ad4461178abdbd88 opennebula-4.9.80.tar.gz +44ecaf28b2f0293d55aa401e0ec49948 opennebula.initd +0b9c5ef240d1cb13d35b21c081e756ad opennebula.confd +8f1a346b4020b7c3e2853f42cc38d35b getopt.patch +37b82927bd6b0c1dd9cbde2a3728e719 ssh.config +3ae86352df192e0aae9fdee58532610e one_auth" +sha256sums="8e69dedd69001bce6d224661649bc3f5b1608bf87e69dd1ac5ff1e774745a3c9 opennebula-4.9.80.tar.gz +20ea2103ccd37988c1426a7e39f37c9923465e1769cc3669dc47751876f3266a opennebula.initd +296d445dfaee90c114a5cd8ecb208c495a3a22dabde13ec9ece623368f5627a1 opennebula.confd +072ad62b3ef18eb3c9d33b47acb7a867d076c3083ce561bdbffcf98bb852d663 getopt.patch +e934a2b5083a04126e5948a6abf1adfa8e557bb086010453824b44282dafdc8b ssh.config +4af1f964af87ed62f2b953e8b0269b2ad8dfbcba57b5eebddcb9e8f0cc4379da one_auth" +sha512sums="54aff34770a29262a4e3ef886957044489f4d4b1905e847522adff6ad1012df21e9c2caa46bc060fbbbb9d1ce23cb41768f28ca90af5c4e5844b054c0d0d7349 opennebula-4.9.80.tar.gz +2b87e93bce79325ecd57be053e08cc626bdec2bfd9048635452957efc88e5104cbbf74d3c2757e3e42738276b7bd37db2c9845e85570b7ff5f27117dad1d06e2 opennebula.initd +0b5c98642a74a804e36729f0a0abb5434a55ecaa5a9c29620f8940ba69b141f47fa1693a63bc22298e735bba61d3f0b15c82278b5d8071eeb19f02398332f6ae opennebula.confd +7f39da47a89011bd368217bc7cb33a1647b49d43960bf47f22b742dfa109d04e9b18ad0827d5d3b4c05bd6b31d723322b9c899520fbb2db5b4217a38bab9eefe getopt.patch +9da0adff52401e5bd50b25a0ec240e781257330f9084c55c6ca741c9179c29681ee6855bc3607d05949124559828f6fdd029b3ea01b881f472292c96489c64cf ssh.config +8aaab56ae8c8bf7d1c06a47f4f3339c9e62486270b9ab00751dd21fabee19824f05b20b3d979741886539570e761fd3227acd5ef55a04a9273f0b706f93c813f one_auth" diff --git a/unmaintained/opennebula/getopt.patch b/unmaintained/opennebula/getopt.patch new file mode 100644 index 0000000000..3fcf7bd46e --- /dev/null +++ b/unmaintained/opennebula/getopt.patch @@ -0,0 +1,15 @@ +--- opennebula-4.0.1/install.sh.orig ++++ opennebula-4.0.1/install.sh +@@ -51,11 +51,7 @@ + + PARAMETERS="hkrlcsou:g:d:" + +-if [ $(getopt --version | tr -d " ") = "--" ]; then +- TEMP_OPT=`getopt $PARAMETERS "$@"` +-else +- TEMP_OPT=`getopt -o $PARAMETERS -n 'install.sh' -- "$@"` +-fi ++TEMP_OPT=`getopt $PARAMETERS "$@"` + + if [ $? != 0 ] ; then + usage diff --git a/unmaintained/opennebula/one_auth b/unmaintained/opennebula/one_auth new file mode 100644 index 0000000000..8a5c9a6663 --- /dev/null +++ b/unmaintained/opennebula/one_auth @@ -0,0 +1 @@ +admin:admin diff --git a/unmaintained/opennebula/opennebula-node-kvm.pre-install b/unmaintained/opennebula/opennebula-node-kvm.pre-install new file mode 100644 index 0000000000..fa541642ec --- /dev/null +++ b/unmaintained/opennebula/opennebula-node-kvm.pre-install @@ -0,0 +1,13 @@ +#!/bin/sh + +addgroup -S oneadmin 2>/dev/null +addgroup -S libvirt 2>/dev/null +adduser -S -D \ + -h /var/lib/one -s /bin/ash -G oneadmin \ + -g "OpenNebula user" oneadmin 2>/dev/null +addgroup oneadmin libvirt 2>/dev/null +addgroup oneadmin readproc 2>/dev/null +addgroup oneadmin kvm 2>/dev/null +passwd -u oneadmin 2>/dev/null + +exit 0 diff --git a/unmaintained/opennebula/opennebula.confd b/unmaintained/opennebula/opennebula.confd new file mode 100644 index 0000000000..fcda1cc4a7 --- /dev/null +++ b/unmaintained/opennebula/opennebula.confd @@ -0,0 +1,25 @@ +# opennebula home directory +HOME="/var/lib/one" + +# opennebula user +USER="oneadmin" +GROUP="oneadmin" + +# options for oned +ONED_OPTIONS="" + +# scheduler pid file +SCHED_PIDFILE="/var/run/one/sched.pid" + +# The following command line arguments are supported by mm_shed: +# [-p port] to connect to oned - default: 2633 +# [-t timer] seconds between two scheduling actions - default: 30 +# [-m machines limit] max number of VMs managed in each scheduling action +# - default: 300 +# [-d dispatch limit] max number of VMs dispatched in each scheduling action +# - default: 30 +# [-h host dispatch] max number of VMs dispatched to a given host in each +# scheduling action - default: 1 +SCHED_OPTIONS="" + + diff --git a/unmaintained/opennebula/opennebula.initd b/unmaintained/opennebula/opennebula.initd new file mode 100644 index 0000000000..0da1099049 --- /dev/null +++ b/unmaintained/opennebula/opennebula.initd @@ -0,0 +1,60 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + after mysql +} + +start() { + checkconfig || return 1 + + ebegin "Starting OpenNebula daemon" + start-stop-daemon \ + --start \ + --exec /usr/bin/oned \ + --user ${USER}:${GROUP} \ + -- ${ONED_OPTIONS} + eend $? + + ebegin "Starting OpenNebula scheduler" + start-stop-daemon \ + --start \ + --exec /usr/bin/mm_sched \ + --pidfile "${SCHED_PIDFILE}" \ + --make-pidfile \ + --background \ + --user ${USER}:${GROUP} \ + -- ${SCHED_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping OpenNebula daemon" + start-stop-daemon \ + --stop \ + --exec /usr/bin/oned + eend $? + + ebegin "Stopping OpenNebula scheduler" + start-stop-daemon \ + --stop \ + --exec /usr/bin/mm_sched \ + --pidfile "${SCHED_PIDFILE}" + eend $? +} + +gen_key() { + ebegin "Generating ssh key" + su - ${USER} -c "ssh-keygen -q -t dsa -N '' -f ${HOME}/.ssh/id_dsa" + cp -p "${HOME}/.ssh/id_dsa.pub" "${HOME}/.ssh/authorized_keys" + eend $? +} + +checkconfig() { + if [ ! -f "${HOME}/.ssh/id_dsa" ] ; then + gen_key || return 1 + fi +} + diff --git a/unmaintained/opennebula/opennebula.pre-install b/unmaintained/opennebula/opennebula.pre-install new file mode 100644 index 0000000000..d54936abe7 --- /dev/null +++ b/unmaintained/opennebula/opennebula.pre-install @@ -0,0 +1,9 @@ +#!/bin/sh + +addgroup -S oneadmin 2>/dev/null +adduser -S -D -H \ + -s /bin/ash -h /var/lib/one -G oneadmin \ + -g "OpenNebula user" oneadmin 2>/dev/null +passwd -u oneadmin 2>/dev/null + +exit 0 diff --git a/unmaintained/opennebula/ssh.config b/unmaintained/opennebula/ssh.config new file mode 100644 index 0000000000..9fa48e01c6 --- /dev/null +++ b/unmaintained/opennebula/ssh.config @@ -0,0 +1,4 @@ +UserKnownHostsFile /dev/null +ConnectTimeout 5 +Host * + StrictHostKeyChecking no |