[X2Go-Commits] x2gobroker.git - uccsoutput (branch) updated: 0.0.1.0-32-g3366ab1

X2Go dev team git-admin at x2go.org
Wed Apr 10 11:21:44 CEST 2013


The branch, uccsoutput has been updated
       via  3366ab187d971a0de2bf2f13d33c02e24ce77ed5 (commit)
       via  87e0d33ee82cbbc48ff738d5fa33a49a7b9f904f (commit)
       via  f5c77c7654c180c9f55f175b9dc2a611a4a26a1c (commit)
       via  12ace4ff77e043274948ada6f13ffedc5e561d26 (commit)
       via  d3a17b136b23755840e13547152011193c2febe9 (commit)
       via  cbe481e17814bf14404b4adc95fc6ae53efa52a1 (commit)
       via  5f08ed5c43d6c8c96515f5628d3a60cb0c386ab7 (commit)
       via  a505addd53fee98a0445278c838447b4b20e3d1b (commit)
       via  9ec668c96ad7a70e1024194c3f7eae7ea3e9e6ba (commit)
       via  b075080bcd2a1510f4ac820f752580000712e509 (commit)
       via  d76dcd7f32e82452e74e167ff9de4020403ecb84 (commit)
       via  b24fe4ed32dc3f3066f20b4f93f1df5bbbdaa778 (commit)
       via  b440438bdbdcdd248957f6e2e0cfe4deaab895b5 (commit)
       via  830502fcaa69733d4c5f6561d335a5f7032c4baa (commit)
       via  48ca859f6e7950c9f08d20ac7c79feff70a65b2e (commit)
       via  17d847151ef8803f9e973ddbe9e8b47c56d30623 (commit)
       via  3eece58572d42b888f3f922eac9ca7f64937a2da (commit)
       via  5a4f129a152362b5bfb133d39638274ed0c65f41 (commit)
      from  317325dd112ba89775ff81984ef985f061a81b21 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3366ab187d971a0de2bf2f13d33c02e24ce77ed5
Merge: 87e0d33 317325d
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Apr 10 11:20:39 2013 +0200

    Merge branch 'uccsoutput' of ssh://code.x2go.org:32032/~/git/./x2gobroker into uccsoutput
    
    Conflicts (resolved by Mike Gabriel):
    	debian/changelog

commit 87e0d33ee82cbbc48ff738d5fa33a49a7b9f904f
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Apr 7 12:01:15 2013 +0200

    add listsessions test for UCCS web frontend

commit f5c77c7654c180c9f55f175b9dc2a611a4a26a1c
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Apr 7 12:00:51 2013 +0200

    remove debug output

commit 12ace4ff77e043274948ada6f13ffedc5e561d26
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Apr 7 11:38:48 2013 +0200

    enable BR tests in test unit

commit d3a17b136b23755840e13547152011193c2febe9
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Apr 7 10:21:27 2013 +0200

    commit after more (successful) testing of UCCS compat code

commit cbe481e17814bf14404b4adc95fc6ae53efa52a1
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Apr 7 10:08:09 2013 +0200

    Fix wrong usage of session option »cmd«, has to be »command«.

commit 5f08ed5c43d6c8c96515f5628d3a60cb0c386ab7
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Apr 6 14:01:40 2013 +0200

    add test that checks profile completion from hard-coded defaults

commit a505addd53fee98a0445278c838447b4b20e3d1b
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Apr 6 13:39:43 2013 +0200

    Add cmd and directrdp session profile parameters to defaults.

commit 9ec668c96ad7a70e1024194c3f7eae7ea3e9e6ba
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Apr 6 13:37:33 2013 +0200

    sbin/x2gobroker: import UCCS web frontend

commit b075080bcd2a1510f4ac820f752580000712e509
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Apr 6 13:36:38 2013 +0200

    fix x2gobroker/web/uccs.py

commit d76dcd7f32e82452e74e167ff9de4020403ecb84
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Apr 6 13:26:27 2013 +0200

    new parameter in default profile

commit b24fe4ed32dc3f3066f20b4f93f1df5bbbdaa778
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Apr 6 13:03:58 2013 +0200

    move UCCS JSON classes into separate file

commit b440438bdbdcdd248957f6e2e0cfe4deaab895b5
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Apr 3 21:42:21 2013 +0000

    more work on UCCS compatible mode

