Bug 487668 - RHN Solaris client freezes when installing a patch that has been previously unzipped to /tmp
RHN Solaris client freezes when installing a patch that has been previously u...
Product: Spacewalk
Classification: Community
Component: Clients (Show other bugs)
All Other
medium Severity medium
: ---
: ---
Assigned To: Jan Pazdziora
Jesus M. Rodriguez
Depends On:
Blocks: space05
  Show dependency treegraph
Reported: 2009-02-27 06:31 EST by Jan Pazdziora
Modified: 2009-09-17 03:10 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 467349
Last Closed: 2009-09-17 03:10:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Pazdziora 2009-02-27 06:31:25 EST
+++ This bug was initially created as a clone of Bug #467349 +++

Description of problem:

When installing a patch, the first step is to unzip the patch into /tmp. However if there already is an old version of the archive in /tmp unzip hangs waiting for user input.

# up2date --get somepatch 
# Unzip it in /tmp
# up2date somepatch

Packages installed on the Solaris box:

utility     RHATpossl                    pyOpenSSL 0.6
utility     RHATpythn                    python 2.4.1
utility     RHATrcfg                     rhncfg 5.1.0
utility     RHATrcfga                    rhncfg-actions 5.1.0
utility     RHATrcfgc                    rhncfg-client 5.1.0
utility     RHATrcfgm                    rhncfg-management 5.1.0
utility     RHATrhnc                     rhnclient 5.1.0
utility     RHATrhnl                     rhnlib 1.8
utility     RHATsmart                    smartpm 5.1.1

The probably cause of the problem:

In line 63 of /opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/pm.py
                cmdstr = "unzip %s -d %s" % (path, tdir)
Please update to read:
                cmdstr = "unzip %s -u -d %s" % (path, tdir)
Where -u does:
     -u   update existing files and create new  ones  if  needed.
          This  option  performs  the  same  function  as  the -f
          option, extracting (with query) files  that  are  newer
          than  those with the same name on disk, and in addition
          it extracts those files that do not  already  exist  on
          disk.   See  -f  above  for  information on setting the
          timezone properly.

Suggested fix:
make use of `mktemp -d` to create directories in /tmp
Comment 1 Jan Pazdziora 2009-02-27 06:35:31 EST
The -u option added, in Spacewalk repo, commit 8557bd24dab10f71ca6b4ff1eefbe40a4c52cb67.

Note that we cannot generally use mktemp because it's not available on SunOS 5.8.
Comment 2 Jan Pazdziora 2009-02-27 08:03:29 EST
I've ended up using tempfile.mkdtemp in python, commit 0d271589b6254304cf0eea60a56176f6eeaf7c5a.
Comment 3 Jan Pazdziora 2009-04-01 02:36:25 EDT
With Spacewalk 0.5 released, moving ON_QA.
Comment 4 Jesus M. Rodriguez 2009-04-14 10:13:20 EDT
Spacewalk 0.5 released.
Comment 5 Miroslav Suchý 2009-09-17 03:10:46 EDT
Spacewalk 0.5 has been released for long time ago.

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