Bug 703191 - Broken Solaris up2date Client
Summary: Broken Solaris up2date Client
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 1.5
Hardware: Unspecified
OS: Other
unspecified
medium
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space16
TreeView+ depends on / blocked
 
Reported: 2011-05-09 15:38 UTC by Andy Speagle
Modified: 2011-09-16 16:04 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-09-16 14:57:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Andy Speagle 2011-05-09 15:38:40 UTC
Description of problem:
The solaris port of the up2date client has been broken for a few versions.  Discussions of this have been bandied about on the spacewalk-devel list for some time.  I feel remiss at not having submitted a BZ for this before now.

This seemed to break at around v1.0 of Spacewalk and remains broken now.  The version of the client packaged here: (http://jlsherrill.fedorapeople.org/solaris/) is quite old.

Here's an excerpt of the discussion on the list:

My Solaris x86 up2date client worked at one point, not sure if it was with Spacewalk v0.8 or v0.7, but with v1.0 … a simple up2date no longer works.  Here’s the output:

# up2date SMCsudo

Updating cache...                                ################################################################## [100%]


Fetching packages...
-> rhn://sol-x86_64-server-extras-10/SMCsudo/1.7.2p1/.../SMCsudo-1.7.2p1-1_PSTAMP_Steve_Christensen.i386-solaris.pkg
SMCsudo-1.7.2p1-1_PSTAMP_Steve_Christensen.i38..                                                                    [  0%]

error: Failed to download packages:
error:     rhn://sol-x86_64-server-extras-10/SMCsudo/1.7.2p1/1_PSTAMP_Steve_Christensen/i386-solaris/SMCsudo-1.7.2p1-1_PSTAMP_Steve_Christensen.i386-solaris.pkg: rhn.client.rhnErrors.FileNotFoundError


# smart --log-level=debug download SMCsudo
Loading cache...
Updating cache...                                ################################################################## [100%]

Fetching packages...
-> rhn://sol-x86_64-server-extras-10/SMCsudo/1.7.2p1/.../SMCsudo-1.7.2p1-1_PSTAMP_Steve_Christensen.i386-solaris.pkg
SMCsudo-1.7.2p1-1_PSTAMP_Steve_Christensen.i38..                                                                    [  0%]

Traceback (most recent call last):
  File "/opt/redhat/rhn/solaris/usr/bin/smart", line 158, in main
    exitcode = iface.run(opts.command, opts.argv)
  File "/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/interface.py", line 52, in run
    result = _command.main(self._ctrl, opts)
  File "/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/commands/download.py", line 134, in main
    ctrl.downloadPackages(packages, targetdir=opts.target)
  File "/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/control.py", line 457, in downloadPackages
    self.fetchPackages(fetchpkgs, caching, targetdir)
  File "/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/control.py", line 622, in fetchPackages
    raise Error, _("Failed to download packages:\n") + \
Error: Failed to download packages:
    rhn://sol-x86_64-server-extras-10/SMCsudo/1.7.2p1/1_PSTAMP_Steve_Christensen/i386-solaris/SMCsudo-1.7.2p1-1_PSTAMP_Steve_Christensen.i386-solaris.pkg: rhn.client.rhnErrors.FileNotFoundError
error: Failed to download packages:
error:     rhn://sol-x86_64-server-extras-10/SMCsudo/1.7.2p1/1_PSTAMP_Steve_Christensen/i386-solaris/SMCsudo-1.7.2p1-1_PSTAMP_Steve_Christensen.i386-solaris.pkg: rhn.client.rhnErrors.FileNotFoundError
Saving cache...


I can at least see what packages are available…

# up2date --showall

Updating cache...                                ################################################################## [100%]

RHATsmart-5.1.1-6_PSTAMP_RHAT_RHN
RHATrhnc-5.1.0-4_PSTAMP_RHAT_RHN
RHATpossl-0.6-1.p24.6_PSTAMP_RHAT_RHN
RHATrcfgc-5.1.0-3.el5_PSTAMP_RHAT_RHN
RHATrcfga-5.1.0-3.el5_PSTAMP_RHAT_RHN
RHATrpush-5.1.1-1_PSTAMP_RHAT_RHN
RHATrhnl-1.8-7.p23_PSTAMP_RHAT_RHN
RHATrcfgm-5.1.0-3.el5_PSTAMP_RHAT_RHN
RHATpythn-2.4.1-4.rhn.6.sol10_PSTAMP_RHAT_RHN
RHATrcfg-5.1.0-3.el5_PSTAMP_RHAT_RHN
SMCglib2-2.20.4-1_PSTAMP_Steve_Christensen
SMCliconv-1.11-1_PSTAMP_Steve_Christensen
SMClintl-3.4.0-1_PSTAMP_Steve_Christensen
SMCnetsnmp-5.4.2.1-1_PSTAMP_Steve_Christensen
SMCossl-0.9.8l-1_PSTAMP_Steve_Christensen
SMCsudo-1.7.2p1-1_PSTAMP_Steve_Christensen
TIVsmCapi-Version_5_Release_5_Level_2.4-1_PSTAMP_2009_208_12_01_13
TIVsmCba-Version_5_Release_5_Level_2.4-1_PSTAMP_2009_208_12_01_23
ZOSdbidev-Dev_Release_08_15_2008-1_PSTAMP_2008.08.15.05.55
ZOSlibdbi-Dev_Release_08_15_2008-1_PSTAMP_2008.08.15.05.55
ZOSlibevt-0.2.8-1_PSTAMP_2008.08.18.08.08
ZOSsyslng-2.1.4-1_PSTAMP_2009.03.17.06.08
RHATossl-0.9.7a-33.24.rhn.2.sol9_PSTAMP_RHAT_RHN
SMClibgcc-3.4.1-1_PSTAMP_Steve_Christensen

Has anyone else seen this problem?  I’m a little stuck at this point.  I’m using the latest Solaris “bootstrap” that I found available for Solaris x86 (v5.1.1-3) … but that was released in Oct 2008… so I suspect the protocol has moved forward and left this behind…


Version-Release number of selected component (if applicable):


How reproducible:
Completely.

Additional info:


More info… I’m trying to dig through the up2date/smart code on one of my Solaris clients… everything seems to work fine and from the API the smart client is given this is a URL for one of the packages in question:

URLs: ['rhn://sol-x86_64-server-extras-10/SMCsudo/1.7.2p1/1_PSTAMP_Steve_Christensen/i386-solaris/SMCsudo-1.7.2p1-1_PSTAMP_Steve_Christensen.i386-solaris.pkg']

-----

I think I finally made some progress with this issue.
It seems that some changes have occurred on the server backend scripts, but have not been ported to the Solaris client.

in /opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/loader.py in class SolarisRHNLoader on the Solaris client
in /usr/share/rhn/server/rhnPackage.py in the function get_package_path on the Spacewalk server (RHEL5)

Below I have added my hacks to get Solaris patches working. It seems rhnPackage.py was modified in 
commit 18b077ab79d7b19df0f29434156feca9b646e4bd

Someone with a more extensive background in python and Spacewalk can probably fix the client side without having to hack the server side as I did.

=================== Start of rhnPackage.patch =============================
--- rhn/server/rhnPackage.py.bak        2010-09-02 11:49:22.000000000 -0500
+++ rhn/server/rhnPackage.py        2010-09-10 09:11:02.000000000 -0500
@@ -67,6 +67,16 @@
     """
     h = rhnSQL.prepare(statement)
     pkg = map(str, pkg)
+
+    # Note: pkg[0] - name
+    #       pkg[1] - epoch
+    #       pkg[2] - ver(sion)
+    #       pkg[3] - rel(ease)
+    #       pkg[4] - arch(itecture)
+    if pkg[0].startswith("patch-cluster-solaris-") or \
+       pkg[0].startswith("patch-solaris-"):
+       pkg[3]=pkg[1]
+
     h.execute(name = pkg[0], ver = pkg[2], rel = pkg[3], arch = pkg[4],
               channel = channel, server_id = server_id)
     rs = h.fetchall_dict()
=================== End of rhnPackage.patch =============================
=================== Start of solaris-loader.patch =============================
solaris-loader.patch
--- lib/python2.4/site-packages/smart/backends/solaris/loader.py.bak    Thu Sep
  9 12:53:50 2010
+++ lib/python2.4/site-packages/smart/backends/solaris/loader.py.new    Fri Sep
 10 08:57:06 2010
@@ -254,7 +254,7 @@
             else:
                 info["summary"] = ""
             info["baseurl"] = "rhn://%s/" % (pkg[-1])
-            info["location"] = "%s/%s/%s/%s" % (pkg[0], pkg[1], pkg[2], pkg[4]
)
+            info["location"] = "%s/%s/%s/%s" % (pkg[0], pkg[2], pkg[1], pkg[4]
)
 
             name = info["name"]
             extension = "pkg"
=================== End of solaris-loader.patch =============================

Comment 1 Jan Pazdziora (Red Hat) 2011-07-20 11:53:10 UTC
Aligning under space16.

Comment 2 Milan Zázrivec 2011-09-16 14:57:00 UTC
Yes, the referenced .tar.gz bootstrap packages were taken from Satellite 5.1
ISO and placed on a people page of one of the Spacewalk developers long time
ago.

Naturally -- in the meantime, things may have changed in the Solaris world.

Unfortunately, the Solaris client bootstrap packages were never part of any
official Spacewalk release and Spacewalk developers currently have no
capacity to maintain and distribute client bits for Solaris.

I'm sorry for your trouble, but I'm gonna have to close this report
w/ WONTFIX.

Comment 3 Milan Zázrivec 2011-09-16 16:04:16 UTC
I'm not sure if this will resolve your problems, but we have the latest
solaris bootstrap packages (latest as in Satellite 5.4.1 builds) available
at

    http://spacewalk.redhat.com/solaris/

Regards


Note You need to log in before you can comment on or make changes to this bug.