commit 830502fcaa69733d4c5f6561d335a5f7032c4baa
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Apr 3 09:49:17 2013 +0200

    start development of the UCCS compatible output frontend

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                                   |    6 +-
 debian/control                                     |  104 ++++++++++----------
 debian/rules                                       |    8 +-
 debian/x2gobroker-agent.postrm                     |    8 +-
 debian/x2gobroker-daemon.postrm                    |    9 +-
 debian/x2gobroker-wsgi.install                     |    1 +
 debian/x2gobroker-wsgi.links                       |    1 +
 ...er-daemon.postinst => x2gobroker-wsgi.postinst} |    0
 ...broker-daemon.postrm => x2gobroker-wsgi.postrm} |    9 +-
 etc/x2gobroker-wsgi.apache.conf                    |   43 ++++++++
 sbin/x2gobroker                                    |   26 ++++-
 11 files changed, 147 insertions(+), 68 deletions(-)
 delete mode 100644 debian/x2gobroker-cgi.install
 create mode 100644 debian/x2gobroker-wsgi.install
 create mode 100644 debian/x2gobroker-wsgi.links
 copy debian/{x2gobroker-daemon.postinst => x2gobroker-wsgi.postinst} (100%)
 copy debian/{x2gobroker-daemon.postrm => x2gobroker-wsgi.postrm} (84%)
 create mode 100644 etc/x2gobroker-wsgi.apache.conf

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index be2985b..4936e35 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
 x2gobroker (0.0.1.1-0~x2go1) UNRELEASED; urgency=low
 
   * New upstream version (0.0.1.1):
-    - Add command and directrdp session profile parameters to defaults.
+    - Add WSGI support to X2Go Session Broker. Allows plugging into
+      Apache2 by using the mod_wsgi module.
+    - Add cmd and directrdp session profile parameters to defaults.
     - Fix wrong usage of session option »cmd«, has to be »command«.
+  * /debian/control:
+    + Fix --root parameter in DEB_PYTHON_INSTALL_ARGS.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Sun, 10 Mar 2013 13:00:32 +0100
 
diff --git a/debian/control b/debian/control
index eb7187c..45e0eae 100644
--- a/debian/control
+++ b/debian/control
@@ -1,5 +1,5 @@
 Source: x2gobroker
-Section: python
+Section: misc
 Priority: optional
 Maintainer: X2Go Developers <x2go-dev at lists.berlios.de>
 Uploaders:
@@ -13,14 +13,47 @@ Build-Depends:
  python-setuptools,
  python-nose,
  python-paste,
-Standards-Version: 3.9.3
-XS-Python-Version: >= 2.4
+Standards-Version: 3.9.4
 
-Package: x2gobroker
+Package: python-x2gobroker
+Section: python
 Architecture: all
 Depends:
+ ${python:Depends},
  ${misc:Depends},
+ python,
+ python-pampy,
+ python-netaddr,
+ python-tornado,
+ python-paramiko,
+Description: X2Go http(s) based session broker (Python modules)
+ X2Go is a server based computing environment with
+    - session resuming
+    - low bandwidth support
+    - LDAP support
+    - client side mass storage mounting support
+    - client side printing support
+    - audio support
+    - authentication by smartcard and USB stick
+ .
+ The session broker is a server tool for X2Go that
+ tells your X2Go Client application in a terminal
+ server cluster what servers and session types are
+ most appropriate for the user in front of the
+ X2Go terminal.
+ .
+ A session broker is most useful in load balanced
+ X2Go server farms.
+ .
+ This package contains common files needed by all X2Go session
+ brokers being package for this distribution.
+XS-Python-Version: >= 2.6
+
+Package: x2gobroker
+Architecture: all
+Depends:
  ${python:Depends},
+ ${misc:Depends},
  python,
  python-argparse,
  python-setproctitle,
@@ -52,13 +85,13 @@ Description: X2Go http(s) based session broker (executable)
 Package: x2gobroker-authservice
 Architecture: all
 Depends:
+ ${python:Depends},
+ ${misc:Depends},
  python,
  python-argparse,
  python-setproctitle,
- ${misc:Depends},
- ${python:Depends},
 Suggests:
