3 commits - client/rhel
by Jan Pazdziora
client/rhel/rhn-client-tools/man/en/rhnreg_ks.8 | 11 ++---------
client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py | 13 -------------
2 files changed, 2 insertions(+), 22 deletions(-)
New commits:
commit 1720a11c18fb3b8f9ce9549854ce6dfa6f9b66b8
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 25 16:28:20 2010 +0100
Since we do not call rhnreg.registerUser anymore, the --email option is no longer applicable.
diff --git a/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8 b/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
index c429335..1d6ef91 100644
--- a/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
+++ b/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
@@ -44,10 +44,6 @@ can be an existing Red Hat Network username, or a new username.
The password associated with the username specified with the \fB--username\fR
option. This is an unencrypted password.
.br
-.IP "\fB--email\fP"
-The email address associated with the username specified with the \fB--username\fR
-option.
-.br
.IP "\fB--activationkey\fP"
Specify/use a serial number to associate with the system. This is
optional, but activation keys can really simplify the registration
@@ -112,7 +108,7 @@ Register a new system to Red Hat Network:
.RS
.nf
-rhnreg_ks --profilename "example_profile_name" --username "someexampleuser" --email "someexampleuser(a)example.com" --password "foobar"
+rhnreg_ks --profilename "example_profile_name" --username "someexampleuser" --password "foobar"
.fi
.RE
@@ -120,7 +116,7 @@ Register a new system to Red Hat Network with contact info:
.RS
.nf
-rhnreg_ks --profilename "example_profile_name" --username "someexampleuser" --email "someexampleuser(a)example.com" --password "foobar" --contactinfo < contactinfo
+rhnreg_ks --profilename "example_profile_name" --username "someexampleuser" --password "foobar" --contactinfo < contactinfo
where the file "contactinfo" contains data in the format:
diff --git a/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py b/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
index fb43a18..fd168a0 100755
--- a/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
+++ b/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
@@ -46,8 +46,6 @@ class RegisterKsCli(rhncli.RhnCli):
help=_("Specify a username")),
self.optparser.add_option("--password", action="store",
help=_("Specify a password")),
- self.optparser.add_option("--email", action="store",
- help=_("Specify an email address")),
self.optparser.add_option("--systemorgid", action="store",
help=_("Specify an organizational id for this system")),
self.optparser.add_option("--serverUrl", action="store",
commit b27c6ad4b90a6c4c3f970fc0f8faefae7c134c9c
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 25 16:26:53 2010 +0100
No need to rhnreg.reserveUser nor rhnreg.registerUser -- the authentication is handled by subsequent calls anyway.
diff --git a/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py b/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
index 1383023..fb43a18 100755
--- a/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
+++ b/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
@@ -89,13 +89,6 @@ class RegisterKsCli(rhncli.RhnCli):
rhnreg.getCaps()
- if not self.options.activationkey:
- # reserve the username
- ret = rhnreg.reserveUser(self.options.username,
- self.options.password)
- rhnreg.registerUser(self.options.username, self.options.password,
- self.options.email)
-
if not self.options.nopackages:
getArch = 0
if rhnreg.cfg['supportsExtendedPackageProfile']:
commit 164b10843f80814ef621a69dcd74a33295888e21
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Feb 12 13:40:15 2010 +0100
Removing the --subscription option from rhnreg_ks.
diff --git a/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8 b/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
index f3aa319..c429335 100644
--- a/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
+++ b/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
@@ -54,9 +54,6 @@ optional, but activation keys can really simplify the registration
process. Learn more about activation keys in the online RHN
documentation.
.br
-.IP "\fB--subscription\fP"
-Specify a subscription number to register the system with.
-.br
.IP "\fB--contactinfo\fP"
This option has been deprecated. Please login to the server
web user interface and update your contactinfo.
diff --git a/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py b/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
index 0e62135..1383023 100755
--- a/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
+++ b/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
@@ -56,8 +56,6 @@ class RegisterKsCli(rhncli.RhnCli):
help=_("Specify a file to use as the ssl CA cert")),
self.optparser.add_option("--activationkey", action="store",
help=_("Specify an activation key")),
- self.optparser.add_option("--subscription", action="store",
- help=_("Specify a installation number to use")),
self.optparser.add_option("--use-eus-channel", action="store_true",
help=_("Subscribe this system to the EUS channel tied to the system's redhat-release")),
self.optparser.add_option("--contactinfo", action="store_true",
@@ -115,8 +113,6 @@ class RegisterKsCli(rhncli.RhnCli):
profilename = RegisterKsCli.__generateProfileName(hardwareList)
other = {}
- if self.options.subscription:
- other['registrationNumber'] = self.options.subscription
if self.options.systemorgid:
other['org_id'] = self.options.systemorgid
14 years, 2 months
Changes to 'refs/tags/spacewalk-backend-0.9.14-1'
by Michael Mraka
Tag 'spacewalk-backend-0.9.14-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-03-26 08:39 +0000
Tagging package [spacewalk-backend] version [0.9.14-1] in directory [backend/].
Changes since spacewalk-web-0.9.6-1:
Michael Mraka (2):
fixed spacewalk-backend packaging
Automatic commit of package [spacewalk-backend] release [0.9.14-1].
---
backend/spacewalk-backend.spec | 5 ++++-
backend/wsgi/Makefile | 2 +-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
---
14 years, 2 months
2 commits - backend/spacewalk-backend.spec backend/wsgi rel-eng/packages
by Michael Mraka
backend/spacewalk-backend.spec | 5 ++++-
backend/wsgi/Makefile | 2 +-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit fc2dbdc2859efc95032d748b1e1d16d7a82c1062
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Mar 26 09:39:40 2010 +0100
Automatic commit of package [spacewalk-backend] release [0.9.14-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 1d57c19..070fb7a 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.9.13
+Version: 0.9.14
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -626,6 +626,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Fri Mar 26 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.14-1
+- fixed spacewalk-backend packaging
+
* Thu Mar 25 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.13-1
- moved mod_wsgi stuff from spacewalk-backend-server to spacewalk-backend
- added tomcat6 to satelite-debug
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 672c737..2d2541a 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.9.13-1 backend/
+0.9.14-1 backend/
commit 955f2509267e3854f5b0ed39f48f899337afd70b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Mar 26 09:37:50 2010 +0100
fixed spacewalk-backend packaging
diff --git a/backend/wsgi/Makefile b/backend/wsgi/Makefile
index 40152a9..df64253 100644
--- a/backend/wsgi/Makefile
+++ b/backend/wsgi/Makefile
@@ -1,6 +1,6 @@
# Makefile for the wsgi module
-TOP = ../..
+TOP = ..
SUBDIR = wsgi
14 years, 2 months
Changes to 'refs/tags/spacewalk-web-0.9.6-1'
by Justin Sherrill
Tag 'spacewalk-web-0.9.6-1' created by Justin Sherrill <jsherril(a)redhat.com> at 2010-03-25 18:26 +0000
Tagging package [spacewalk-web] version [0.9.6-1] in directory [web/].
Changes since spacewalk-backend-0.9.13-1:
Justin Sherrill (2):
528170 - fixing issue where cloning a channel with cloned errata would select clones of the cloned errata to pull into the new channel if they existed, instead of just using the original clones directly.
Automatic commit of package [spacewalk-web] release [0.9.6-1].
---
rel-eng/packages/spacewalk-web | 2 +-
web/modules/rhn/RHN/DB/ChannelEditor.pm | 2 +-
web/spacewalk-web.spec | 7 ++++++-
3 files changed, 8 insertions(+), 3 deletions(-)
---
14 years, 2 months
Changes to 'refs/tags/spacewalk-java-0.9.12-1'
by Justin Sherrill
Tag 'spacewalk-java-0.9.12-1' created by Justin Sherrill <jsherril(a)redhat.com> at 2010-03-23 20:32 +0000
Tagging package [spacewalk-java] version [0.9.12-1] in directory [java/].
Changes since rhn-client-tools-0.9.6-1:
Justin Sherrill (3):
updating README
Automatic commit of package [spacewalk-java] release [0.9.11-1].
Automatic commit of package [spacewalk-java] release [0.9.12-1].
Miroslav Suchý (3):
group test on subsystem together, to create more readable code
remove dead code
do not use reserved word type
---
client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py | 28 ++++------
java/README | 2
java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java | 5 -
java/spacewalk-java.spec | 6 +-
rel-eng/packages/spacewalk-java | 2
5 files changed, 22 insertions(+), 21 deletions(-)
---
14 years, 2 months
rel-eng/packages web/spacewalk-web.spec
by Justin Sherrill
rel-eng/packages/spacewalk-web | 2 +-
web/spacewalk-web.spec | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit bdc6bd9f5747b620b7471446379991c367d7820b
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Mar 25 14:26:45 2010 -0400
Automatic commit of package [spacewalk-web] release [0.9.6-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 5297f4c..a7376c4 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-0.9.5-1 web/
+0.9.6-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 2c274c6..e763e88 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -2,7 +2,7 @@ Name: spacewalk-web
Summary: Spacewalk Web site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.9.5
+Version: 0.9.6
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -256,6 +256,11 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Thu Mar 25 2010 Justin Sherrill <jsherril(a)redhat.com> 0.9.6-1
+- 528170 - fixing issue where cloning a channel with cloned errata would select
+ clones of the cloned errata to pull into the new channel if they existed,
+ instead of just using the original clones directly. (jsherril(a)redhat.com)
+
* Thu Mar 18 2010 Jan Pazdziora 0.9.5-1
- 568958 - fixing issue where package removal and verify could not be scheduled
or would not work for systems that do not upload arch information
14 years, 2 months
web/modules
by Justin Sherrill
web/modules/rhn/RHN/DB/ChannelEditor.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 76c72bd7d9f0fe8262d49c2a7b9bb0b2ff27c1f8
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Mar 25 14:21:17 2010 -0400
528170 - fixing issue where cloning a channel with cloned errata would select clones of the cloned errata to pull into the new channel if they existed, instead of just using the original clones directly.
diff --git a/web/modules/rhn/RHN/DB/ChannelEditor.pm b/web/modules/rhn/RHN/DB/ChannelEditor.pm
index 34ac73d..a7db934 100644
--- a/web/modules/rhn/RHN/DB/ChannelEditor.pm
+++ b/web/modules/rhn/RHN/DB/ChannelEditor.pm
@@ -414,7 +414,7 @@ sub errata_migration_provider {
sort { ( ($tcache{$b->{CREATED}} ||= str2time($b->{CREATED})) # order by timestamp, cached, newest
<=> # first, so the oldest cloned errata
($tcache{$a->{CREATED}} ||= str2time($a->{CREATED})) ) # is the one used. If two errata share
- || ( $a->{ADVISORY_NAME} cmp $b->{ADVISORY_NAME} ) } # a timestamp, order alphabetically
+ || ( $a->{ID} cmp $b->{ID} ) } # a timestamp, order by id, to get the one created first
grep { exists $_->{RELATIONSHIP} and $_->{RELATIONSHIP} eq 'cloned_from' } # filter out non-cloned errata
(@{$published_owned_errata}, @{$unpublished_owned_errata});
14 years, 2 months
Changes to 'refs/tags/spacewalk-backend-0.9.13-1'
by Michael Mraka
Tag 'spacewalk-backend-0.9.13-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-03-25 15:59 +0000
Tagging package [spacewalk-backend] version [0.9.13-1] in directory [backend/].
Changes since rhn-client-tools-0.9.7-1:
Michael Mraka (2):
moved mod_wsgi stuff from spacewalk-backend-server to spacewalk-backend
Automatic commit of package [spacewalk-backend] release [0.9.13-1].
---
backend/Makefile.backend | 2
backend/apache-conf/zz-spacewalk-server-wsgi.conf | 20 +-
backend/server/Makefile | 2
backend/server/wsgi/Makefile | 10 -
backend/server/wsgi/__init__.py | 16 --
backend/server/wsgi/app.py | 20 --
backend/server/wsgi/applet.py | 20 --
backend/server/wsgi/config.py | 20 --
backend/server/wsgi/config_tool.py | 20 --
backend/server/wsgi/package_push.py | 20 --
backend/server/wsgi/package_upload.py | 20 --
backend/server/wsgi/sat.py | 21 ---
backend/server/wsgi/sat_dump.py | 20 --
backend/server/wsgi/wsgiHandler.py | 78 -----------
backend/server/wsgi/wsgiRequest.py | 150 ----------------------
backend/server/wsgi/xmlrpc.py | 22 ---
backend/server/wsgi/xp.py | 21 ---
backend/spacewalk-backend.spec | 39 +++--
backend/wsgi/Makefile | 10 +
backend/wsgi/__init__.py | 16 ++
backend/wsgi/app.py | 20 ++
backend/wsgi/applet.py | 20 ++
backend/wsgi/config.py | 20 ++
backend/wsgi/config_tool.py | 20 ++
backend/wsgi/package_push.py | 20 ++
backend/wsgi/package_upload.py | 20 ++
backend/wsgi/sat.py | 21 +++
backend/wsgi/sat_dump.py | 20 ++
backend/wsgi/wsgiHandler.py | 78 +++++++++++
backend/wsgi/wsgiRequest.py | 150 ++++++++++++++++++++++
backend/wsgi/xmlrpc.py | 22 +++
backend/wsgi/xp.py | 21 +++
rel-eng/packages/spacewalk-backend | 2
33 files changed, 494 insertions(+), 487 deletions(-)
---
14 years, 2 months
backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/spacewalk-backend.spec | 6 +++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 88ddb061795c53631d138b252f6f7b63b6227be8
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Mar 25 16:59:02 2010 +0100
Automatic commit of package [spacewalk-backend] release [0.9.13-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 44b1de2..1d57c19 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.9.12
+Version: 0.9.13
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -626,6 +626,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Thu Mar 25 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.13-1
+- moved mod_wsgi stuff from spacewalk-backend-server to spacewalk-backend
+- added tomcat6 to satelite-debug
+
* Mon Mar 22 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.12-1
- 571413 - fixed source rpackage push
- fixing wsgi error handling
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index aa4e063..672c737 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.9.12-1 backend/
+0.9.13-1 backend/
14 years, 2 months
backend/apache-conf backend/Makefile.backend backend/server backend/spacewalk-backend.spec backend/wsgi
by Michael Mraka
backend/Makefile.backend | 2
backend/apache-conf/zz-spacewalk-server-wsgi.conf | 20 +-
backend/server/Makefile | 2
backend/server/wsgi/Makefile | 10 -
backend/server/wsgi/__init__.py | 16 --
backend/server/wsgi/app.py | 20 --
backend/server/wsgi/applet.py | 20 --
backend/server/wsgi/config.py | 20 --
backend/server/wsgi/config_tool.py | 20 --
backend/server/wsgi/package_push.py | 20 --
backend/server/wsgi/package_upload.py | 20 --
backend/server/wsgi/sat.py | 21 ---
backend/server/wsgi/sat_dump.py | 20 --
backend/server/wsgi/wsgiHandler.py | 78 -----------
backend/server/wsgi/wsgiRequest.py | 150 ----------------------
backend/server/wsgi/xmlrpc.py | 22 ---
backend/server/wsgi/xp.py | 21 ---
backend/spacewalk-backend.spec | 33 ++--
backend/wsgi/Makefile | 10 +
backend/wsgi/__init__.py | 16 ++
backend/wsgi/app.py | 20 ++
backend/wsgi/applet.py | 20 ++
backend/wsgi/config.py | 20 ++
backend/wsgi/config_tool.py | 20 ++
backend/wsgi/package_push.py | 20 ++
backend/wsgi/package_upload.py | 20 ++
backend/wsgi/sat.py | 21 +++
backend/wsgi/sat_dump.py | 20 ++
backend/wsgi/wsgiHandler.py | 78 +++++++++++
backend/wsgi/wsgiRequest.py | 150 ++++++++++++++++++++++
backend/wsgi/xmlrpc.py | 22 +++
backend/wsgi/xp.py | 21 +++
32 files changed, 488 insertions(+), 485 deletions(-)
New commits:
commit 7e6b23d882efc18bd3b7d2914cd0d5dbdeacbd61
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Mar 25 16:54:59 2010 +0100
moved mod_wsgi stuff from spacewalk-backend-server to spacewalk-backend
in order to be able to reuse it in proxy
diff --git a/backend/Makefile.backend b/backend/Makefile.backend
index 378723e..e2393fa 100644
--- a/backend/Makefile.backend
+++ b/backend/Makefile.backend
@@ -2,7 +2,7 @@
#
# $Id$
-CODE_DIRS = common server upload_server satellite_tools satellite_exporter po
+CODE_DIRS = common server upload_server satellite_tools satellite_exporter po wsgi
CONF_DIRS = apache-conf httpd-conf rhn-conf logrotate
# We look for config files in "well known" locations (rhn-conf,
diff --git a/backend/apache-conf/zz-spacewalk-server-wsgi.conf b/backend/apache-conf/zz-spacewalk-server-wsgi.conf
index 5119cf9..233af0f 100644
--- a/backend/apache-conf/zz-spacewalk-server-wsgi.conf
+++ b/backend/apache-conf/zz-spacewalk-server-wsgi.conf
@@ -4,14 +4,14 @@
WSGIPythonPath "/usr/share/rhn"
-WSGIScriptAlias /APP /usr/share/rhn/server/wsgi/app.py
-WSGIScriptAlias /APPLET /usr/share/rhn/server/wsgi/applet.py
-WSGIScriptAlias /CONFIG-MANAGEMENT /usr/share/rhn/server/wsgi/config.py
-WSGIScriptAlias /CONFIG-MANAGEMENT-TOOL /usr/share/rhn/server/wsgi/config_tool.py
-WSGIScriptAlias /PACKAGE-PUSH /usr/share/rhn/server/wsgi/package_push.py
-WSGIScriptAlias /PKG-UPLOAD /usr/share/rhn/server/wsgi/package_upload.py
-WSGIScriptAlias /SAT /usr/share/rhn/server/wsgi/sat.py
-WSGIScriptAlias /SAT-DUMP-INTERNAL /usr/share/rhn/server/wsgi/sat_dump.py
-WSGIScriptAlias /XMLRPC /usr/share/rhn/server/wsgi/xmlrpc.py
-WSGIScriptAlias /XP /usr/share/rhn/server/wsgi/xp.py
+WSGIScriptAlias /APP /usr/share/rhn/wsgi/app.py
+WSGIScriptAlias /APPLET /usr/share/rhn/wsgi/applet.py
+WSGIScriptAlias /CONFIG-MANAGEMENT /usr/share/rhn/wsgi/config.py
+WSGIScriptAlias /CONFIG-MANAGEMENT-TOOL /usr/share/rhn/wsgi/config_tool.py
+WSGIScriptAlias /PACKAGE-PUSH /usr/share/rhn/wsgi/package_push.py
+WSGIScriptAlias /PKG-UPLOAD /usr/share/rhn/wsgi/package_upload.py
+WSGIScriptAlias /SAT /usr/share/rhn/wsgi/sat.py
+WSGIScriptAlias /SAT-DUMP-INTERNAL /usr/share/rhn/wsgi/sat_dump.py
+WSGIScriptAlias /XMLRPC /usr/share/rhn/wsgi/xmlrpc.py
+WSGIScriptAlias /XP /usr/share/rhn/wsgi/xp.py
diff --git a/backend/server/Makefile b/backend/server/Makefile
index 75166dd..1f91e5f 100644
--- a/backend/server/Makefile
+++ b/backend/server/Makefile
@@ -21,6 +21,6 @@ FILES = __init__ \
rhnSession rhnUser rhnVirtualization taskomatic
SUBDIRS = rhnSQL rhnServer action \
handlers importlib action_extra_data \
- config_common repomd wsgi
+ config_common repomd
include $(TOP)/Makefile.defs
diff --git a/backend/server/wsgi/Makefile b/backend/server/wsgi/Makefile
deleted file mode 100644
index b458c7c..0000000
--- a/backend/server/wsgi/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# Makefile for the wsgi module
-
-TOP = ../..
-
-SUBDIR = server/wsgi
-
-FILES = __init__ app applet config config_tool package_push package_upload \
- sat sat_dump wsgiHandler wsgiRequest xmlrpc xp
-
-include $(TOP)/Makefile.defs
diff --git a/backend/server/wsgi/__init__.py b/backend/server/wsgi/__init__.py
deleted file mode 100644
index d7305c3..0000000
--- a/backend/server/wsgi/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
diff --git a/backend/server/wsgi/app.py b/backend/server/wsgi/app.py
deleted file mode 100644
index b66c5cf..0000000
--- a/backend/server/wsgi/app.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-from server.wsgi import wsgiHandler
-
-def application(environ, start_response):
- return wsgiHandler.handle(environ, start_response, "app","server.app")
diff --git a/backend/server/wsgi/applet.py b/backend/server/wsgi/applet.py
deleted file mode 100644
index 2f31885..0000000
--- a/backend/server/wsgi/applet.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-from server.wsgi import wsgiHandler
-
-def application(environ, start_response):
- return wsgiHandler.handle(environ, start_response, "applet","server.applet")
diff --git a/backend/server/wsgi/config.py b/backend/server/wsgi/config.py
deleted file mode 100644
index 3049ac2..0000000
--- a/backend/server/wsgi/config.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-from server.wsgi import wsgiHandler
-
-def application(environ, start_response):
- return wsgiHandler.handle(environ, start_response, "config","server.config-management")
diff --git a/backend/server/wsgi/config_tool.py b/backend/server/wsgi/config_tool.py
deleted file mode 100644
index 4089cc8..0000000
--- a/backend/server/wsgi/config_tool.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-from server.wsgi import wsgiHandler
-
-def application(environ, start_response):
- return wsgiHandler.handle(environ, start_response, "config_mgmt","server.config-management-tool")
diff --git a/backend/server/wsgi/package_push.py b/backend/server/wsgi/package_push.py
deleted file mode 100644
index afc029b..0000000
--- a/backend/server/wsgi/package_push.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-from server.wsgi import wsgiHandler
-
-def application(environ, start_response):
- return wsgiHandler.handle(environ, start_response, "package_push","server.upload.package-push", type="upload")
diff --git a/backend/server/wsgi/package_upload.py b/backend/server/wsgi/package_upload.py
deleted file mode 100644
index f8cbd51..0000000
--- a/backend/server/wsgi/package_upload.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-from server.wsgi import wsgiHandler
-
-def application(environ, start_response):
- return wsgiHandler.handle(environ, start_response, "package","server.upload.package", type="upload")
diff --git a/backend/server/wsgi/sat.py b/backend/server/wsgi/sat.py
deleted file mode 100644
index 82a48c4..0000000
--- a/backend/server/wsgi/sat.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-
-from server.wsgi import wsgiHandler
-
-def application(environ, start_response):
- return wsgiHandler.handle(environ, start_response, "sat","server.iss")
diff --git a/backend/server/wsgi/sat_dump.py b/backend/server/wsgi/sat_dump.py
deleted file mode 100644
index fb4b601..0000000
--- a/backend/server/wsgi/sat_dump.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-from server.wsgi import wsgiHandler
-
-def application(environ, start_response):
- return wsgiHandler.handle(environ, start_response, "non_auth_dumper", "server.satexport.internal", type='exporter')
diff --git a/backend/server/wsgi/wsgiHandler.py b/backend/server/wsgi/wsgiHandler.py
deleted file mode 100644
index 0c5bda2..0000000
--- a/backend/server/wsgi/wsgiHandler.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-
-from server.wsgi import wsgiRequest
-from server import apacheServer
-from server import apacheUploadServer
-from satellite_exporter import satexport
-
-from common import log_debug
-
-def handle(environ, start_response, server, component_type, type="normal"):
- #wsgi seems to capitalize incoming headers and add HTTP- to the front :/
- # so we strip out the first 5 letters, and transform it into what we want.
- replacements = {'_':'-', 'Rhn':'RHN', 'Md5Sum':'MD5sum', 'Xml':'XML'}
- for key in environ.keys():
- if key[:5] == "HTTP_":
- new_key = key[5:].title()
- for k,v in replacements.iteritems():
- new_key = new_key.replace(k,v)
- environ[new_key] = environ[key]
-
-
-
- req = wsgiRequest.WsgiRequest(environ, start_response)
- req.set_option("SERVER", server)
- req.set_option("RHNComponentType", component_type)
- req.set_option("RootDir", "/usr/share/rhn")
-
- parseServ = get_handle(type, "headerParserHandler", init=1)
- ret = parseServ(req)
-
- if len(req.output) > 0:
- if not req.sent_header:
- req.send_http_header(status=ret)
- return req.output
-
- appServ = get_handle(type, "handler")
- ret = appServ(req)
-
- if not ret:
- ret = None
-
- if not req.sent_header:
- req.send_http_header(status=ret)
-
- #exporter doesn't have a logHandler
- if type != 'exporter':
- logServ = get_handle(type, "logHandler")
- logServ(req)
- cleanServ = get_handle(type, "cleanupHandler")
- cleanServ(req)
-
- return req.output
-
-def get_handle(type, name, init=0):
- if type == 'upload':
- return apacheUploadServer.UploadHandlerWrap(name)
- #the sat export module doesn't provide a nice server module
- elif type == 'exporter':
- return getattr(satexport, name)
- else:
- return apacheServer.HandlerWrap(name, init=init)
-
-
diff --git a/backend/server/wsgi/wsgiRequest.py b/backend/server/wsgi/wsgiRequest.py
deleted file mode 100644
index e0106f9..0000000
--- a/backend/server/wsgi/wsgiRequest.py
+++ /dev/null
@@ -1,150 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-
-
-import socket
-from common import log_debug
-import httplib
-
-
-class WsgiRequest:
-
- def __init__(self, env, start_response):
- self.method = env['REQUEST_METHOD']
- self.headers_in = env
- self.path_info = env['PATH_INFO']
- self.start_response = start_response
- self.unparsed_uri = env['REQUEST_URI']
- self.server = WsgiServer(env['SERVER_NAME'], env['SERVER_PORT'])
- self.connection = WsgiConnection(env['REMOTE_ADDR'])
- self.options = {}
- self.main = 0
- self.proto_num = float(env['SERVER_PROTOCOL'].split('/')[1])
- self.headers_out = WsgiMPtable()
- self.sent_header = 0
- self.content_type = ""
- self.the_request = env['REQUEST_METHOD'] + " " + env['SCRIPT_NAME'] + " " + env['SERVER_PROTOCOL']
- self.output = []
- self.err_headers_out = WsgiMPtable()
- self.status = ""
- self.sent_bodyct = 0
- self.sent_header = 0
-
- def set_option(self, key, value):
- self.options[key] = value
-
- def get_options(self):
- return self.options
-
- def get_config(self):
- return "" #FIXME
-
- def write(self, str):
- self.output.append(str)
-
- def send_http_header(self, status=None):
- self.sent_header = 1
-
- if status is not None:
- self.status = str(status)
- if len(self.status) == 0 or self.status == None:
- self.status = "200"
- elif self.status.startswith("500"):
- for i in self.err_headers_out.items():
- self.headers_out.add(i[0], i[1])
-
- self.status = self.status + " " + httplib.responses[int(self.status)]
-
- if len(self.content_type) > 0:
- self.headers_out['Content-Type'] = self.content_type
- #default to text/xml
- if not self.headers_out.has_key('Content-Type'):
- self.headers_out['Content-Type'] = 'text/xml'
-
- self.start_response(self.status, self.headers_out.items())
- return
-
- def get_remote_host(self, rev=""):
- host = self.headers_in['REMOTE_ADDR']
- try:
- host = socket.gethostbyaddr(host)[0]
- except:
- pass
- return host
-
- def read(self, buffer=-1):
- return self.headers_in['wsgi.input'].read(buffer)
-
-
-class WsgiServer:
- def __init__(self, hostname, port):
- self.server_hostname = hostname
- self.port = int(port)
-
-class WsgiConnection:
- def __init__(self, remote_ip):
- self.remote_ip = remote_ip
-
-class WsgiMPtable:
- """ This class emulates mod_python's mp_table. See
- http://www.modpython.org/live/current/doc-html/pyapi-mptable.html
-
- The table object is a wrapper around the Apache APR table. The table
- object behaves very much like a dictionary (including the Python 2.2
- features such as support of the in operator, etc.), with the following
- differences:
-
- ...
- - Duplicate keys are allowed (see add() below). When there is more
- than one value for a key, a subscript operation returns a list.
-
- Much of the information that Apache uses is stored in tables.
- For example, req.headers_in and req.headers_out.
- """
- def __init__(self):
- self.dict = {}
-
- def add(self, key, value):
- if self.dict.has_key(key):
- self.dict[key].append(str(value))
- else:
- self.dict[key] = [str(value)]
-
- def __getitem__(self, key):
- if len(self.dict[key]) == 1:
- return self.dict[key][0]
- return self.dict[key]
-
- def __setitem__(self, key, value):
- self.dict[key] = [str(value)]
-
- def items(self):
- list = []
- for k,v in self.dict.items():
- for vi in v:
- list.append((k,vi))
- return list
-
- def has_key(self, key):
- return self.dict.has_key(key)
-
- def keys(self):
- return self.dict.keys()
-
- def __str__(self):
- return str(self.items())
-
diff --git a/backend/server/wsgi/xmlrpc.py b/backend/server/wsgi/xmlrpc.py
deleted file mode 100644
index de4fadd..0000000
--- a/backend/server/wsgi/xmlrpc.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-
-
-from server.wsgi import wsgiHandler
-
-def application(environ, start_response):
- return wsgiHandler.handle(environ, start_response, "xmlrpc", "server.xmlrpc")
diff --git a/backend/server/wsgi/xp.py b/backend/server/wsgi/xp.py
deleted file mode 100644
index f127690..0000000
--- a/backend/server/wsgi/xp.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Copyright (c) 2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-
-from server.wsgi import wsgiHandler
-
-def application(environ, start_response):
- return wsgiHandler.handle(environ, start_response, "xp","server.xp")
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 454a3d4..44b1de2 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -259,7 +259,7 @@ export PYTHON_MODULE_VERSION=%{version}
%if 0%{?rhel} && 0%{?rhel} < 6
rm -v $RPM_BUILD_ROOT/%{apacheconfd}/zz-spacewalk-server-wsgi.conf
-rm -rfv $RPM_BUILD_ROOT/%{rhnroot}/server/wsgi
+rm -rfv $RPM_BUILD_ROOT/%{rhnroot}/wsgi
%else
rm -v $RPM_BUILD_ROOT/%{apacheconfd}/zz-spacewalk-server-python.conf
%endif
@@ -324,6 +324,12 @@ rm -f %{rhnconf}/rhnSecret.py*
%attr(640,root,apache) %{rhnconf}/default/rhn.conf
%attr(755,root,root) %{_bindir}/spacewalk-cfg-get
%{_mandir}/man8/spacewalk-cfg-get.8.gz
+# wsgi stuff
+%if !( 0%{?rhel} && 0%{?rhel} < 6)
+%dir %{rhnroot}/wsgi
+%{rhnroot}/wsgi/wsgiHandler.py*
+%{rhnroot}/wsgi/wsgiRequest.py*
+%endif
%files sql
%defattr(-,root,root)
@@ -403,20 +409,17 @@ rm -f %{rhnconf}/rhnSecret.py*
%else
# wsgi stuff
%attr(640,root,apache) %config %{apacheconfd}/zz-spacewalk-server-wsgi.conf
-%dir %{rhnroot}/server/wsgi
-%{rhnroot}/server/wsgi/__init__.py*
-%{rhnroot}/server/wsgi/app.py*
-%{rhnroot}/server/wsgi/applet.py*
-%{rhnroot}/server/wsgi/config.py*
-%{rhnroot}/server/wsgi/config_tool.py*
-%{rhnroot}/server/wsgi/package_push.py*
-%{rhnroot}/server/wsgi/package_upload.py*
-%{rhnroot}/server/wsgi/sat.py*
-%{rhnroot}/server/wsgi/sat_dump.py*
-%{rhnroot}/server/wsgi/wsgiHandler.py*
-%{rhnroot}/server/wsgi/wsgiRequest.py*
-%{rhnroot}/server/wsgi/xmlrpc.py*
-%{rhnroot}/server/wsgi/xp.py*
+%{rhnroot}/wsgi/__init__.py*
+%{rhnroot}/wsgi/app.py*
+%{rhnroot}/wsgi/applet.py*
+%{rhnroot}/wsgi/config.py*
+%{rhnroot}/wsgi/config_tool.py*
+%{rhnroot}/wsgi/package_push.py*
+%{rhnroot}/wsgi/package_upload.py*
+%{rhnroot}/wsgi/sat.py*
+%{rhnroot}/wsgi/sat_dump.py*
+%{rhnroot}/wsgi/xmlrpc.py*
+%{rhnroot}/wsgi/xp.py*
%endif
# logs and other stuff
diff --git a/backend/wsgi/Makefile b/backend/wsgi/Makefile
new file mode 100644
index 0000000..40152a9
--- /dev/null
+++ b/backend/wsgi/Makefile
@@ -0,0 +1,10 @@
+# Makefile for the wsgi module
+
+TOP = ../..
+
+SUBDIR = wsgi
+
+FILES = __init__ app applet config config_tool package_push package_upload \
+ sat sat_dump wsgiHandler wsgiRequest xmlrpc xp
+
+include $(TOP)/Makefile.defs
diff --git a/backend/wsgi/__init__.py b/backend/wsgi/__init__.py
new file mode 100644
index 0000000..d7305c3
--- /dev/null
+++ b/backend/wsgi/__init__.py
@@ -0,0 +1,16 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
diff --git a/backend/wsgi/app.py b/backend/wsgi/app.py
new file mode 100644
index 0000000..fe81647
--- /dev/null
+++ b/backend/wsgi/app.py
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+from wsgi import wsgiHandler
+
+def application(environ, start_response):
+ return wsgiHandler.handle(environ, start_response, "app","server.app")
diff --git a/backend/wsgi/applet.py b/backend/wsgi/applet.py
new file mode 100644
index 0000000..4a834fa
--- /dev/null
+++ b/backend/wsgi/applet.py
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+from wsgi import wsgiHandler
+
+def application(environ, start_response):
+ return wsgiHandler.handle(environ, start_response, "applet","server.applet")
diff --git a/backend/wsgi/config.py b/backend/wsgi/config.py
new file mode 100644
index 0000000..9ccd965
--- /dev/null
+++ b/backend/wsgi/config.py
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+from wsgi import wsgiHandler
+
+def application(environ, start_response):
+ return wsgiHandler.handle(environ, start_response, "config","server.config-management")
diff --git a/backend/wsgi/config_tool.py b/backend/wsgi/config_tool.py
new file mode 100644
index 0000000..2e9bc72
--- /dev/null
+++ b/backend/wsgi/config_tool.py
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+from wsgi import wsgiHandler
+
+def application(environ, start_response):
+ return wsgiHandler.handle(environ, start_response, "config_mgmt","server.config-management-tool")
diff --git a/backend/wsgi/package_push.py b/backend/wsgi/package_push.py
new file mode 100644
index 0000000..ea8b435
--- /dev/null
+++ b/backend/wsgi/package_push.py
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+from wsgi import wsgiHandler
+
+def application(environ, start_response):
+ return wsgiHandler.handle(environ, start_response, "package_push","server.upload.package-push", type="upload")
diff --git a/backend/wsgi/package_upload.py b/backend/wsgi/package_upload.py
new file mode 100644
index 0000000..22c03c9
--- /dev/null
+++ b/backend/wsgi/package_upload.py
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+from wsgi import wsgiHandler
+
+def application(environ, start_response):
+ return wsgiHandler.handle(environ, start_response, "package","server.upload.package", type="upload")
diff --git a/backend/wsgi/sat.py b/backend/wsgi/sat.py
new file mode 100644
index 0000000..8a053b2
--- /dev/null
+++ b/backend/wsgi/sat.py
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+
+from wsgi import wsgiHandler
+
+def application(environ, start_response):
+ return wsgiHandler.handle(environ, start_response, "sat","server.iss")
diff --git a/backend/wsgi/sat_dump.py b/backend/wsgi/sat_dump.py
new file mode 100644
index 0000000..d2104aa
--- /dev/null
+++ b/backend/wsgi/sat_dump.py
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+from wsgi import wsgiHandler
+
+def application(environ, start_response):
+ return wsgiHandler.handle(environ, start_response, "non_auth_dumper", "server.satexport.internal", type='exporter')
diff --git a/backend/wsgi/wsgiHandler.py b/backend/wsgi/wsgiHandler.py
new file mode 100644
index 0000000..a3cd73a
--- /dev/null
+++ b/backend/wsgi/wsgiHandler.py
@@ -0,0 +1,78 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+
+from wsgi import wsgiRequest
+from server import apacheServer
+from server import apacheUploadServer
+from satellite_exporter import satexport
+
+from common import log_debug
+
+def handle(environ, start_response, server, component_type, type="normal"):
+ #wsgi seems to capitalize incoming headers and add HTTP- to the front :/
+ # so we strip out the first 5 letters, and transform it into what we want.
+ replacements = {'_':'-', 'Rhn':'RHN', 'Md5Sum':'MD5sum', 'Xml':'XML'}
+ for key in environ.keys():
+ if key[:5] == "HTTP_":
+ new_key = key[5:].title()
+ for k,v in replacements.iteritems():
+ new_key = new_key.replace(k,v)
+ environ[new_key] = environ[key]
+
+
+
+ req = wsgiRequest.WsgiRequest(environ, start_response)
+ req.set_option("SERVER", server)
+ req.set_option("RHNComponentType", component_type)
+ req.set_option("RootDir", "/usr/share/rhn")
+
+ parseServ = get_handle(type, "headerParserHandler", init=1)
+ ret = parseServ(req)
+
+ if len(req.output) > 0:
+ if not req.sent_header:
+ req.send_http_header(status=ret)
+ return req.output
+
+ appServ = get_handle(type, "handler")
+ ret = appServ(req)
+
+ if not ret:
+ ret = None
+
+ if not req.sent_header:
+ req.send_http_header(status=ret)
+
+ #exporter doesn't have a logHandler
+ if type != 'exporter':
+ logServ = get_handle(type, "logHandler")
+ logServ(req)
+ cleanServ = get_handle(type, "cleanupHandler")
+ cleanServ(req)
+
+ return req.output
+
+def get_handle(type, name, init=0):
+ if type == 'upload':
+ return apacheUploadServer.UploadHandlerWrap(name)
+ #the sat export module doesn't provide a nice server module
+ elif type == 'exporter':
+ return getattr(satexport, name)
+ else:
+ return apacheServer.HandlerWrap(name, init=init)
+
+
diff --git a/backend/wsgi/wsgiRequest.py b/backend/wsgi/wsgiRequest.py
new file mode 100644
index 0000000..e0106f9
--- /dev/null
+++ b/backend/wsgi/wsgiRequest.py
@@ -0,0 +1,150 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+
+
+import socket
+from common import log_debug
+import httplib
+
+
+class WsgiRequest:
+
+ def __init__(self, env, start_response):
+ self.method = env['REQUEST_METHOD']
+ self.headers_in = env
+ self.path_info = env['PATH_INFO']
+ self.start_response = start_response
+ self.unparsed_uri = env['REQUEST_URI']
+ self.server = WsgiServer(env['SERVER_NAME'], env['SERVER_PORT'])
+ self.connection = WsgiConnection(env['REMOTE_ADDR'])
+ self.options = {}
+ self.main = 0
+ self.proto_num = float(env['SERVER_PROTOCOL'].split('/')[1])
+ self.headers_out = WsgiMPtable()
+ self.sent_header = 0
+ self.content_type = ""
+ self.the_request = env['REQUEST_METHOD'] + " " + env['SCRIPT_NAME'] + " " + env['SERVER_PROTOCOL']
+ self.output = []
+ self.err_headers_out = WsgiMPtable()
+ self.status = ""
+ self.sent_bodyct = 0
+ self.sent_header = 0
+
+ def set_option(self, key, value):
+ self.options[key] = value
+
+ def get_options(self):
+ return self.options
+
+ def get_config(self):
+ return "" #FIXME
+
+ def write(self, str):
+ self.output.append(str)
+
+ def send_http_header(self, status=None):
+ self.sent_header = 1
+
+ if status is not None:
+ self.status = str(status)
+ if len(self.status) == 0 or self.status == None:
+ self.status = "200"
+ elif self.status.startswith("500"):
+ for i in self.err_headers_out.items():
+ self.headers_out.add(i[0], i[1])
+
+ self.status = self.status + " " + httplib.responses[int(self.status)]
+
+ if len(self.content_type) > 0:
+ self.headers_out['Content-Type'] = self.content_type
+ #default to text/xml
+ if not self.headers_out.has_key('Content-Type'):
+ self.headers_out['Content-Type'] = 'text/xml'
+
+ self.start_response(self.status, self.headers_out.items())
+ return
+
+ def get_remote_host(self, rev=""):
+ host = self.headers_in['REMOTE_ADDR']
+ try:
+ host = socket.gethostbyaddr(host)[0]
+ except:
+ pass
+ return host
+
+ def read(self, buffer=-1):
+ return self.headers_in['wsgi.input'].read(buffer)
+
+
+class WsgiServer:
+ def __init__(self, hostname, port):
+ self.server_hostname = hostname
+ self.port = int(port)
+
+class WsgiConnection:
+ def __init__(self, remote_ip):
+ self.remote_ip = remote_ip
+
+class WsgiMPtable:
+ """ This class emulates mod_python's mp_table. See
+ http://www.modpython.org/live/current/doc-html/pyapi-mptable.html
+
+ The table object is a wrapper around the Apache APR table. The table
+ object behaves very much like a dictionary (including the Python 2.2
+ features such as support of the in operator, etc.), with the following
+ differences:
+
+ ...
+ - Duplicate keys are allowed (see add() below). When there is more
+ than one value for a key, a subscript operation returns a list.
+
+ Much of the information that Apache uses is stored in tables.
+ For example, req.headers_in and req.headers_out.
+ """
+ def __init__(self):
+ self.dict = {}
+
+ def add(self, key, value):
+ if self.dict.has_key(key):
+ self.dict[key].append(str(value))
+ else:
+ self.dict[key] = [str(value)]
+
+ def __getitem__(self, key):
+ if len(self.dict[key]) == 1:
+ return self.dict[key][0]
+ return self.dict[key]
+
+ def __setitem__(self, key, value):
+ self.dict[key] = [str(value)]
+
+ def items(self):
+ list = []
+ for k,v in self.dict.items():
+ for vi in v:
+ list.append((k,vi))
+ return list
+
+ def has_key(self, key):
+ return self.dict.has_key(key)
+
+ def keys(self):
+ return self.dict.keys()
+
+ def __str__(self):
+ return str(self.items())
+
diff --git a/backend/wsgi/xmlrpc.py b/backend/wsgi/xmlrpc.py
new file mode 100644
index 0000000..bf05256
--- /dev/null
+++ b/backend/wsgi/xmlrpc.py
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+
+
+from wsgi import wsgiHandler
+
+def application(environ, start_response):
+ return wsgiHandler.handle(environ, start_response, "xmlrpc", "server.xmlrpc")
diff --git a/backend/wsgi/xp.py b/backend/wsgi/xp.py
new file mode 100644
index 0000000..fe44ad2
--- /dev/null
+++ b/backend/wsgi/xp.py
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+
+from wsgi import wsgiHandler
+
+def application(environ, start_response):
+ return wsgiHandler.handle(environ, start_response, "xp","server.xp")
14 years, 2 months