Bug 151807 - source rpms fail to install when rpm-build is not installed
source rpms fail to install when rpm-build is not installed
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
4
All Linux
medium Severity low
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-22 11:08 EST by Roozbeh Pournader
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-22 11:34:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Roozbeh Pournader 2005-03-22 11:08:09 EST
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 11:34:57 EST
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.