- apache2 | httpd,
+ x2gobroker-daemon,
 Description: X2Go http(s) based session broker (PAM authentication service)
  X2Go is a server based computing environment with
     - session resuming
@@ -85,13 +118,10 @@ Package: x2gobroker-daemon
 Architecture: all
 Depends:
  ${misc:Depends},
- ${python:Depends},
  adduser,
  x2gobroker (>= ${source:Version}), x2gobroker (<< ${source:Version}.1~),
 Recommends:
  x2gobroker-authservice,
-Suggests:
- apache2 | httpd,
 Description: X2Go http(s) based session broker (daemon)
  X2Go is a server based computing environment with
     - session resuming
@@ -115,48 +145,17 @@ Description: X2Go http(s) based session broker (daemon)
  installs the X2Go Session Broker as standalone
  daemon.
 
-#Package: x2gobroker-cgi
-#Architecture: all
-#Depends:
-# ${misc:Depends},
-# ${python:Depends},
-#Suggests:
-# apache2 | httpd,
-#Description: X2Go http(s) based session broker (CGI)
-# X2Go is a server based computing environment with
-#    - session resuming
-#    - low bandwidth support
-#    - LDAP support
-#    - client side mass storage mounting support
-#    - client side printing support
-#    - audio support
-#    - authentication by smartcard and USB stick
-# .
-# The session broker is a server tool for X2Go that
-# tells your X2Go Client application in a terminal
-# server cluster what servers and session types are
-# most appropriate for the user in front of the
-# X2Go terminal.
-# .
-# A session broker is most useful in load balanced
-# X2Go server farms.
-# .
-# This package contains a configuration that installs
-# the X2Go Session Broker as a CGI script so it
-# can be run from within an existing httpd server.
-
-Package: python-x2gobroker
+Package: x2gobroker-wsgi
 Architecture: all
 Depends:
  ${misc:Depends},
  ${python:Depends},
- python-pampy,
- python-netaddr,
- python-tornado,
- python-paramiko,
+ python,
+ adduser,
+ python-wsgilog,
 Suggests:
- apache2 | httpd,
-Description: X2Go http(s) based session broker (Python modules)
+ apache2,
+Description: X2Go http(s) based session broker (CGI)
  X2Go is a server based computing environment with
     - session resuming
     - low bandwidth support
@@ -175,16 +174,21 @@ Description: X2Go http(s) based session broker (Python modules)
  A session broker is most useful in load balanced
  X2Go server farms.
  .
- This package contains common files needed by all X2Go session
- brokers being package for this distribution.
+ This package contains an Apache2 configuration that
+ installs the X2Go Session Broker as a WSGI application
+ into a running Apache2 httpd.
 
 Package: x2gobroker-agent
 Architecture: any
 Depends:
  ${shlibs:Depends},
+ ${python:Depends},
  ${misc:Depends},
- perl,
  python,
+ python-setproctitle,
+ python-argparse,
+ python-paramiko,
+ perl,
  adduser,
  x2goserver,
 Description: X2Go http(s) based session broker (common files)
diff --git a/debian/rules b/debian/rules
index 28be4dc..321f0cc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,12 +22,12 @@
 #export DEB_CFLAGS_MAINT_APPEND = -Wall
 #include /usr/share/dpkg/buildflags.mk
 
-DEB_PYTHON_SYSTEM = $(shell test -f /usr/bin/dh_python2 && echo "" || echo "pysupport")
-DEB_PYTHON_INSTALL_ARGS_ALL = --install-layout=deb --single-version-externally-managed
-
 include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/makefile.mk
+
+DEB_PYTHON_SYSTEM = $(shell test -f /usr/bin/dh_python2 && echo "" || echo "pysupport")
+DEB_PYTHON_INSTALL_ARGS_python-x2gobroker ?= --root=$(DEB_DESTDIR) --prefix=$(DEB_PYTHON_PREFIX_ARG) --no-compile -O0 --install-layout=deb
 include /usr/share/cdbs/1/class/python-distutils.mk
+include /usr/share/cdbs/1/class/makefile.mk
 
 # needed when building with pysupport (e.g. on Ubuntu lucid)
 common-binary-indep::
