diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2013-06-12 13:55:43 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2013-06-12 13:56:16 +0000 |
commit | ed6da5f2a59f971c3f340becc4a2f0fa6d430a0e (patch) | |
tree | ddd16180c7bc141ef3610ae95cc9f9b5e8ecc293 | |
parent | 51cfe949cfb6c29c257fdbbddcaf07779f2c16b9 (diff) | |
download | aports-ed6da5f2a59f971c3f340becc4a2f0fa6d430a0e.tar.bz2 aports-ed6da5f2a59f971c3f340becc4a2f0fa6d430a0e.tar.xz |
testing/opennebula: various fixes
-rw-r--r-- | testing/opennebula/APKBUILD | 45 | ||||
-rw-r--r-- | testing/opennebula/one_auth | 1 | ||||
-rw-r--r-- | testing/opennebula/opennebula.confd | 2 | ||||
-rw-r--r-- | testing/opennebula/opennebula.initd | 16 | ||||
-rw-r--r-- | testing/opennebula/opennebula.pre-install | 5 | ||||
-rw-r--r-- | testing/opennebula/ssh.config | 4 |
6 files changed, 57 insertions, 16 deletions
diff --git a/testing/opennebula/APKBUILD b/testing/opennebula/APKBUILD index c11692b74a..2baeaca0a8 100644 --- a/testing/opennebula/APKBUILD +++ b/testing/opennebula/APKBUILD @@ -2,14 +2,14 @@ # Maintainer: pkgname=opennebula pkgver=4.0.1 -pkgrel=3 +pkgrel=4 pkgdesc="Virtual management infrastructure as a service (IaaS) toolkit for cloud computing" url="http://opennebula.org" arch="all" license="Apache" depends="ruby-json ruby-sequel ruby-nokogiri ruby-sqlite ruby-mysql2 ruby-nokogiri - ruby-rack ruby-sinatra ruby-thin ruby-crack ruby-thin ruby-net-ldap - ruby-uuidtools ruby-curb ruby-amazon-ec2" + ruby-rack14 ruby-sinatra ruby-thin ruby-crack ruby-thin ruby-net-ldap + ruby-uuidtools ruby-curb ruby-amazon-ec2 ruby-io-console ruby-gems bash" depends_dev="xmlrpc-c-dev sqlite-dev openssl-dev libxml2-dev curl-dev" makedepends="$depends_dev scons ruby ruby-gems bash" install="opennebula.pre-install" @@ -19,7 +19,9 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-node-kvm:node_kvm" source="http://dev.opennebula.org/packages/opennebula-$pkgver/opennebula-$pkgver.tar.gz opennebula.initd opennebula.confd - getopt.patch" + getopt.patch + ssh.config + one_auth" _builddir="$srcdir"/opennebula-$pkgver @@ -41,11 +43,20 @@ build() { package() { cd "$_builddir" DESTDIR="$pkgdir" ./install.sh \ - -u oneadmin -g oneadmin || return 1 + -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 } node_kvm() { @@ -56,14 +67,20 @@ node_kvm() { } md5sums="c45537dfb689a357e7300dc5ed996d75 opennebula-4.0.1.tar.gz -ffd98ee7961fd3c7d076ff6da4e33d8c opennebula.initd -f213d16b6b90115000950618a0640b99 opennebula.confd -8f1a346b4020b7c3e2853f42cc38d35b getopt.patch" +44ecaf28b2f0293d55aa401e0ec49948 opennebula.initd +0b9c5ef240d1cb13d35b21c081e756ad opennebula.confd +8f1a346b4020b7c3e2853f42cc38d35b getopt.patch +37b82927bd6b0c1dd9cbde2a3728e719 ssh.config +3ae86352df192e0aae9fdee58532610e one_auth" sha256sums="258cb698b732454534c9729d6ee1abe3f43aa480ce5c7ccef477a198f832bf74 opennebula-4.0.1.tar.gz -ed875ccf38c4b2a2ed96b110d00cca7d50d18cee9893e7da88fc0e7704981704 opennebula.initd -cd358620bb8e76fd85e2f5b86d517569c12f0d44ec3440ef80f3a45a665f30db opennebula.confd -072ad62b3ef18eb3c9d33b47acb7a867d076c3083ce561bdbffcf98bb852d663 getopt.patch" +20ea2103ccd37988c1426a7e39f37c9923465e1769cc3669dc47751876f3266a opennebula.initd +296d445dfaee90c114a5cd8ecb208c495a3a22dabde13ec9ece623368f5627a1 opennebula.confd +072ad62b3ef18eb3c9d33b47acb7a867d076c3083ce561bdbffcf98bb852d663 getopt.patch +e934a2b5083a04126e5948a6abf1adfa8e557bb086010453824b44282dafdc8b ssh.config +4af1f964af87ed62f2b953e8b0269b2ad8dfbcba57b5eebddcb9e8f0cc4379da one_auth" sha512sums="64ddf4b814e2d37aba9f6425fb7668dbcb6eaff33d2f609601d3738c2f5183a631ab90ed25c41b549b92e7f28d4920298a65d222ef7e8a56d27190a9738fa149 opennebula-4.0.1.tar.gz -e9c2b4b2f7516277d8bd0ec8ce12bfc9d4a172b631fed7b0f977775467eb689e0daa8f487da9c01621d0381f68f8fefa6571002dc43ce8a6129b6a5ff75c74b5 opennebula.initd -77cd2fb0108a5a6665edc0c3e392511e93abf22e31b7ea451a241288572b9b79a997975bb62214dd02be49b406ef42671bacb8a98e6b1aa20dc045df7c2e82fc opennebula.confd -7f39da47a89011bd368217bc7cb33a1647b49d43960bf47f22b742dfa109d04e9b18ad0827d5d3b4c05bd6b31d723322b9c899520fbb2db5b4217a38bab9eefe getopt.patch" +2b87e93bce79325ecd57be053e08cc626bdec2bfd9048635452957efc88e5104cbbf74d3c2757e3e42738276b7bd37db2c9845e85570b7ff5f27117dad1d06e2 opennebula.initd +0b5c98642a74a804e36729f0a0abb5434a55ecaa5a9c29620f8940ba69b141f47fa1693a63bc22298e735bba61d3f0b15c82278b5d8071eeb19f02398332f6ae opennebula.confd +7f39da47a89011bd368217bc7cb33a1647b49d43960bf47f22b742dfa109d04e9b18ad0827d5d3b4c05bd6b31d723322b9c899520fbb2db5b4217a38bab9eefe getopt.patch +9da0adff52401e5bd50b25a0ec240e781257330f9084c55c6ca741c9179c29681ee6855bc3607d05949124559828f6fdd029b3ea01b881f472292c96489c64cf ssh.config +8aaab56ae8c8bf7d1c06a47f4f3339c9e62486270b9ab00751dd21fabee19824f05b20b3d979741886539570e761fd3227acd5ef55a04a9273f0b706f93c813f one_auth" diff --git a/testing/opennebula/one_auth b/testing/opennebula/one_auth new file mode 100644 index 0000000000..8a5c9a6663 --- /dev/null +++ b/testing/opennebula/one_auth @@ -0,0 +1 @@ +admin:admin diff --git a/testing/opennebula/opennebula.confd b/testing/opennebula/opennebula.confd index 3b15e61bf8..fcda1cc4a7 100644 --- a/testing/opennebula/opennebula.confd +++ b/testing/opennebula/opennebula.confd @@ -1,3 +1,5 @@ +# opennebula home directory +HOME="/var/lib/one" # opennebula user USER="oneadmin" diff --git a/testing/opennebula/opennebula.initd b/testing/opennebula/opennebula.initd index d80d3753d9..0da1099049 100644 --- a/testing/opennebula/opennebula.initd +++ b/testing/opennebula/opennebula.initd @@ -8,6 +8,8 @@ depend() { } start() { + checkconfig || return 1 + ebegin "Starting OpenNebula daemon" start-stop-daemon \ --start \ @@ -42,3 +44,17 @@ stop() { --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/testing/opennebula/opennebula.pre-install b/testing/opennebula/opennebula.pre-install index 41fb6d7686..a6d2834b64 100644 --- a/testing/opennebula/opennebula.pre-install +++ b/testing/opennebula/opennebula.pre-install @@ -1,6 +1,7 @@ #!/bin/sh addgroup -S oneadmin 2>/dev/null -adduser -S -s /bin/sh -D -H -h /usr/share/one -G oneadmin \ - -g "OpenNebula user" oneadmin +adduser -S -D -s /bin/bash \ + -H -h /var/lib/one -G oneadmin \ + -g "OpenNebula user" oneadmin 2>/dev/null exit 0 diff --git a/testing/opennebula/ssh.config b/testing/opennebula/ssh.config new file mode 100644 index 0000000000..9fa48e01c6 --- /dev/null +++ b/testing/opennebula/ssh.config @@ -0,0 +1,4 @@ +UserKnownHostsFile /dev/null +ConnectTimeout 5 +Host * + StrictHostKeyChecking no |