7 commits - backend/apache-conf backend/httpd-conf backend/logrotate backend/rhn-conf backend/server backend/spacewalk-backend.spec backend/wsgi client/tools proxy/proxy rel-eng/packages

Michael Mraka mmraka at fedoraproject.org
Fri Jun 22 10:03:47 UTC 2012


 backend/apache-conf/zz-spacewalk-server-wsgi.conf |    1 
 backend/httpd-conf/rhn/spacewalk-backend-xp.conf  |   24 -
 backend/logrotate/spacewalk-backend-xp            |   13 
 backend/rhn-conf/rhn_server_xp.conf               |    6 
 backend/server/handlers/Makefile                  |    3 
 backend/server/handlers/xp/Makefile               |   11 
 backend/server/handlers/xp/__init__.py            |   28 -
 backend/server/handlers/xp/packages.py            |   35 --
 backend/server/handlers/xp/rhnlint.py             |  352 ----------------------
 backend/spacewalk-backend.spec                    |   45 +-
 backend/wsgi/Makefile                             |    2 
 backend/wsgi/xp.py                                |   21 -
 client/tools/rhnpush/uploadLib.py                 |   18 -
 proxy/proxy/httpd-conf/spacewalk-proxy-wsgi.conf  |    1 
 proxy/proxy/pm/rhn_package_manager.sgml           |   14 
 rel-eng/packages/spacewalk-backend                |    2 
 16 files changed, 33 insertions(+), 543 deletions(-)

New commits:
commit 2d67bcc4f212e20a560f22b5ad77d68a202e50d8
Author: Michael Mraka <michael.mraka at redhat.com>
Date:   Fri Jun 22 12:03:30 2012 +0200

    Automatic commit of package [spacewalk-backend] release [1.8.38-1].

diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index f0259d1..05995d3 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -12,7 +12,7 @@ Name: spacewalk-backend
 Summary: Common programs needed to be installed on the Spacewalk servers/proxies
 Group: Applications/Internet
 License: GPLv2
-Version: 1.8.37
+Version: 1.8.38
 Release: 1%{?dist}
 URL:       https://fedorahosted.org/spacewalk
 Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -646,6 +646,12 @@ rm -f %{rhnconf}/rhnSecret.py*
 
 # $Id$
 %changelog
+* Fri Jun 22 2012 Michael Mraka <michael.mraka at redhat.com> 1.8.38-1
+- fixed usage of path macros
+- removed -xp subpackage
+- removed dead code for /XP handler
+- removed unused /XP handler
+
 * Fri Jun 22 2012 Michael Mraka <michael.mraka at redhat.com> 1.8.37-1
 - 811646 - handle locally exception in entitle_server()
 - don't pass the same parameter twice
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index a3a4b74..511d97a 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.8.37-1 backend/
+1.8.38-1 backend/


commit b1817f64f6ccbfd9585de60727687eacc92394a0
Author: Michael Mraka <michael.mraka at redhat.com>
Date:   Tue Jun 12 13:55:39 2012 +0200

    829724 - fixed man page for rhn-package-manager

diff --git a/proxy/proxy/pm/rhn_package_manager.sgml b/proxy/proxy/pm/rhn_package_manager.sgml
index 2ba0711..1e904ee 100644
--- a/proxy/proxy/pm/rhn_package_manager.sgml
+++ b/proxy/proxy/pm/rhn_package_manager.sgml
@@ -7,7 +7,7 @@
 
 <RefMeta>
 <RefEntryTitle>rhn_package_manager</RefEntryTitle><manvolnum>8</manvolnum>
-<RefMiscInfo>Version 4.0</RefMiscInfo>
+<RefMiscInfo>Version 5.0</RefMiscInfo>
 </RefMeta>
 
 <RefNameDiv>
@@ -163,6 +163,18 @@ Manages RPM packages for the RHN proxy
         </listitem>
     </varlistentry>
    <varlistentry>
+        <term>-N, --new-cache</term>
+        <listitem>
+            <para>create a new username/password cache</para>
+        </listitem>
+    </varlistentry>
+   <varlistentry>
+        <term>--no-cache</term>
+        <listitem>
+            <para>Do not create username/password cache</para>
+        </listitem>
+    </varlistentry>
+   <varlistentry>
         <term>--no-session-caching</term>
         <listitem>
             <para>This option disabled session token authentication. Useful if you want to push to two or more different servers.</para>