diff --git a/debian/x2gobroker-agent.postrm b/debian/x2gobroker-agent.postrm
index bc535ee..9b74861 100755
--- a/debian/x2gobroker-agent.postrm
+++ b/debian/x2gobroker-agent.postrm
@@ -18,11 +18,17 @@ set -e
 
 case "$1" in
 	purge)
+
 		if dpkg-statoverride --list /usr/lib/x2go/x2gobroker-agent 1>/dev/null; then
 			dpkg-statoverride --remove /usr/lib/x2go/x2gobroker-agent
 		fi
 
-		if [ ! -d /usr/share/doc/x2gobroker-daemon ]; then
+		if [ ! -d /usr/share/doc/x2gobroker-daemon ] && [ ! -d /usr/share/doc/x2gobroker-wsgi ]; then
+
+			if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
+				dpkg-statoverride --remove /var/log/x2gobroker
+			fi
+
 			# remove user/group x2gobroker from system (if not in use by x2gobroker-daemon
 			getent passwd x2gobroker 1>/dev/null && deluser x2gobroker
 			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
diff --git a/debian/x2gobroker-cgi.install b/debian/x2gobroker-cgi.install
deleted file mode 100644
index e69de29..0000000
diff --git a/debian/x2gobroker-daemon.postrm b/debian/x2gobroker-daemon.postrm
index 34a8687..a1e2845 100755
--- a/debian/x2gobroker-daemon.postrm
+++ b/debian/x2gobroker-daemon.postrm
@@ -19,11 +19,12 @@ set -e
 case "$1" in
 	purge)
 
-		if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
-			dpkg-statoverride --remove /var/log/x2gobroker
-		fi
+		if [ ! -d /usr/share/doc/x2gobroker-agent ] && [ ! -d /usr/share/doc/x2gobroker-wsgi ]; then
+
+			if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
+				dpkg-statoverride --remove /var/log/x2gobroker
+			fi
 
-		if [ ! -d /usr/share/doc/x2gobroker-agent ]; then
 			# remove user/group x2gobroker from system (only if not in use by x2gobroker-agent
 			getent passwd x2gobroker 1>/dev/null && deluser x2gobroker
 			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
diff --git a/debian/x2gobroker-wsgi.install b/debian/x2gobroker-wsgi.install
new file mode 100644
index 0000000..40b18c5
--- /dev/null
+++ b/debian/x2gobroker-wsgi.install
@@ -0,0 +1 @@
+etc/x2gobroker-wsgi.apache.conf /etc/x2go/
\ No newline at end of file
diff --git a/debian/x2gobroker-wsgi.links b/debian/x2gobroker-wsgi.links
new file mode 100644
index 0000000..99e592a
--- /dev/null
+++ b/debian/x2gobroker-wsgi.links
@@ -0,0 +1 @@
+/etc/x2go/x2gobroker-wsgi.apache.conf /etc/apache2/conf.d/x2gobroker-wsgi
\ No newline at end of file
diff --git a/debian/x2gobroker-daemon.postinst b/debian/x2gobroker-wsgi.postinst
similarity index 100%
copy from debian/x2gobroker-daemon.postinst
copy to debian/x2gobroker-wsgi.postinst
diff --git a/debian/x2gobroker-daemon.postrm b/debian/x2gobroker-wsgi.postrm
similarity index 84%
copy from debian/x2gobroker-daemon.postrm
copy to debian/x2gobroker-wsgi.postrm
index 34a8687..006022f 100755
--- a/debian/x2gobroker-daemon.postrm
+++ b/debian/x2gobroker-wsgi.postrm
@@ -19,11 +19,12 @@ set -e
 case "$1" in
 	purge)
 
-		if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
-			dpkg-statoverride --remove /var/log/x2gobroker
-		fi
+		if [ ! -d /usr/share/doc/x2gobroker-agent ] && [ ! -d /usr/share/doc/x2gobroker-daemon ]; then
+
+			if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
+				dpkg-statoverride --remove /var/log/x2gobroker
+			fi
 
-		if [ ! -d /usr/share/doc/x2gobroker-agent ]; then
 			# remove user/group x2gobroker from system (only if not in use by x2gobroker-agent
 			getent passwd x2gobroker 1>/dev/null && deluser x2gobroker
 			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
