[Spacewalk-list] Status of Solaris support

Pierre Casenove pcasenove at gmail.com
Tue Jul 10 12:55:10 UTC 2012


hello,
That was my first guess too. But according to Oracle documentation, we
need to have Sunpatch 119254-75 or higher to be able to open the zip
file.
On my system, I have patch 119254-84 installed.
And unzip command outputs this message inc ase it is incorrect:
Example error message:
---
warning [10_Recommended.zip]:  76 extra bytes at beginning or within zipfile
  (attempting to process anyway)
error [10_Recommended.zip]:  reported length of central directory is
  -76 bytes too long (Atari STZip zipfile?  J.H.Holm ZIPSPLIT 1.1
  zipfile?).  Compensating...


The message "Bad magic number for central directory" which is seen on
the client is really python specific.

By the way, did you have time to review the attached patch, which
allow solaris2mpm to work onpython 2.4 for a single patch?

Pierre



2012/7/10 Michael Mraka <michael.mraka at redhat.com>:
> Pierre Casenove wrote:
> % I've tested to deploy the pushed patch cluster... and it failed:
> % In Spacewalk, I have this error message in the failed actions page:
> % Patch cluster install failed: Bad magic number for central directory
> %
> % I've rhn_check manually from my client and here is the output:
> % D: do_call solarispkgs.patchClusterInstall
> % ([[['patch-cluster-solaris-', '20120412', '1',
> % 'sparc-solaris-patch-cluster', 'solaris-10-sparc-patches'], {}]],)
> % Installing patch cluster:  [[['patch-cluster-solaris-', '20120412',
> % '1', 'sparc-solaris-patch-cluster', 'solaris-10-sparc-patches'], {}]]
> % Loading cache...
> % Updating cache...
> % #####################################################################
> % [100%]
> % Updating cache...
> % #####################################################################
> % [100%]
> % Updating cache...
> % #####################################################################
> % [100%]
> %
> % Computing transaction...
> % Committing transaction...
> % D: Sending back response (102, 'Patch cluster install failed: Bad
> % magic number for central directory', {'version': 0, 'name':
> % 'solarispkgs.patchClusterInstall'})
> ...
> % Here is my guess, but with no proof:
> % After rhnpushing the mpm files, Spacewalk rebuild the
> % 10_recommended.zip file alone. As I'm on RHEL 5, python 2.4 is used to
> % build the 10_recommended.zip file... which requires ZIP64 extensions.
> % And so it fails.
>
> No, pushed package is not rebuilt, just stored.
>
> % Any help would be really apprecciated
>
> Is your solaris system able to unzip patch cluster?
> Most likely you need newer zip installed on it.
>
> Regards,
>
> --
> Michael Mráka
> Satellite Engineering, Red Hat
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list
-------------- next part --------------
From cba64d6ef2ef9f8c3190d1c5c42bb17a53620ae5 Mon Sep 17 00:00:00 2001
From: Pierre Casenove <pcasenove at gmail.com>
Date: Wed, 27 Jun 2012 09:29:16 +0000
Subject: [PATCH] Python 2.4 does not have extractall method

---
 client/tools/rhnpush/archive.py |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/client/tools/rhnpush/archive.py b/client/tools/rhnpush/archive.py
index 873c870..20535d7 100644
--- a/client/tools/rhnpush/archive.py
+++ b/client/tools/rhnpush/archive.py
@@ -241,9 +241,23 @@ class ZipParser(ArchiveParser):
     def _explode(self, archive):
         """Explode zip archive"""
         self._archive_dir = os.path.join(self._temp_dir, self._get_archive_dir())
+        if self._archive_dir[-1:] == "/":
+            self._archive_dir = self._archive_dir[0:-1]

         try:
-            self.zip_file.extractall(self._temp_dir)
+            if hasattr(self.zip_file,'extractall'):
+                self.zip_file.extractall(self._temp_dir)
+            else:
+                # there's no ZipFile.extractall() in python 2.4 (RHEL5)
+                for zipinfo in self.zip_file.namelist():
+                    complete_path = os.path.join(self._temp_dir,zipinfo)
+                    if complete_path.endswith("/"):
+                        if not os.path.exists(complete_path):
+                            os.mkdir(complete_path)
+                    else:
+                        fd = open(complete_path,"w")
+                        fd.write(self.zip_file.read(zipinfo))
+                        fd.close()
         except Exception, e:
             raise InvalidArchiveError("Archive did not expand to %s: %s" %
                                                 (self._archive_dir, str(e)))
--
1.7.4.1


More information about the Spacewalk-list mailing list