Init commit

master
santic-zombie 2 years ago
commit 2b9bed2e98
  1. 105
      APKBUILD
  2. 46
      opennebula
  3. 36
      opennebula-flow
  4. 36
      opennebula-gate
  5. 36
      opennebula-hem
  6. 28
      opennebula-novnc
  7. 36
      opennebula-scheduler
  8. 46
      opennebula-ssh-agent
  9. 30
      opennebula-sunstone
  10. 35
      opennebula.install
  11. 43
      opennebula.logrotate
  12. 4
      opennebula.post-deinstall
  13. 13
      opennebula.post-install
  14. 5
      opennebula.post-upgrade
  15. 4
      opennebula.pre-deinstall
  16. 4
      opennebula.pre-install
  17. 20
      svn.patch

@ -0,0 +1,105 @@
# Contributor: Santic <email@santic-zombie.ru>
# Maintainer: Santic <email@santic-zombie.ru>
pkgname=opennebula
pkgver=6.2.2
pkgrel=1
pkgdesc="OpenNebula Server and Scheduler (Community Edition)"
url="https://opennebula.io/"
arch="x86_64"
license="Apache"
depends="libvncserver
gnutls
libnsl
alpine-sdk
linux-headers
npm
ronn
mariadb-server-utils
mariadb-client
libxml2
xmlrpc-c
g++
ruby-nokogiri
ruby-rexml
ruby-xmlrpc
ruby-bundler
ruby-pg
ruby-augeas
libpg_query"
makedepends="bash
python2
libvncserver-dev
gnutls-dev
libnsl-dev
openssl-dev
sqlite-dev
czmq-dev
mariadb-dev
ruby-dev
libxml2-dev
xmlrpc-c-dev
scons
make
augeas-dev
curl-dev
libpq-dev"
install="${pkgname}.pre-install
${pkgname}.post-install
${pkgname}.post-upgrade
${pkgname}.pre-deinstall
${pkgname}.post-deinstall"
source="https://github.com/OpenNebula/one/archive/release-${pkgver}.tar.gz
svn.patch
opennebula
opennebula-scheduler
opennebula-novnc
opennebula-sunstone
opennebula-hem
opennebula-flow
opennebula-gate
opennebula-ssh-agent
opennebula.logrotate
"
builddir="$srcdir/"
prepare() {
cd "one-release-${pkgver}"
patch -p0 < "${srcdir}/svn.patch"
npm config set python python2.7
npm install bower grunt -g
}
build() {
cd "one-release-${pkgver}"
CXXFLAGS="--std=c++14" scons -j2 new_xmlrpc=yes mysql=yes sqlite=yes sunstone=yes systemd=no
}
package() {
cd "one-release-${pkgver}"
install -D -m644 "${srcdir}/opennebula" "${pkgdir}/etc/init.d/opennebula"
install -D -m644 "${srcdir}/opennebula-scheduler" "${pkgdir}/etc/init.d/opennebula-scheduler"
install -D -m644 "${srcdir}/opennebula-novnc" "${pkgdir}/etc/init.d/opennebula-novnc"
install -D -m644 "${srcdir}/opennebula-sunstone" "${pkgdir}/etc/init.d/opennebula-sunstone"
install -D -m644 "${srcdir}/opennebula-hem" "${pkgdir}/etc/init.d/opennebula-hem"
install -D -m644 "${srcdir}/opennebula-flow" "${pkgdir}/etc/init.d/opennebula-flow"
install -D -m644 "${srcdir}/opennebula-gate" "${pkgdir}/etc/init.d/opennebula-gate"
install -D -m644 "${srcdir}/opennebula-ssh-agent" "${pkgdir}/etc/init.d/opennebula-ssh-agent"
install -D -m644 "${srcdir}/opennebula.logrotate" "${pkgdir}/etc/logrotate.d/opennebula.logrotate"
DESTDIR="${pkgdir}" ./install.sh -u oneadmin -g cloud
}
sha512sums="
292a1a3a823d4ec3e6cdec59b0f9fbf81125d0541bc8a2e234343f59fc9c4e7f2f2f1cd14463211a8c750bb902021dc1389a47927ad491a1cee2fa064307e813 release-6.2.2.tar.gz
1e2c5da5c2ab49ab355550568985cc538d591198343ec468277d0bb5106275fb4cf7e2acdc26868c79803313a4aec935568370b723bce3384c7e056f26fa9066 svn.patch
121d43da2299a8f347dfff2124253617d2d4f175bafe5f14687a58e72ada60f08fbdcba1b5dbdc48434c226a6f75b46eb2e9203f8549733d1393ca348f5a00ff opennebula
c3d85c11a1e6f9ae05a45378ba398ac68ee2a8b961f0f24e394bbdf92c83c8fcc64c5619819afc1b2e563607e99bd6402744fba396bd3c6c4f48c0a8b09f897e opennebula-scheduler
6c5127d4b515777bba83236623066f300f0f8a6086a19848b72edb9cdb74fd906595d02b971de91d67585e79d8d419e5a66d3cc69c55d898561c4a5f74a303d3 opennebula-novnc
99510f519200d16b65c6fef50cfbc6f88950453759b8e2eab3e729bc8329fbb605dbe7fa6c11febccac6ded0cd1328aef9d1137028a0083e0a9de0a51d357dfc opennebula-sunstone
17a0d28b60301c59fc4a6fbeaf759c5d075981b000ef93f67e151f16c0ec339de3e0b4b6ead1ca33903428394abdea40eac907a419f136ba7a1b6fa8965e1422 opennebula-hem
1ac94e85f3ebe43e51d87a75560d7d7aa48f291326d7b049381329435a7ed575fbfd1dbf23ff9c055bbb900994aa61885a2b7efb7c3e92c21d1d203b8d047231 opennebula-flow
fdb1eeacb5767cae78829295551a0e924e31d6b47f899fb341652607b8efe5b630c0233835e940f5d8577632d223ab46a87eee2ebce36a1b43077aa561ac47e3 opennebula-gate
121d43da2299a8f347dfff2124253617d2d4f175bafe5f14687a58e72ada60f08fbdcba1b5dbdc48434c226a6f75b46eb2e9203f8549733d1393ca348f5a00ff opennebula-ssh-agent
a6c33276b527e8aafd39815688dbdf8dbfaa4e1ab5b708e44b48c6b358bba2dd4c2225a7e4647b438a2396ed6fd159a3421fe2798f0f954e250d3bef8a57a742 opennebula.logrotate
"