diff --git a/etc/x2gobroker-wsgi.apache.conf b/etc/x2gobroker-wsgi.apache.conf
new file mode 100644
index 0000000..92c432f
--- /dev/null
+++ b/etc/x2gobroker-wsgi.apache.conf
@@ -0,0 +1,43 @@
+# enable debugging
+#SetEnv X2GOBROKER_DEBUG off
+
+# the default user/group that this WSGI application runs as
+#X2GOBROKER_DAEMON_USER=x2gobroker
+#X2GOBROKER_DAEMON_GROUP=x2gobroker
+WSGIDaemonProcess x2gobroker user=x2gobroker group=x2gobroker processes=5 threads=15
+
+# default broker backend (default: zeroconf)
+SetEnv X2GOBROKER_DEFAULT_BACKEND zeroconf
+#SetEnv X2GOBROKER_DEFAULT_BACKEND inifile
+#SetEnv X2GOBROKER_DEFAULT_BACKEND ldap
+#SetEnv X2GOBROKER_DEFAULT_BACKEND <some-other-broker-backend>
+
+# path to the X2Go Session Broker's configuration file
+#SetEnv X2GOBROKER_CONFIG /etc/x2go/x2gobroker.conf
+
+# path to the X2Go Session Broker's session profiles file (when using the inifile backend)
+#SetEnv X2GOBROKER_SESSIONPROFILES /etc/x2go/broker/x2gobroker-sessionprofiles.conf
+
+# path to the X2Go Session Broker's agent command
+#SetEnv X2GOBROKER_AGENT_CMD /usr/lib/x2go/x2gobroker-agent
+
+# authentication socket of the X2Go Broker's PAM Authentication Service
+#SetEnv X2GOBROKER_AUTHSOCKET /run/x2gobroker/x2gobroker-authservice.socket
+
+# if you have to-be-statically-served files somewhere below the broker URL
+#Alias /x2gobroker/static /some/static/path/
+
+WSGIScriptAlias /x2gobroker /usr/sbin/x2gobroker
+WSGIProcessGroup x2gobroker
+
+<Directory /usr/sbin/x2gobroker>
+    Order deny,allow
+    Deny from all
+
+    # grant explicit access below
+    Allow from localhost
+    Allow from localhost-ip6
+
+    Options +FollowSymLinks
+    Options -Indexes
+</Directory>
diff --git a/sbin/x2gobroker b/sbin/x2gobroker
index 894b3c0..5abd86d 100755
--- a/sbin/x2gobroker
+++ b/sbin/x2gobroker
@@ -27,9 +27,6 @@ import argparse
 import socket
 import logging
 import thread
-import tornado.web
-import tornado.httpserver
-import tornado.ioloop
 
 try:
     import x2gobroker.defaults
@@ -126,10 +123,13 @@ urls = ( ('/plain/(.*)', x2gobroker.web.plain.X2GoBrokerWeb,),
 settings = {
     'log_function': tornado_log_request,
 }
-application = tornado.web.Application(urls, **settings)
 
 # run the web.py standalone daemon...
 if __name__ == "__main__":
+    import tornado.web
+    import tornado.httpserver
+    import tornado.ioloop
+    application = tornado.web.Application(urls, **settings)
     try:
         if x2gobroker.defaults.X2GOBROKER_SSL_CERTFILE and x2gobroker.defaults.X2GOBROKER_SSL_KEYFILE:
             # switch on https:// mode
@@ -146,3 +146,21 @@ if __name__ == "__main__":
         tornado.ioloop.IOLoop.instance().start()
     except socket.error, e:
         print (e)
+else:
+    import tornado.wsgi
+    import wsgilog
+    _tornado_application = tornado.wsgi.WSGIApplication(urls, **settings)
+
+    def _application(environ, start_response):
+
+        # some WSGI implementations do not like the SCRIPT_NAME env var
+        if 'SCRIPT_NAME' in environ:
+            del environ['SCRIPT_NAME']
+
+        # make sure the httpd server's environment is set as os.environ
+        os.environ = environ
+        reload(x2gobroker.defaults)
+
+        return _tornado_application(environ, start_response)
+
+    application = wsgilog.WsgiLog(_application, tohtml=True, tofile=True, tostream=False, toprint=False, file='/var/log/x2gobroker/wsgi.log', )


hooks/post-receive
-- 
x2gobroker.git (HTTP(S) Session broker for X2Go)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).




More information about the x2go-commits mailing list