commit 07f6186ca464e6849113e3e724a299cd9ff537ec
Author: Michael Mraka <michael.mraka at redhat.com>
Date:   Tue Jun 12 13:26:14 2012 +0200

    fixed usage of path macros

diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 9fcd3f2..f0259d1 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -274,14 +274,14 @@ make -f Makefile.backend all
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/%{rhnroot}
-install -d $RPM_BUILD_ROOT/%{pythonrhnroot}
+install -d $RPM_BUILD_ROOT%{rhnroot}
+install -d $RPM_BUILD_ROOT%{pythonrhnroot}
 make -f Makefile.backend install PREFIX=$RPM_BUILD_ROOT \
     MANDIR=%{_mandir}
 export PYTHON_MODULE_NAME=%{name}
 export PYTHON_MODULE_VERSION=%{version}
 
-rm -v $RPM_BUILD_ROOT/%{apacheconfd}/zz-spacewalk-server-python.conf
+rm -v $RPM_BUILD_ROOT%{apacheconfd}/zz-spacewalk-server-python.conf
 
 %if 0%{?fedora} > 16
 rm -rf $RPM_BUILD_ROOT%{pythonrhnroot}/server/rhnSQL/driver_cx_Oracle.py*
@@ -293,11 +293,11 @@ rm -rf $RPM_BUILD_ROOT%{pythonrhnroot}/server/rhnSQL/driver_cx_Oracle.py*
 rm -rf $RPM_BUILD_ROOT
 
 %check
-make -f Makefile.backend PYTHONPATH=$RPM_BUILD_ROOT/%{python_sitelib} test || :
+make -f Makefile.backend PYTHONPATH=$RPM_BUILD_ROOT%{python_sitelib} test || :
 
 %if 0%{?fedora} > 15 || 0%{?rhel} > 5
 # check coding style
-export PYTHONPATH=$RPM_BUILD_ROOT/%{python_sitelib}:/usr/lib/rhn
+export PYTHONPATH=$RPM_BUILD_ROOT%{python_sitelib}:/usr/lib/rhn
 spacewalk-pylint $RPM_BUILD_ROOT%{pythonrhnroot}/common \
                  $RPM_BUILD_ROOT%{pythonrhnroot}/wsgi
 %endif


commit 6bf583de308bcd13fdcfc8b7c8e0391991715556
Author: Michael Mraka <michael.mraka at redhat.com>
Date:   Tue Jun 12 10:36:15 2012 +0200

    removed -xp subpackage

diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index c88d366..9fcd3f2 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -141,23 +141,16 @@ Obsoletes: rhns-server-app < 5.3.0
 Obsoletes: rhns-app < 5.3.0
 Provides: rhns-server-app = 1:%{version}-%{release}
 Provides: rhns-app = 1:%{version}-%{release}
-
-%description app
-These are the files required for running the /APP handler.
-Calls to /APP are used by internal maintenance tools (rhnpush).
-
-%package xp
-Summary: Handler for /XP
-Group: Applications/Internet
-Requires: %{name}-server = %{version}-%{release}
+Obsoletes: spacewalk-backend-xp < 1.8.33
+Provides: spacewalk-backend-xp = %{version}-%{release}
 Obsoletes: rhns-server-xp < 5.3.0
 Obsoletes: rhns-xp < 5.3.0
 Provides: rhns-server-xp = 1:%{version}-%{release}
 Provides: rhns-xp = 1:%{version}-%{release}
 
-%description xp
-These are the files required for running the /XP handler.
-Calls to /XP are used by tools publicly available (like rhn_package_manager).
+%description app
+These are the files required for running the /APP handler.
+Calls to /APP are used by internal maintenance tools (rhnpush).
 
 %package iss
 Summary: Handler for /SAT
@@ -464,7 +457,6 @@ rm -f %{rhnconf}/rhnSecret.py*
 %{rhnroot}/wsgi/sat.py*
 %{rhnroot}/wsgi/sat_dump.py*
 %{rhnroot}/wsgi/xmlrpc.py*
-%{rhnroot}/wsgi/xp.py*
 
 # logs and other stuff
 %config(noreplace) %{_sysconfdir}/logrotate.d/spacewalk-backend-server
@@ -500,15 +492,6 @@ rm -f %{rhnconf}/rhnSecret.py*
 %attr(644,root,apache) %config %{httpdconf}/rhn/spacewalk-backend-app.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/spacewalk-backend-app
 
