Bug 58487

Summary: rpm can't install RPMs if /usr/src/redhat doesn't exist
Product: [Retired] Red Hat Linux Reporter: Liam Stewart <liams>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: ashish.laxkar16
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-01-17 23:09:42 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 Liam Stewart 2002-01-17 23:09:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.0.2 (X11; Linux i686; U;) Gecko/20011226

Description of problem:
When installing a source RPM on a system that lacks a /usr/src/redhat directory
(ie: /usr/src exists, but the directory 'redhat' doesn't exist within /usr/src),
rpm fails:

[root@tourist SRPMS]# rpm -i gaim-0.11.0pre4-5.src.rpm
error: cannot create %sourcedir /usr/src/redhat/SOURCES

If /usr/src/redhat exists but directories within that, such as SOURCES and
SPECS, do, then they are silently created and the install succeeds. So if
/usr/src/redhat doesn't exist, I would expect it to be created during the src
rpm installation.

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


How reproducible:
Always

Steps to Reproduce:
1. Make sure /usr/src/redhat doesn't exist.
2. Choose any source rpm
3. as root

# rpm -i foo-1.2.3.src.rpm


Actual Results:  error: cannot create %sourcedir /usr/src/redhat/SOURCES

Expected Results:  /usr/src/redhat is created, source rpm is installed normally

Additional info:

Comment 1 Jeff Johnson 2002-03-19 19:47:30 UTC
The /usr/src/redhat directories are part
of the rpm-build package, and are created
when the rpm-build package is installed.



Comment 2 Ashish Kumar Laxkar 2013-01-29 06:59:39 UTC
warning: group mockbuild does not exist - using root

after installing src.rpm gives like this error why like that???? Please reply me.. via mail ashish.laxkar16