Red Hat Bugzilla – Bug 487668
RHN Solaris client freezes when installing a patch that has been previously unzipped to /tmp
Last modified: 2009-09-17 03:10:46 EDT
+++ 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
make use of `mktemp -d` to create directories in /tmp
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.
I've ended up using tempfile.mkdtemp in python, commit 0d271589b6254304cf0eea60a56176f6eeaf7c5a.
With Spacewalk 0.5 released, moving ON_QA.
Spacewalk 0.5 released.
Spacewalk 0.5 has been released for long time ago.