Bug 157931

Summary: rpm chokes when running script and no /var/tmp
Product: Red Hat Enterprise Linux 4 Reporter: Danny Aizer <Danny.Aizer>
Component: rpmAssignee: Paul Nasrat <pnasrat>
Status: CLOSED CURRENTRELEASE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-17 16:59:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Danny Aizer 2005-05-17 08:30:57 UTC
Description of problem:
When trying to install a package that has %pre install scriptlet (and other
scriptlets), and /var/tmp directory does not exist, 'rpm -i <package>' exits
without any warning/error/message, and the package is not installed.

When trying 'rpm -ivv <package>' the last message before the "closing db"
messages is "running preinstall script (if any)".

Trying 'rpm -i --noscripts <package>' installs the package (but w/o running the
scripts, which are much needed).

I believe /var/tmp is used by RPM to create temp files with the scriptlets. But
if the directory does not exist, it should give some error, or try /tmp or
something, no?

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


How reproducible:
See above

Steps to Reproduce:
1. See above
2.
3.
  
Actual results:
Package not installed, and no error/warning/message given.

Expected results:
Package installed and/or warning/error/message given why it was not installed.

Additional info:
See above

Comment 1 Paul Nasrat 2005-05-17 15:14:17 UTC
What rpm version? rpm 4.3.3 in RHEL 4 works fine for me.

D: install: %post(test-post-1.0-1.noarch) asynchronous scrriptlet start
D: crated directory(s) /var/tmp mode 0755

Comment 2 Danny Aizer 2005-05-17 15:47:52 UTC
I'm actually using version 4.0, but since that's no longer supported and I could
not find a similar bug in the database, I though of submitting this against the
latest stable RHEL, just in case.

Do you know, by any chance, in what RPM version was this (the creating of
/var/tmp when it's missing) added?


Comment 3 Paul Nasrat 2005-05-17 16:59:41 UTC
From the rpm-4_0 branch:
revision 2.80.2.7
date: 2000/12/19 17:59:30;  author: jbj;  state: Exp;  lines: +58 -3
...
- create _tmppath on the fly if not present.

rpm-4_0_1-release: 2.80.2.10 

rpm 4.0.4 is the latest known good on that branch, please consider moving or
advising your vendor to move to that branch.