[arch-general] makepkg running as root
Denis Alessandro Altoe Falqueto
denisfalqueto at gmail.com
Tue Jan 22 05:27:35 EST 2008
On Jan 22, 2008 2:30 AM, richard terry <rterry at gnumed.net> wrote:
> On Tue, 22 Jan 2008 02:42:10 pm you wrote:
> > On Jan 21, 2008 9:33 PM, richard terry <rterry at gnumed.net> wrote:
> > > Sometimes I build packages from AUR, and (obviously wrongly), do this as
> > > root.
> > >
> > > Today I got this message:
> > >
> > > ==> ERROR: Running makepkg as root is a BAD idea and can cause
> > > permanent, catastrophic damage to your system. If you
> > > wish to run as root, please use the --asroot option.
> > >
> > > Can someone explain.
> >
> > What's to explain that that message didn't already explain?
>
> Just what it could do to your system.
>
> See the attatched PKGBUILD (which I adapted from an old one in AuR)
>
> I tried to compile it as myself, and it crashed at the end of the build,
> (sorry didn't keep messages), saying something about not being able to write
> to some directory or other (ok, so I'm not a geek!!!). When I re-built it as
> root it worked fine.
>
> BTW, could you/someone checkout this PKGBUILD file and tell me what's wrong
> with the way I've adapted it (I'm assuming its not correct, though it works
> as I did it with no understanding of what I'm doing.
>
> Thanks.
>
> Richard
>
I can't see any problems with it, related to your error messages.
Indeed, the error you reported can be related with the user that
created the directory where you are building the package (the
directory that contains PKGBUILD). If you created it as root, it will
be owned by root and you probably will not be able to create anything
inside it as a normal user.
I had this same problem yesterday and decided to use the option
--asroot because I was sure that the PKGBUILD was ok and would not
hurt my system in anyway (my lazynes didn't let me change the owner
nor the permissions of the directory). I think the better solution
would be to change the permissions or the owner of the directory so
that you can write on it normally, but if you are in a hurry, you can
use that option and it will work fine. Before pacman 3.1 I created all
my personal packages as root and now I will have to correct my
/var/abs/local tree.
Hope that helps.
--
-------------------------------------------
Denis A. Altoe Falqueto
-------------------------------------------
More information about the arch-general
mailing list