Mailinglist Archive: opensuse (3336 mails)

< Previous Next >
Re: [SLE] Trouble installing src.rpm
  • From: John Summerfield <suse@xxxxxxxxxxxxxxxxxxxxxx>
  • Date: Fri, 09 Dec 2005 08:49:22 +0800
  • Message-id: <4398D492.2040201@xxxxxxxxxxxxxxxxxxxxxx>
Susemail wrote:
> On Tuesday 06 December 2005 14:19, Joe Morris (NTM) wrote:
>> Susemail wrote:
>>> In this case it didn't install in these directories or anywhere else
>>> according to locate and manual inspection.
>> Did you run rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm as root?
> Yes. I always run rpm as root to install.

installing a source rpm as not an administrator action, and so should
_never_ be done as root. Instead, do something like this. Creat this file:

[summer@bilby ~]$ cat .rpmmacros
#%buildroot /tmp/BuildRPM/B%{name}
%_topdir /home/summer/redhat
#%_rpmdir /home/summer/RedHat/RPMS
#%_builddir /tmp/BuildRPM

and create a tree like this:
[summer@bilby ~]$ \ls -d1 redhat/*
[summer@bilby ~]$

_topdir tells rpm where to find the tree, and others (commented here)
can be set to move elements of the tree to other locations.

You can also set these (and other) variables on the commandline using

I heard once that some package, whe built, attempted to run this command:
rm -rf /

doubtless because one of the variables wasn't set. I would find that bad
enough doing it as me, let enough as root. Dones as me, there's some
chance I would see lots of error messages and stop it before it got to
my files.

< Previous Next >
Follow Ups