Proposal: rpm-4.2.2 should refuse to build as root

Matthias Saou thias at spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net
Wed Jan 7 17:24:48 UTC 2004


Michael K. Johnson wrote :

> On Wed, Dec 31, 2003 at 02:42:00AM -1000, Warren Togami wrote:
> > [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf
> > $RPM_BUILD_ROOT This would also completely solve this silly urban
> > legend surrounding this ugly construct found within many spec files. 
> > If users cannot build as root, then BuildRoot being equal to "/" (which
> > is incredibly unlikely to begin with) cannot destroy their system.
> 
> Uh, it can still remove *their* files, which would still be pretty
> destructive.  I'd say that piece should stay regardless.

Every time I've seen it, it simply *can't* be destructive :

BuildRoot: %{_tmppath}/%{name}-%{version}

Now, if the %{buildroot} above can be "/", given that it already contains
at least the dash from in between the name and version, please let me know!
;-)

In short : It is an urban legend.

Matthias

-- 
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Fedora Core release 1 (Yarrow) - Linux kernel 2.4.22-1.2115.nptl
Load : 0.89 0.99 1.02





More information about the fedora-devel-list mailing list