@ -0,0 +1,46 @@
#!/sbin/openrc-run
name=$RC_SVCNAME
description="OpenNebula management"
command="/usr/bin/oned"
command_args="-f"
command_user="oneadmin:oneadmin"
pidfile="/run/one/${RC_SVCNAME}.pid"
supervisor="supervise-daemon"
depend() {
need mariadb
after syslog networking localmount netmount
want opennebula-scheduler opennebula-hem opennebula-ssh-agent
}
start_pre() {
/bin/mkdir -p /var/log/one
/bin/mkdir -p /var/lock/one
/bin/mkdir -p /run/one
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one
/usr/sbin/logrotate -s /tmp/logrotate.state -f /etc/logrotate.d/opennebula.logrotate
}
start() {
ebegin "Starting $RC_SVCNAME"
start-stop-daemon --background \
--exec $command \
--make-pidfile --pidfile $pidfile --user $command_user \
--start -- $command_args
eend $?
}
stop() {
ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop \
--retry TERM/10/KILL/10 \
--exec $command \
--pidfile $pidfile --user $command_user
eend $?
}
stop_post() {
/bin/rm -f /var/lock/one/one
/usr/share/one/follower_cleanup
}

@ -0,0 +1,36 @@
#!/sbin/openrc-run
name=$RC_SVCNAME
description="OpenNebula Flow Service"
command="/usr/bin/ruby /usr/lib/one/oneflow/oneflow-server.rb"
command_user="oneadmin:oneadmin"
pidfile="/run/one/${RC_SVCNAME}.pid"
supervisor="supervise-daemon"
depend() {
after syslog networking netmount opennebula
}
start_pre() {
/bin/mkdir -p /var/log/one
/bin/mkdir -p /var/lock/one
/bin/mkdir -p /run/one
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one
}
start() {
ebegin "Starting $RC_SVCNAME"
start-stop-daemon --background \
--exec $command \
--make-pidfile --pidfile $pidfile --user $command_user \
--start
eend $?
}
stop() {
ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop \
--exec $command \
--pidfile $pidfile --user $command_user
eend $?
}

@ -0,0 +1,36 @@
#!/sbin/openrc-run
name=$RC_SVCNAME
description="OpenNebula Gate Daemon"
command="/usr/bin/ruby /usr/lib/one/onegate/onegate-server.rb"
command_user="oneadmin:oneadmin"
pidfile="/run/one/${RC_SVCNAME}.pid"
supervisor="supervise-daemon"
depend() {
after syslog networking netmount opennebula
}
start_pre() {
/bin/mkdir -p /var/log/one
/bin/mkdir -p /var/lock/one
/bin/mkdir -p /run/one
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one
}
start() {
ebegin "Starting $RC_SVCNAME"
start-stop-daemon --background \
--exec $command \
--make-pidfile --pidfile $pidfile --user $command_user \
--start
eend $?
}
stop() {
ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop \
--exec $command \
--pidfile $pidfile --user $command_user
eend $?
}

