Package review requested: mock 0.2 and yum-utils 0.2
Michael A. Peters
mpeters at mac.com
Sun Jun 5 11:39:02 UTC 2005
On Sun, 2005-06-05 at 11:03 +0100, Paul Howarth wrote:
> On Sun, 2005-06-05 at 09:43 +0200, Aurelien Bompard wrote:
>
> (snip)
>
> > - the checks for '[ "$RPM_BUILD_ROOT" == "/" ]' are useless.
>
> I know this is the "Extras mantra" but why exactly are they useless?
> Clearly it'll make no difference to the Extras buildsystem but if
> someone just downloads the SRPM and then tries building it like this for
> some reason:
>
> # rpmbuild --rebuild --buildroot / some.src.rpm
>
> (yes I know that would be a stupid things to do, but people do stupid
> things)
That will only happen if they do that command and do it as root.
IMHO Fedora/RH could reduce/eliminate that problem by not proving
the /usr/src/rpm/BUILD directory - which would cause rpmbuild to exit
rather quickly. rpm's should not be built as root.
A basic .rpmmacros file and build structure in /etc/skel/ would be a
good thing to add to the Fedora rpm-build rpm as well, so that a newbie,
the same kind of newbie who might make above mistake, and doesn't know
how to set up rpm for user build, won't get a permission denied error
when building their first src.rpm and try it as root.
Another solution would be to patch the %prep script to
execute /bin/false if the buildroot is set to /
Anyway - since (afaik) there isn't a protection in rpm, and even if
there was in Fedora - some people scavenge src.rpm's from distros other
than their own, I don't personally see a problem with a packager taking
that precaution in the spec file.
More information about the fedora-extras-list
mailing list