From: František Dvořák Date: Sat, 8 Mar 2014 11:20:16 +0000 (+0100) Subject: rocci-server-apache subpackage for all-in-one installation and setup rOCCI server... X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=97967999dce9d5da38a1a823091718ad39c9d42e;p=rOCCI-packaging.git rocci-server-apache subpackage for all-in-one installation and setup rOCCI server under Apache. --- diff --git a/rocci-server/debian/README.Debian b/rocci-server/debian/README.Debian index 531be3a..fbdff8d 100644 --- a/rocci-server/debian/README.Debian +++ b/rocci-server/debian/README.Debian @@ -14,7 +14,7 @@ Locations: Automatically launched setup: -# rocci-server +# rocci-server-apache a2enmod ssl a2ensite occi-ssl service apache2 restart diff --git a/rocci-server/debian/control b/rocci-server/debian/control index 32ce335..f21a9f6 100644 --- a/rocci-server/debian/control +++ b/rocci-server/debian/control @@ -16,7 +16,7 @@ Pre-Depends: ${misc:Pre-Depends} Depends: bundler, git, memcached, ruby | ruby-interpreter ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends} -Recommends: libapache2-mod-passenger (>= 4.0.29), apache2-mpm-worker +Suggests: rocci-server-apache Description: Ruby OCCI Server OCCI (the Open Cloud Computing Interface) is a standard by the Open Grid Forum, specifying a protocol and API to perform various remote management tasks in @@ -24,6 +24,23 @@ Description: Ruby OCCI Server natively, with its own OCCI interface. It is based on the rOCCI (Ruby OCCI) Framework. +Package: rocci-server-apache +Architecture: all +Pre-Depends: ${misc:Pre-Depends} +Depends: + rocci-server (= ${binary:Version}), apache2-mpm-worker, + libapache2-mod-passenger (>= 4.0.29), + ${misc:Depends} +Description: Ruby OCCI Server for Apache + OCCI (the Open Cloud Computing Interface) is a standard by the Open Grid Forum, + specifying a protocol and API to perform various remote management tasks in + clouds. The rOCCI-server extends cloud managers, which are not OCCI-compliant + natively, with its own OCCI interface. It is based on the rOCCI (Ruby OCCI) + Framework. + . + This package contains configuration files, setup scripts, and dependencies for + running rOCCI server in Apache. + Package: rocci-server-dbg Architecture: any Pre-Depends: ${misc:Pre-Depends} diff --git a/rocci-server/debian/links b/rocci-server/debian/links deleted file mode 100644 index e0b9a01..0000000 --- a/rocci-server/debian/links +++ /dev/null @@ -1,2 +0,0 @@ -# no FHS support, just point /etc/rocci-server to proper place -usr/lib/rocci-server/etc etc/rocci-server diff --git a/rocci-server/debian/rocci-server-apache.install b/rocci-server/debian/rocci-server-apache.install new file mode 100644 index 0000000..807238f --- /dev/null +++ b/rocci-server/debian/rocci-server-apache.install @@ -0,0 +1,2 @@ +debian/etc . +debian/occi-ssl etc/apache2/sites-available diff --git a/rocci-server/debian/postinst b/rocci-server/debian/rocci-server-apache.postinst similarity index 83% rename from rocci-server/debian/postinst rename to rocci-server/debian/rocci-server-apache.postinst index ee48710..17f6c20 100644 --- a/rocci-server/debian/postinst +++ b/rocci-server/debian/rocci-server-apache.postinst @@ -7,9 +7,6 @@ if [ "$1" != "configure" -a "$1" != "reconfigure" ]; then exit 0 fi -conf="/etc/apache2/sites-available/occi-ssl" -econf="/etc/apache2/sites-enabled/occi-ssl" -hname=`hostname -f` || hname="" reload_apache() @@ -22,11 +19,10 @@ reload_apache() } -# logs -chown -R nobody:nogroup /usr/lib/rocci-server/log - # hostname in configuration -if [ -n "$hname" ]; then +conf="/etc/apache2/sites-available/occi-ssl" +hname=`hostname -f` +if [ $? -eq 0 -a -n "$hname" ]; then sed -i \ -e "s,^\(\s*ServerName\s*\).*,\1$hname," \ -e "s,^\(\s*SetEnv\s*ROCCI_SERVER_HOSTNAME\s*\).*,\1$hname," \ @@ -37,7 +33,7 @@ fi if [ -n "$2" ]; then # we're upgrading. test if we're enabled, and if so, restart to reload the module. - if [ -e "$econf" ]; then + if [ -e /etc/apache2/sites-enabled/occi-ssl ]; then reload_apache fi exit 0 diff --git a/rocci-server/debian/prerm b/rocci-server/debian/rocci-server-apache.prerm similarity index 80% rename from rocci-server/debian/prerm rename to rocci-server/debian/rocci-server-apache.prerm index df1e3e8..0c9bd2d 100644 --- a/rocci-server/debian/prerm +++ b/rocci-server/debian/rocci-server-apache.prerm @@ -8,7 +8,7 @@ if [ "$1" != "remove" -a "$1" != "purge" ]; then fi if [ -e /etc/apache2/apache2.conf ]; then - a2dissite occi-ssl || : + a2dissite occi-ssl >/dev/null || : fi exit 0 diff --git a/rocci-server/debian/dirs b/rocci-server/debian/rocci-server.dirs similarity index 100% rename from rocci-server/debian/dirs rename to rocci-server/debian/rocci-server.dirs diff --git a/rocci-server/debian/install b/rocci-server/debian/rocci-server.install similarity index 88% rename from rocci-server/debian/install rename to rocci-server/debian/rocci-server.install index 7d4ace1..d447d57 100644 --- a/rocci-server/debian/install +++ b/rocci-server/debian/rocci-server.install @@ -19,7 +19,4 @@ Gemfile.lock usr/lib/rocci-server Guardfile usr/lib/rocci-server config.ru usr/lib/rocci-server -# prepare configuration -debian/occi-ssl etc/apache2/sites-available debian/occi-ssl usr/lib/doc/rocci-server/examples/etc/apache2/sites-available -debian/etc . diff --git a/rocci-server/debian/rocci-server.links b/rocci-server/debian/rocci-server.links new file mode 100644 index 0000000..0fa1d3c --- /dev/null +++ b/rocci-server/debian/rocci-server.links @@ -0,0 +1,3 @@ +# no FHS support, just point to proper places +usr/lib/rocci-server/etc etc/rocci-server +usr/lib/rocci-server/log var/log/rocci-server diff --git a/rocci-server/debian/rocci-server.postinst b/rocci-server/debian/rocci-server.postinst new file mode 100644 index 0000000..4f2dcef --- /dev/null +++ b/rocci-server/debian/rocci-server.postinst @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +if [ "$1" != "configure" -a "$1" != "reconfigure" ]; then + exit 0 +fi + +# logs +chown -R nobody:nogroup /usr/lib/rocci-server/log + +exit 0 diff --git a/rocci-server/debian/preinst b/rocci-server/debian/rocci-server.preinst similarity index 100% rename from rocci-server/debian/preinst rename to rocci-server/debian/rocci-server.preinst diff --git a/rocci-server/debian/rocci-server.prerm b/rocci-server/debian/rocci-server.prerm new file mode 100644 index 0000000..0c9bd2d --- /dev/null +++ b/rocci-server/debian/rocci-server.prerm @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +if [ "$1" != "remove" -a "$1" != "purge" ]; then + exit 0 +fi + +if [ -e /etc/apache2/apache2.conf ]; then + a2dissite occi-ssl >/dev/null || : +fi + +exit 0