<br><br><div><span class="gmail_quote">On 5/6/07, <b class="gmail_sendername">Iskar Enev</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>I friend of mine has brought up a question about the SlackBuilds and i<br>think he may be right.<br><br>The scripts, the way they are made by Patrick and by <a href="http://slackbuilds.org">slackbuilds.org</a>
,<br>are supposed to be run as root. Running 'make install' as root could<br>pose security issues, at least - some sources with bad Makefiles could<br>place files outside $DESTDIR without the package builder be aware of it.
<br><br>As user this problem can be avoided, but the script has to be "split" in<br>two parts - first, run as user, before the 'makepkg' command and second<br>one, run as root, where one changes the ownership and permissions of
<br>files and directories and runs 'makepkg.'<br><br>Of course there would be some problems - such script will require su or<br>sudo, and if the 'make install' command creates some special ownership<br>the package builder has to fix it manually. Example for the latter -
<br>mysql and the ownership of /var/lib/mysql.<br><br>I'm not aware if that has been discussed previously, or is considered as<br>a minor problem, but let me know of your opinion anyway.</blockquote><div><br><br>By using fakeroot (available from slacbuilds - contributed by me :-), you can avoid these problems.
<br>If you don't heard about fakeroot before, shortly it gives you a fake root environment, where everything <br>works as you were root, but you can't write the places where you - as a user - has no rights.<br>So simply build with the command:
<br>prompt> fakeroot ./package.SlackBuild<br>and you are safe.<br><br>To tell the truth there are a very few exceptions which can't be built with fakeroot, but at least 95% is good.<br><br><br>Ferenc<br><br><br><br>