-%files xp
-%doc LICENSE
-%dir %{rhnroot}/server/handlers/xp
-%{rhnroot}/server/handlers/xp/*
-# config files
-%attr(644,root,apache) %{rhnconfigdefaults}/rhn_server_xp.conf
-%attr(644,root,apache) %config %{httpdconf}/rhn/spacewalk-backend-xp.conf
-%config(noreplace) %{_sysconfdir}/logrotate.d/spacewalk-backend-xp
-
 %files iss
 %doc LICENSE
 %dir %{rhnroot}/server/handlers/sat


commit d068d80ba40c61fb1f9bc32393f1b836a013ef3c
Author: Michael Mraka <michael.mraka at redhat.com>
Date:   Tue Jun 12 10:29:58 2012 +0200

    removed dead code for /XP handler

diff --git a/backend/logrotate/spacewalk-backend-xp b/backend/logrotate/spacewalk-backend-xp
deleted file mode 100644
index 255f473..0000000
--- a/backend/logrotate/spacewalk-backend-xp
+++ /dev/null
@@ -1,13 +0,0 @@
-# logrotation file for Red Hat Network Server
-#
-# $Id$
-
-/var/log/rhn/rhn_server_xp.log {
-    weekly
-    rotate 5
-    copytruncate
-    compress
-    notifempty
-    missingok
-    size=10M
-}
diff --git a/backend/rhn-conf/rhn_server_xp.conf b/backend/rhn-conf/rhn_server_xp.conf
deleted file mode 100644
index 49486d9..0000000
--- a/backend/rhn-conf/rhn_server_xp.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# ** DO NOT EDIT **
-# RHN config for requests traveling through the /XP receiver
-#
-# $Id$
-
-log_file = /var/log/rhn/rhn_server_xp.log
diff --git a/backend/server/handlers/Makefile b/backend/server/handlers/Makefile
index 258eb24..f5f9349 100644
--- a/backend/server/handlers/Makefile
+++ b/backend/server/handlers/Makefile
@@ -13,8 +13,7 @@ SUBDIRS = \
 		  config \
 		  config_mgmt \
                   sat \
-		  xmlrpc \
-		  xp
+		  xmlrpc
 
 include $(TOP)/Makefile.defs
 
diff --git a/backend/server/handlers/xp/Makefile b/backend/server/handlers/xp/Makefile
deleted file mode 100644
index e0ce584..0000000
--- a/backend/server/handlers/xp/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-# Makefile for the xmlrpc module
-#
-# $Id$
-
-TOP	= ../../..
-SUBDIR	= server/handlers/xp
-
-FILES	= __init__ packages rhnlint
-
-include $(TOP)/Makefile.defs
-
diff --git a/backend/server/handlers/xp/__init__.py b/backend/server/handlers/xp/__init__.py
deleted file mode 100644
index 47e1842..0000000
--- a/backend/server/handlers/xp/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2008 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. 
-#
-# This file defines the classes available for the XMLRPC receiver
-#
-
-__all__ = []
-
-import packages
-import rhnlint
-
-rpcClasses = {
-    "packages"          : packages.Packages,
-    "rhnlint"           : rhnlint.RHNLint,
-    }
-
-getHandler = None
diff --git a/backend/server/handlers/xp/packages.py b/backend/server/handlers/xp/packages.py
deleted file mode 100644
index 0515b3d..0000000
--- a/backend/server/handlers/xp/packages.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2008--2011 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. 
-#
-#
-# Package uploading functions.
-# Package info checking routines.
-#
-
-from spacewalk.common.rhnLog import log_debug
-from spacewalk.common.RPC_Base import RPC_Base
-import sys
-sys.path.append("/usr/share/rhn")
-from server.handlers.app.packages import Packages as APP_Packages
-
-class Packages(APP_Packages):
-    def __init__(self):
-        log_debug(3)
-        RPC_Base.__init__(self)        
-        self.functions.append('uploadPackageInfo')
-        self.functions.append('uploadSourcePackageInfo')
-        self.functions.append('listChannel')
-        self.functions.append('listMissingSourcePackages')
-
-
diff --git a/backend/server/handlers/xp/rhnlint.py b/backend/server/handlers/xp/rhnlint.py
deleted file mode 100644
index 03f59a9..0000000
--- a/backend/server/handlers/xp/rhnlint.py
+++ /dev/null
@@ -1,352 +0,0 @@
-#
-# Copyright (c) 2008--2011 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. 
-#
-# RHN sanity tests for RPMs
-#
-
-import time
-import string
-
-from spacewalk.common import rhn_rpm
-from spacewalk.common.rhnLog import log_debug
-from spacewalk.common.RPC_Base import RPC_Base
-from spacewalk.server import rhnSQL
-from spacewalk.server.importlib.userAuth import UserAuth
-
-class RHNLint(RPC_Base):
-    def __init__(self):
-	RPC_Base.__init__(self)        
-        self.functions.append('testPackages')
-
-    # perform sanity test of package headers, and send back a report of the results...
-    def testPackages(self, login, password, info):
-        authobj = auth(login, password)
-        info['orgId'] = authobj.org_id
-        packages = info.get('packages')
-
-        for package in packages:
-            package['header'] = rhn_rpm.headerLoad(package['header'].data)
-
-        # get back dictionaries of lists, key == filename
-        results = {}
-
-        log_debug(1, info)
-        
-        testChecksums(info, results)
-        testObsoletes(info, results)
-        testDependencies(info, results)
-        
-        #log_debug(3, results)
-
-        problems = []
-        for problem_package in results.keys():
-            problems.append(format_package_problems(problem_package, results[problem_package]))
-
-        return """
-
-rhn-lint RPM Package Tests:
-===========================
-
-Problem packages:
-
-%s
-""" % string.join(problems, "\n\n")
-
-
-#======================
-# utility functions
-#======================
-
-# given a bunch of problems about a package, format them in a reasonable way
-def format_package_problems(package, problems):
-    return "%s:\n%s\n" % (package, string.join(problems, "\n"))
-
-
-# A function that formats a UNIX timestamp to the session's format
-def gmtime(timestamp):
-    ttuple = time.gmtime(timestamp)
-    return "%d-%02d-%02d %02d:%02d:%02d" % ttuple[:6]
-
-
-def auth(login, password):
-    # Authorize this user
-    authobj = UserAuth()
-    authobj.auth(login, password)
-    # Check if he's authorized to perform administrative tasks
-    authobj.authzOrg({'orgId' : authobj.org_id})
-    return authobj
-
-
-# given header, spit out clean string representation of nvrea'ish stuff
-def nvr(header):
-    return ("%s-%s-%s" % (header['name'], header['version'], header['release']))
-
-def nvre(header):
-    if (header['epoch']):
-        epoch_str = ":%s" % header['epoch']
-    else:
-        epoch_str = ""
-        
-    return ("%s-%s-%s%s" % (header['name'], header['version'], header['release'], epoch_str))
-
-def nvrea(header):
-    return header['nvrea']
-
-
-
-#======================================
-#  The sanity tests...
-
-# tests if package obsoletes itself
-def testObsoletes(info, results):
-
-    packages = info.get('packages')
-    
-    for package in packages:
-        header = package['header']
-
-        # if exists, comes back in a list form
-        #if header['obsoletes']:
-            
-    return
-
-# see if dependencies can be met
-# basically, if a package in the set has a REQUIRE, make sure something in the tested channel
-# (or the tested channel's parent) can satisfy that requirement.
-#
-# TODO:  include the information from the other packages in the set?
-def testDependencies(info, results):
-
-    packages = info.get('packages')
-    channel_labels = info.get('channels')
-
-    #log_debug(1, "channel labels == %s" % str(channel_labels))
-
-    # hacked from rhn/backend/server/rhnServer/rpmdata.py
-    # much hackage here to get it running on webdev.  still trying to figure out why this stuff
-    # causes ORA-3113 errors under oracle 9i
-    statement = """
-            select 
-                q.package_name,
-                q.evr.version version,
-                q.evr.release release,
-                q.evr.epoch epoch,
-                1 preference
-            from
-                (select 
-                    pn.name package_name,
-                    pe.evr evr,
-                    max(pe.evr) evr2
-                from rhnChannel c1,
-                    rhnChannel c2,
-                    rhnChannelPackage cp,
-                    rhnPackage p,
-                    rhnPackageName pn,
-                    rhnPackageEVR pe
-                where c1.label = :channel_label
-                    and c2.id in (c1.id, c1.parent_channel)
-                    and c2.id = cp.channel_id
-                    and cp.package_id = p.id
-                    and p.name_id = pn.id
-                    and pn.name = :dep
-                    and p.evr_id = pe.id
-                group by pn.name, pe.evr
-                ) q
-            union all
-            -- provides
-            select 
-                pn.name package_name,
-                (pe.evr).version as version,
-                (pe.evr).release as release,
-                (pe.evr).epoch as epoch,
-                2 as preference
-            from
-                rhnChannel c1,
-                rhnChannel c2,
-                rhnChannelPackage cp,
-                rhnPackageProvides pr,
-                rhnPackage p,
-                rhnPackageCapability cap,
-                rhnPackageName pn,
-                rhnPackageEVR pe
-             where c1.label = :channel_label
-                and c2.id in (c1.id, c1.parent_channel)
-                and c2.id = cp.channel_id
-                and cp.package_id = p.id
-                and cp.package_id = pr.package_id
-                and pr.capability_id = cap.id
-                and cap.name = :dep
-                and p.name_id = pn.id
-                and p.evr_id = pe.id
-                and pe.evr in (
-                    select MAX(pe1.evr)
-                    from rhnPackage p1,
-                        rhnPackageEvr pe1,
-                        rhnChannelPackage cp1
-                    where  cp1.channel_id = c2.id
-                        and cp1.package_id = p1.id
-                        and p1.name_id = pn.id
-                        and p1.evr_id = pe1.id
-                    )
-            union all
-            -- files
-            select 
-                pn.name package_name,
-                (pe.evr).version as version,
-                (pe.evr).release as release,
-                (pe.evr).epoch as epoch,
-                3 as preference
-            from rhnChannel c1,
-                rhnChannel c2,
-                rhnChannelPackage cp,
-                rhnPackageFile f,
-                rhnPackage p,
-                rhnPackageCapability cap,
-                rhnPackageName pn,
-                rhnPackageEVR pe
-            where c1.label = :channel_label
-                and c2.id in (c1.id, c1.parent_channel)
-                and c2.id = cp.channel_id
-                and cp.package_id = p.id
-                and cp.package_id = f.package_id
-                and f.capability_id = cap.id
-                and cap.name = :dep
-                and p.name_id = pn.id
-                and p.evr_id = pe.id
-                and pe.evr in (
-                select MAX(pe1.evr)
-                    from rhnPackage p1,
-                        rhnPackageEvr pe1,
-                        rhnChannelPackage cp1
-                    where cp1.channel_id = c2.id
-                        and cp1.package_id = p1.id
-                        and p1.name_id = pn.id
-                        and p1.evr_id = pe1.id
-                    )
-                    """
-
-    h = rhnSQL.prepare(statement)
-
-    for package in packages:
-        header = package['header']
-        filename = package['filename']
-
-        if header['requirename'] is not None:
-            #log_debug(1, header['requirename'])
-            #log_debug(1, header['requireversion'])
-            
-            for i in range(0, len(header['requirename'])):
-
-                # ignore rpm-internally-satisfied requires...
-                if (len(header['requirename'][i]) > 7 and header['requirename'][i][0:7] != 'rpmlib('):
-
-                    #log_debug(1, header['requirename'][i])
-                    
-                    for channel_label in channel_labels:
-
-                        h.execute(channel_label = str(channel_label), dep = str(header['requirename'][i]))
-
-                        rs = h.fetchall_dict() or []
-
-                        if rs == []:
-                            if (not results.has_key(filename)):
-                                results[filename] = []
-
-                            results[filename].append("dependency not met in tested channel %s (nor any parent):  %s"
-                                                     % (channel_label, header['requirename'][i]))
-                            
-                        # do we have to worry about REQUIREVERSION here?
-                        
-                        del rs
-
-    return
-    
-# test to insure that no package with the same nvre but different checksum is in the db...
-# basically, complains if someone just resigns a package w/out bumping release
-#
-# NOTE:  currently, only cares about packages w/ org_id in (null, your_org)
-def testChecksums(info, results):
-
-    packages = info.get('packages')
-    
-    for package in packages:
-        header = package['header']
-        filename = package['filename']
-        query = """
-        select pn.name || '-' || pe.evr.as_vre_simple() nvre,
-               c.checksum_type, c.checksum,
-               p.org_id org_id, p.build_host buildhost, p.build_time buildtime
-          from rhnPackageArch pa, rhnPackageName pn, rhnPackageEVR pe, 
-            rhnPackage p, rhnChecksumView c
-         where pn.name = :name
-               and pe.version = :version
-               and pe.release = :release
-               and pe.epoch %s
-               and pn.id = p.name_id
-               and pe.id = p.evr_id
-               and p.checksum_id = c.id
-               and not (c.checksum = :checksum and c.checksum_type = :checksum_type)
-               and (p.org_id is null or p.org_id = :org_id)
-               and pa.label = :arch
-               and p.package_arch_id = pa.id
-               """
-        params = { 
-            'name':header['name'], 
-            'version':header['version'], 
-            'release':header['release'], 
-            'epoch':header['epoch'], 
-            'checksum':package['checksum'],
-            'checksum_type':package['checksum_type'],
-            'org_id':info['org_id'],
-            'arch':header['arch'],
-        }
-
-        if not header['epoch']:
-            epoch_query_str = "is null"
-            del params['epoch']
-        else:
-            epoch_query_str = "= :epoch"
-
-        h = rhnSQL.prepare(query % epoch_query_str)
-        apply(h.execute,(),params)
-
-        query_results = h.fetchall_dict()
-
-        if query_results and len(query_results):
-            for row in query_results:
-                if (row['org_id']):
-                    org_str = " in org %s" % row['org_id']
-                else:
-                    org_str = ''
-                    
-                if (not results.has_key(filename)):
-                    results[filename] = []
-
-                different_fields = []
-
-                if (header['buildhost'] != row['buildhost']):
-                    different_fields.append("tested package buildhost:\t%s\ndb package buildhost:\t\t%s" % (header['buildhost'], row['buildhost']))
-
-                if (gmtime(header['buildtime']) != str(row['buildtime'])):
-                    different_fields.append("tested package buildtime:\t%s\ndb package buildtime:\t\t%s" % (gmtime(header['buildtime']), row['buildtime']))
-                if len(different_fields) > 0:
-                    further_info = "It's probably a different/recompiled package:\n%s" % string.join(different_fields, "\n")
-                else:
-                    further_info = "only checksums differ, packages probably was just resigned"
-
-                results[filename].append("\nAlready found with a checksum of %s:%s %s\n%s"
-                                         % (row['checksum_type'], row['checksum'], org_str, further_info))
-
-
-    return
diff --git a/backend/wsgi/Makefile b/backend/wsgi/Makefile
index 5f94ad6..b696d74 100644
--- a/backend/wsgi/Makefile
+++ b/backend/wsgi/Makefile
@@ -5,6 +5,6 @@ TOP    = ..
 SUBDIR = wsgi
 
 FILES = __init__ app applet config config_tool package_push \
-	 sat sat_dump  xmlrpc xp wsgiHandler wsgiRequest
+	 sat sat_dump  xmlrpc wsgiHandler wsgiRequest
 
 include $(TOP)/Makefile.defs
diff --git a/backend/wsgi/xp.py b/backend/wsgi/xp.py
deleted file mode 100644
index fe44ad2..0000000
--- a/backend/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 wsgi import wsgiHandler
-
-def application(environ, start_response):
-    return wsgiHandler.handle(environ, start_response, "xp","server.xp")


commit bfd814805d6a4b8c7ebf388bb5b877fcc1ddf3a7
Author: Michael Mraka <michael.mraka at redhat.com>
Date:   Tue Jun 12 10:25:37 2012 +0200

    removed unused /XP handler
    
    rhn-package-manager now uses /APP handler

diff --git a/backend/apache-conf/zz-spacewalk-server-wsgi.conf b/backend/apache-conf/zz-spacewalk-server-wsgi.conf
index ba2fd13..ee11abb 100644
--- a/backend/apache-conf/zz-spacewalk-server-wsgi.conf
+++ b/backend/apache-conf/zz-spacewalk-server-wsgi.conf
@@ -12,5 +12,4 @@ WSGIScriptAlias /PACKAGE-PUSH /usr/share/rhn/wsgi/package_push.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/httpd-conf/rhn/spacewalk-backend-xp.conf b/backend/httpd-conf/rhn/spacewalk-backend-xp.conf
deleted file mode 100644
index acdec35..0000000
--- a/backend/httpd-conf/rhn/spacewalk-backend-xp.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-# ** DO NOT EDIT **
-# Configuration for /XP receiver
-#
-
-<IfModule mod_python.c>
-
-<Location /XP>
-  SetHandler python-program
-  # all of these handlers are defined in apacheServer
-  PythonHeaderParserHandler 	spacewalk.server.apacheServer::HeaderParserHandler
-  PythonHandler			spacewalk.server.apacheServer::Handler
-  PythonLogHandler 		spacewalk.server.apacheServer::LogHandler
-  PythonCleanupHandler 		spacewalk.server.apacheServer::CleanupHandler
-  PythonOption SERVER xp
-  PythonOption RHNComponentType server.xp
-  DefaultType text/xml
-  ErrorDocument 403 "Error 403"
-  ErrorDocument 404 "Error 404"
-  ErrorDocument 500 "Error 500"
-</Location>
-
-</IfModule>
-
-
diff --git a/proxy/proxy/httpd-conf/spacewalk-proxy-wsgi.conf b/proxy/proxy/httpd-conf/spacewalk-proxy-wsgi.conf
index e81e9c5..a8e9772 100644
--- a/proxy/proxy/httpd-conf/spacewalk-proxy-wsgi.conf
+++ b/proxy/proxy/httpd-conf/spacewalk-proxy-wsgi.conf
@@ -30,7 +30,6 @@ WSGIScriptAlias /ks /usr/share/rhn/wsgi/xmlrpc.py
 # others
 WSGIScriptAlias /SAT /usr/share/rhn/wsgi/xmlrpc.py
 WSGIScriptAlias /SAT-DUMP-INTERNAL /usr/share/rhn/wsgi/xmlrpc.py
-WSGIScriptAlias /XP /usr/share/rhn/wsgi/xmlrpc.py
 
 # WebUI of rhnParent, can be safely disabled if you do not want to browse
 # Spacewalk WebUI


commit dd4ad1ee39147488ab442ea59e72e82a768a8a67
Author: Michael Mraka <michael.mraka at redhat.com>
Date:   Mon Jun 11 16:14:03 2012 +0200

    removed commented out code and obsoleted comments

diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index aae1604..abd4756 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -58,7 +58,6 @@ class UploadClass:
     """Functionality for an uploading tool
     """
     def __init__(self, options, files=None):
-        #CmdlineClass.__init__(self, table, argsDescription, aliasing)
         self.options = options
         self.username = None
         self.password = None
@@ -181,12 +180,9 @@ class UploadClass:
         self.setURL()
         # set the channels
         self.setChannels()
-        # set the username and password
-        #self.setUsernamePassword()
         # set the server
         self.setServer()
 
-        #XXX
         self.authenticate()
 
         if self.options.source:
@@ -346,7 +342,6 @@ class UploadClass:
         # set the server
         self.setServer()
         
-        #XXX
         self.authenticate()
         
         source = self.options.source
@@ -412,13 +407,9 @@ class UploadClass:
     def processPackage(self, package, filename):
         pass
 
-    #12/22/05 wregglej 173287 This calls the XMLRPC function that checks whether or not the
-    #current session is still valid.
     def checkSession(self, session):
         return call(self.server.packages.check_session, session)
 
-    #12/22/05 wregglej 173287 Reads the cached session string from ~/.rhnpushcache and 
-    #configures a session object with it.
     def readSession(self):
         try:
             self.session = rhnpush_cache.RHNPushSession()
@@ -426,8 +417,6 @@ class UploadClass:
         except Exception, e:
             self.session = None
 
-    #12/22/05 wregglej 173287 Writes the session to ~/.rhnpushcache and configures makes sure the
-    #session object is configured with it.
     def writeSession(self, session):
         if self.session:
             self.session.setSessionString(session)
@@ -438,13 +427,6 @@ class UploadClass:
         if not self.options.no_cache:
             self.session.writeSession()
 
-    #12/22 wregglej 173287 The actual authenication process. It reads in the session, checks the sessions validity,
-    #and will prompt the user for their username and password if there's something wrong with their session string.
-    #After they've entered their username/password, they are passed to the new XMLRPC call 'login', which will 
-    #verify the user/pass and return a new session string if they are correct.
-    #Need to fix this up so there's less repeated code.
-    # 2008-09-26 mmraka - 461701: if --username is set use always username/password
-    # and generate new session
     def authenticate(self):
         #Only use the session token stuff if we're talking to a sat that supports session-token authentication.
         self.readSession()




More information about the spacewalk-commits mailing list