[arch-general] makepkg running as root
On Tue, 22 Jan 2008 02:42:10 pm you wrote:
On Jan 21, 2008 9:33 PM, richard terry <rterry@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
On Jan 22, 2008 2:30 AM, richard terry <rterry@gnumed.net> wrote:
On Tue, 22 Jan 2008 02:42:10 pm you wrote:
On Jan 21, 2008 9:33 PM, richard terry <rterry@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 -------------------------------------------
On Dienstag, 22. Januar 2008 05:30 richard terry wrote: Only for the stats: This warning is a good idea because that you don't need to be root is one of the big advantages.
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.
Okay, i know that it is now too late but before running makepkg as root i would prefer to see what wants to write in which directory. At example i do this which helps me in the most cases: # makepkg 2>&1 | tee build.log # less build.log And with foreign packages and not so much experience a '|| return 1' after each command plus optional a 'return 1' before the last '}' to test it before making the package could helps you getting more and more familiar with it. But this all be only my 2c. Concrete to your PKGBUILD: It looks harmless but it is a developer snapshot so the error could be inside of what you can't control with your PKGBUILD. See you, Attila
participants (3)
-
Attila
-
Denis Alessandro Altoe Falqueto
-
richard terry