<br><br><div><span class="gmail_quote">On 5/6/07, <b class="gmail_sendername">Iskar Enev</b> &lt;<a href="mailto:iskar.enev@gmail.com">iskar.enev@gmail.com</a>&gt; 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 &#39;make install&#39; 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 &quot;split&quot; in<br>two parts - first, run as user, before the &#39;makepkg&#39; command and second<br>one, run as root, where one changes the ownership and permissions of
<br>files and&nbsp;&nbsp;directories and runs &#39;makepkg.&#39;<br><br>Of course there would be some problems - such script will require su or<br>sudo, and if the &#39;make install&#39; 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&#39;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&nbsp;  (available from slacbuilds - contributed by me :-), you can avoid these problems.
<br>If you don&#39;t heard about fakeroot before, shortly it gives you a fake root environment, where everything <br>works as you were root, but you can&#39;t write the places where you - as a user - has no rights.<br>So simply build with the command: 
<br>prompt&gt; fakeroot ./package.SlackBuild<br>and you are safe.<br><br>To tell the truth there are a very few exceptions which can&#39;t be built with fakeroot, but at least 95% is good.<br><br><br>Ferenc<br><br><br><br>
<br><br><br><br></div><br></div><br><br>