@ -0,0 +1,36 @@
#!/sbin/openrc-run
name=$RC_SVCNAME
description="OpenNebula Hook Execution Service"
command="/usr/bin/ruby /usr/lib/one/onehem/onehem-server.rb"
command_user="oneadmin:oneadmin"
pidfile="/run/one/${RC_SVCNAME}.pid"
supervisor="supervise-daemon"
depend() {
after syslog networking netmount opennebula
}
start_pre() {
/bin/mkdir -p /var/log/one
/bin/mkdir -p /var/lock/one
/bin/mkdir -p /run/one
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one
}
start() {
ebegin "Starting $RC_SVCNAME"
start-stop-daemon --background \
--exec $command \
--make-pidfile --pidfile $pidfile --user $command_user \
--start
eend $?
}
stop() {
ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop \
--exec $command \
--pidfile $pidfile --user $command_user
eend $?
}

@ -0,0 +1,28 @@
#!/sbin/openrc-run
name=$RC_SVCNAME
description="OpenNebula noVNC Server"
command="/usr/bin/novnc-server"
command_user="oneadmin:oneadmin"
supervisor="supervise-daemon"
depend() {
before opennebula-sunstone
after syslog networking netmount
}
start() {
ebegin "Starting $RC_SVCNAME"
start-stop-daemon \
--exec $command \
--user $command_user \
--start -- start
eend $?
}
stop() {
ebegin "Stopping $RC_SVCNAME"
$command stop
/bin/rm -f /var/lock/one/.novnc.lock
eend $?
}

@ -0,0 +1,36 @@
#!/sbin/openrc-run
name=$RC_SVCNAME
description="OpenNebula Cloud Scheduler Daemon"
command="/usr/bin/mm_sched"
command_user="oneadmin:oneadmin"
pidfile="/run/one/${RC_SVCNAME}.pid"
supervisor="supervise-daemon"
depend() {
after syslog networking netmount opennebula
}
start_pre() {
/bin/mkdir -p /var/log/one
/bin/mkdir -p /var/lock/one
/bin/mkdir -p /run/one
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one
}
start() {
ebegin "Starting $RC_SVCNAME"
start-stop-daemon --background \
--exec $command \
--make-pidfile --pidfile $pidfile --user $command_user \
--start
eend $?
}
stop() {
ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop \
--exec $command \
--pidfile $pidfile --user $command_user
eend $?
}

@ -0,0 +1,46 @@
#!/sbin/openrc-run
name=$RC_SVCNAME
description="OpenNebula management"
command="/usr/bin/oned"
command_args="-f"
command_user="oneadmin:oneadmin"
pidfile="/run/one/${RC_SVCNAME}.pid"
supervisor="supervise-daemon"
depend() {
need mariadb
after syslog networking localmount netmount
want opennebula-scheduler opennebula-hem opennebula-ssh-agent
}
start_pre() {
/bin/mkdir -p /var/log/one
/bin/mkdir -p /var/lock/one
/bin/mkdir -p /run/one
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one
/usr/sbin/logrotate -s /tmp/logrotate.state -f /etc/logrotate.d/opennebula.logrotate
}
start() {
ebegin "Starting $RC_SVCNAME"
start-stop-daemon --background \
--exec $command \
--make-pidfile --pidfile $pidfile --user $command_user \
--start -- $command_args
eend $?
}
stop() {
ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop \
--retry TERM/10/KILL/10 \
--exec $command \
--pidfile $pidfile --user $command_user
eend $?
}
stop_post() {
/bin/rm -f /var/lock/one/one
/usr/share/one/follower_cleanup
}

@ -0,0 +1,30 @@
#!/sbin/openrc-run
name=$RC_SVCNAME
description="OpenNebula Web UI Server"
command="/usr/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb"
command_user="oneadmin:oneadmin"
pidfile="/run/one/${RC_SVCNAME}.pid"
supervisor="supervise-daemon"
depend() {
after syslog networking netmount opennebula
want opennebula-novnc
}
start() {
ebegin "Starting $RC_SVCNAME"
start-stop-daemon --background \
--exec $command \
--make-pidfile --pidfile $pidfile --user $command_user \
--start
eend $?
}
stop() {
ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop \
--exec $command \
--pidfile $pidfile --user $command_user
eend $?
}

