From 649ccc42c8237809040b61374145b40fed183aa3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Wed, 19 Oct 2016 00:08:51 +0200 Subject: [PATCH] NOW: reshuffle packaging --- NOW/debian/control | 25 ++++++++++++++----------- NOW/debian/now-apache.apache2 | 2 -- NOW/debian/now-apache.conf | 1 - NOW/debian/now-apache.postinst | 13 ------------- NOW/debian/now-site.conf | 14 ++++++++++++++ NOW/debian/now.apache2 | 2 ++ NOW/debian/now.conf | 15 +-------------- NOW/debian/{now-apache.dirs => now.dirs} | 0 NOW/debian/now.postinst | 10 ++++++++++ NOW/debian/now.prerm | 10 ++++++++++ NOW/debian/{docs => ruby-now.docs} | 0 NOW/debian/{now.install => ruby-now.install} | 0 NOW/debian/{preinst => ruby-now.preinst} | 0 NOW/debian/rules | 4 ++-- 14 files changed, 53 insertions(+), 43 deletions(-) delete mode 100644 NOW/debian/now-apache.apache2 delete mode 100644 NOW/debian/now-apache.conf delete mode 100644 NOW/debian/now-apache.postinst create mode 100644 NOW/debian/now-site.conf create mode 100644 NOW/debian/now.apache2 rename NOW/debian/{now-apache.dirs => now.dirs} (100%) create mode 100644 NOW/debian/now.postinst create mode 100644 NOW/debian/now.prerm rename NOW/debian/{docs => ruby-now.docs} (100%) rename NOW/debian/{now.install => ruby-now.install} (100%) rename NOW/debian/{preinst => ruby-now.preinst} (100%) diff --git a/NOW/debian/control b/NOW/debian/control index 07d12b5..6738ca5 100644 --- a/NOW/debian/control +++ b/NOW/debian/control @@ -2,7 +2,7 @@ Source: now Section: ruby Priority: optional Maintainer: František Dvořák -Build-Depends: debhelper (>= 7.0.50~), dh-apache2, gem2deb (>= 0.6.1~) +Build-Depends: debhelper (>= 7.0.50~), dh-apache2, apache2-dev, gem2deb (>= 0.6.1~) Standards-Version: 3.9.5 Homepage: https://github.com/CESNET/NOW #Vcs-Git: git://git.debian.org/collab-maint/now.git @@ -12,21 +12,24 @@ XS-Ruby-Versions: all Package: now Architecture: all -XB-Ruby-Versions: ${ruby:Versions} -Pre-Depends: ${misc:Pre-Depends}, adduser -Depends: ${misc:Depends}, libjs-jquery, ruby | ruby-interpreter, ruby-ipaddress, ruby-json, ruby-libopennebula, ruby-sinatra, ruby-sinatra-cross-origin -Suggests: now-apache +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ruby-now (>= ${source:Version}), libapache2-mod-passenger +Recommends: ${misc:Recommends}, apache2 | httpd Description: Network Orchestrator Wrapper for OpenNebula Network Orchestrator Wrapper is the component to extend OpenNebula network orchestration capabilities. + . + This package contains configuration files, setup scripts, and dependencies for + running NOW in Apache with passenger. -Package: now-apache +Package: ruby-now Architecture: all -Pre-Depends: ${misc:Pre-Depends} -Depends: ${misc:Depends}, now (>= ${source:Version}), apache2-mpm-worker, libapache2-mod-passenger -Description: Network Orchestrator Wrapper with configurations for Apache +XB-Ruby-Versions: ${ruby:Versions} +Pre-Depends: ${misc:Pre-Depends}, adduser +Depends: ${misc:Depends}, libjs-jquery, ruby | ruby-interpreter, ruby-ipaddress, ruby-json, ruby-libopennebula, ruby-sinatra, ruby-sinatra-cross-origin +Suggests: now +Description: Network Orchestrator Wrapper for OpenNebula Network Orchestrator Wrapper is the component to extend OpenNebula network orchestration capabilities. . - This package contains configuration files, setup scripts, and dependencies for - running NOW in Apache. + This package contains the core part of the NOW component. diff --git a/NOW/debian/now-apache.apache2 b/NOW/debian/now-apache.apache2 deleted file mode 100644 index 78bd8bc..0000000 --- a/NOW/debian/now-apache.apache2 +++ /dev/null @@ -1,2 +0,0 @@ -conf debian/now-apache.conf -site debian/now.conf diff --git a/NOW/debian/now-apache.conf b/NOW/debian/now-apache.conf deleted file mode 100644 index 551131d..0000000 --- a/NOW/debian/now-apache.conf +++ /dev/null @@ -1 +0,0 @@ -Listen localhost:11080 diff --git a/NOW/debian/now-apache.postinst b/NOW/debian/now-apache.postinst deleted file mode 100644 index 0b09272..0000000 --- a/NOW/debian/now-apache.postinst +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -set -e - -case "$1" in - configure|reconfigure) - if [ -e /etc/apache2/apache2.conf ]; then - a2enmod passenger >/dev/null || : - fi - ;; -esac - -#DEBHELPER# diff --git a/NOW/debian/now-site.conf b/NOW/debian/now-site.conf new file mode 100644 index 0000000..fe9ddb4 --- /dev/null +++ b/NOW/debian/now-site.conf @@ -0,0 +1,14 @@ + + LogLevel info + + DocumentRoot /usr/share/NOW/public + + #apache 2.2: Allow from all + Require all granted + Options -MultiViews + + + PassengerUser now + PassengerGroup now + PassengerMinInstances 3 + diff --git a/NOW/debian/now.apache2 b/NOW/debian/now.apache2 new file mode 100644 index 0000000..698ca0b --- /dev/null +++ b/NOW/debian/now.apache2 @@ -0,0 +1,2 @@ +conf debian/now.conf +site debian/now-site.conf diff --git a/NOW/debian/now.conf b/NOW/debian/now.conf index fe9ddb4..551131d 100644 --- a/NOW/debian/now.conf +++ b/NOW/debian/now.conf @@ -1,14 +1 @@ - - LogLevel info - - DocumentRoot /usr/share/NOW/public - - #apache 2.2: Allow from all - Require all granted - Options -MultiViews - - - PassengerUser now - PassengerGroup now - PassengerMinInstances 3 - +Listen localhost:11080 diff --git a/NOW/debian/now-apache.dirs b/NOW/debian/now.dirs similarity index 100% rename from NOW/debian/now-apache.dirs rename to NOW/debian/now.dirs diff --git a/NOW/debian/now.postinst b/NOW/debian/now.postinst new file mode 100644 index 0000000..97edea6 --- /dev/null +++ b/NOW/debian/now.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then + . /usr/share/apache2/apache2-maintscript-helper + apache2_invoke enconf now.conf || exit $? + apache2_invoke ensite now-site.conf || exit $? +fi + +#DEBHELPER# diff --git a/NOW/debian/now.prerm b/NOW/debian/now.prerm new file mode 100644 index 0000000..fccfabf --- /dev/null +++ b/NOW/debian/now.prerm @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then + . /usr/share/apache2/apache2-maintscript-helper + apache2_invoke disconf now.conf || exit $? + apache2_invoke dissite now-site.conf || exit $? +fi + +#DEBHELPER# diff --git a/NOW/debian/docs b/NOW/debian/ruby-now.docs similarity index 100% rename from NOW/debian/docs rename to NOW/debian/ruby-now.docs diff --git a/NOW/debian/now.install b/NOW/debian/ruby-now.install similarity index 100% rename from NOW/debian/now.install rename to NOW/debian/ruby-now.install diff --git a/NOW/debian/preinst b/NOW/debian/ruby-now.preinst similarity index 100% rename from NOW/debian/preinst rename to NOW/debian/ruby-now.preinst diff --git a/NOW/debian/rules b/NOW/debian/rules index 8f36812..9e7ad76 100755 --- a/NOW/debian/rules +++ b/NOW/debian/rules @@ -11,8 +11,8 @@ override_dh_install: rdoc --op debian/tmp/rdoc/ models/ lib/ *.rb README* rm debian/tmp/rdoc/js/jquery.js ln -s /usr/share/javascript/jquery/jquery.js debian/tmp/rdoc/js/ - dh_apache2 -pnow-apache + dh_apache2 -pnow dh_install override_dh_installdocs: - dh_installdocs --link-doc=now + dh_installdocs --link-doc=ruby-now -- 1.8.2.3