You are not logged in.
Pages: 1
Hello everybody. I'm learning lately how to do Arch and I downloaded a PKGBUILD and files and ran "makepkg -s" and am getting:
=> 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.
All the compiling I've done before coming to Arch I've done as root so that I can install it. I'm guessing that the problem here is that makepkg uses a fakeroot?? Also I've been using yaourt to build a couple packages and wouldn't it have been building with makepkg as root? Is the system bonked now? Just how can this be catastrophic to my system?
Last edited by Gen2ly (2009-03-15 03:42:34)
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
If you run as root, makepkg can put files anywhere on your system rather than just in $pkgdir where that package is made from. This is stopped by using fakeroot, which is disabled when run as root.
Offline
@Allan
Is it also to guard against malevolent install scripts or are those caught by the fakeroot environment too?
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
If by install scripts, you mean the ones provided in a package source, then yes, it should catch those.
If you mean pacman install scripts, then no, because they are not run until package install.
Offline
For an example of a package that would be moderately bad to build as root, look at exim. The upstream install attempts to create /etc/aliases directly on the build machine instead of putting it in the package. (The PKGBUILD itself installs it where it belongs.) Running the build in fakeroot blocks the bogus /etc/aliases for being created.
Offline
Pages: 1