@ -0,0 +1,35 @@
pre-install() {
groupadd cloud
useradd -m -g cloud -c "OpenNebula administrator account" -s /bin/ash oneadmin
}
post-install() {
# Append the oneadmin credentials to one_auth to avoid overwriting a file
# that may already exist
usermod -m -d /var/lib/one oneadmin
if [ ! -f /var/lib/one/.one/one_auth ]; then
mkdir -p /var/lib/one/.one/
echo 'oneadmin:0neadm1n' >> /var/lib/one/.one/one_auth
echo ">> You must edit the password in /var/lib/one/.one/one_auth"
fi
chown oneadmin:cloud -R /var/log/one /var/lib/one /run/one /run/lock/one
echo ">> To install required gems run as a local user:"
echo ">> bundler install --gemfile /usr/share/one/Gemfile"
}
post-upgrade(){
chown oneadmin:cloud -R /var/lib/one/sunstone
printf "NOTE: This is may be an major upgrade! If you are not installing from scratch, check the compatibility guide at:\n\n\thttp://docs.opennebula.org/5.10/intro_release_notes/release_notes/compatibility.html\n\thttp://docs.opennebula.org/5.10/intro_release_notes/upgrades/index.html\n"
echo ">> To install required gems run as a local user:"
echo ">> bundler install --gemfile /usr/share/one/Gemfile"
}
pre-deinstall() {
userdel -r oneadmin && echo ">> User 'oneadmin' has been removed."
groupdel cloud && echo ">> Group 'cloud' has been removed."
}
post-deinstall() {
echo ">> You can uninstall the Ruby gems if no other packages require them."
echo ">> For example, 'gem uninstall sequel' would uninstall the 'sequel' Ruby gem."
}

@ -0,0 +1,43 @@
delaycompress
dateext
dateformat -%Y%m%d-%s
compress
weekly
rotate 4
/var/log/one/one_xmlrpc.log {
missingok
notifempty
copytruncate
}
/var/log/one/oned.log {
missingok
notifempty
copytruncate
}
/var/log/one/sched.log {
missingok
notifempty
copytruncate
}
/var/log/one/onehem.log {
missingok
notifempty
copytruncate
}
/var/log/one/onegate.log {
missingok
notifempty
copytruncate
}
/var/log/one/oneflow.log {
missingok
notifempty
copytruncate
}

@ -0,0 +1,4 @@
#!/bin/sh
echo ">> You can uninstall the Ruby gems if no other packages require them."
echo ">> For example, 'gem uninstall sequel' would uninstall the 'sequel' Ruby gem."
exit 0

@ -0,0 +1,13 @@
#!/bin/sh
# Append the oneadmin credentials to one_auth to avoid overwriting a file
# that may already exist
usermod -m -d /var/lib/one oneadmin
if [ ! -f /var/lib/one/.one/one_auth ]; then
mkdir -p /var/lib/one/.one/
echo 'oneadmin:0neadm1n' >> /var/lib/one/.one/one_auth
echo ">> You must edit the password in /var/lib/one/.one/one_auth"
fi
chown oneadmin:cloud -R /var/log/one /var/lib/one /run/one /run/lock/one
echo ">> To install required gems run as a local user:"
echo ">> bundler install --gemfile /usr/share/one/Gemfile"
exit 0

@ -0,0 +1,5 @@
#!/bin/sh
chown oneadmin:cloud -R /var/lib/one/sunstone
echo ">> To install required gems run as a local user:"
echo ">> bundler install --gemfile /usr/share/one/Gemfile"
exit 0

@ -0,0 +1,4 @@
#!/bin/sh
userdel -r oneadmin && echo ">> User 'oneadmin' has been removed."
groupdel cloud && echo ">> Group 'cloud' has been removed."
exit 0

@ -0,0 +1,4 @@
#!/bin/sh
groupadd cloud
useradd -m -g cloud -c "OpenNebula administrator account" -s /bin/ash oneadmin
exit 0

@ -0,0 +1,20 @@
Index: src/svncterm_server/genfont.c
--- src/svncterm_server/genfont.c
+++ src/svncterm_server/genfont.c
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
#include <zlib.h>
#include <string.h>
#include <linux/limits.h>
@@ -77,6 +78,8 @@
unsigned int height, width; /* max dimensions of glyphs */
/* charsize = height * ((width + 7) / 8) */
};
+
+typedef uint16_t u_int16_t;
/* -------------------------------------------------------------------------- */
/* Font map management */
Loading…
Cancel
Save