Bug 175214

Summary: directories not created in /var before attempting to chown them
Product: [Fedora] Fedora Reporter: Stephen Biggs <bugzilla-redhat>
Component: tinyerpAssignee: Dan Horák <dan>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 3.1.1-5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-12-11 12:29:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephen Biggs 2005-12-07 20:00:25 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050926 Fedora/1.0.7-1.1.fc4.swupdate Firefox/1.0.7

Description of problem:
Directories not created correctly at install of this package in /var.

Version-Release number of selected component (if applicable):
tinyerp-server-3.1.1-1.fc4

How reproducible:
Always

Steps to Reproduce:
1. Install tinyerp-server-3.1.1-1.fc4
2.
3.
  

Actual Results:  When installing this on a clean system, in the preinstall script there is the 
line:
chown -R tinyerp:tinyerp /var/log/tinyerp /var/spool/tinyerp

This fails with a complaining error since these directories don't exist.

Expected Results:  Installation without error messages.

Additional info:

Before the chown command, the line:
mkdir -p  /var/log/tinyerp /var/spool/tinyerp

needs to be inserted inthe preinstall script.

Once these directories already exist, installation of the package completes without error or other incident.

Comment 1 Dan Horák 2005-12-08 16:08:05 UTC
The dirs are included in the tinyerp-server package, but the chown command
should be executed in %post script instead of %pre. In the time of executing the
%pre script they don't exist yet. Fixed in tinyerp-server-3.1.1-2.

Comment 2 Dan Horák 2005-12-08 17:28:33 UTC
The chown command is not even required, ownership is set via %attr in the spec
file. I have released tinyerp-3.1.1-3.

Comment 3 Dan Horák 2005-12-11 12:29:39 UTC
I have fixed dependencies for %pre and %postun scripts. Will be in tinyerp-3.1.1-5.