Bug 151807 - source rpms fail to install when rpm-build is not installed
Summary: source rpms fail to install when rpm-build is not installed
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 4
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-22 16:08 UTC by Roozbeh Pournader
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-03-22 16:34:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Roozbeh Pournader 2005-03-22 16:08:09 UTC
Description of problem:
source RPMs fail to install when rpm-build is not installed on the machine. They
should either install properly, creating the respective directories, or fail
with an error message hinting to rpm-build not installed.

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

How reproducible:
Always

Steps to Reproduce:
1. Get an SRPM like yum-2.3.1-3.src.rpm.
2. Try to install it using "rpm -ivh", e.g.:
   # rpm -ivh yum-2.3.1-3.src.rpm
  
Actual results:
An error messge is displayed:
error: cannot create %sourcedir /usr/src/redhat/SOURCES

Expected results:
It should either install properly, creating the respective directories, or fail
with an error message hinting to rpm-build not installed.

Comment 1 Paul Nasrat 2005-03-22 16:34:57 UTC
I do not believe this is a bug but rather a local configuration issue for the
following reasons.  

1) If you want to install src.rpms without rpm-build you can:

It is also possible to define %_topdir such that a user can install a src.rpm in
there own tree (of course they won't be able to build it).  The default tree is
provided in rpm-build as a conveniece, it is expected most packagers will not
build as root.  Thus rpm can successfully install a src.rpm provided your
environment is setup correctly, it is failing on the default layout as you don't
hae rpm-build installed.

eg:

mkdir -p ~/rpm/{RPMS,SRPMS,SOURCES,SPECS,BUILD}

and having a ~/.rpmmacros that has:

%_topdir        %(echo $HOME)/rpm
# Create binary rpms in RPMS/ rather than RPMS/arch
%_build_name_fmt    %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm


2) If your interest is just in the src and not to build I'd recommend the fedora
anonymous cvs http://cvs.fedora.redhat.com/

3) The expectation of being able to build packages without the Development group
(which would pull in rpm-build) is unexpected.

4) The error message gives enough for a depsolver to fix.  You can do:

yum install /usr/src/redhat/SOURCES  

First time it may take a little time as it needs to populate the full filelists



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