<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>编译点滴 &#187; sandbox</title>
	<atom:link href="http://www.lingcc.com/tag/sandbox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lingcc.com</link>
	<description>编译器、虚拟机、程序设计语言、体系结构、软件调试、操作系统等等</description>
	<lastBuildDate>Sat, 04 Feb 2012 06:56:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Gentoo 沙盘简介</title>
		<link>http://www.lingcc.com/2010/03/07/10707/</link>
		<comments>http://www.lingcc.com/2010/03/07/10707/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 11:06:11 +0000</pubDate>
		<dc:creator>erlv</dc:creator>
				<category><![CDATA[Linux系统]]></category>
		<category><![CDATA[ebuild]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[ld]]></category>
		<category><![CDATA[MPI]]></category>
		<category><![CDATA[portage]]></category>
		<category><![CDATA[sandbox]]></category>
		<category><![CDATA[操作系统 Operating system]]></category>

		<guid isPermaLink="false">http://www.lingcc.com/?p=10707</guid>
		<description><![CDATA[emerge一个软件包时Portage的工作方式: 1,Portage下载源码tar包和补丁(如果需要的话) 2,Portage解压缩tar包到指定位置,所有的编译将在该目录展开,Portage默认使用/var/tmp/portage/packagename/work 3,解压和打补丁(如果需要的话)后(ebuild中的src_unpack()函数),Portage开始编译,一般情况下在特定目录(ebuild使用${WORKDIR}变量指定目录)下执行configure和make命令. 4,编译完成后,portage将所有指定目录下的文件合并到正在运行的系统中.(通常为/,但通过合并时设置ROOT=”/路径”可以修改),为了避免非法或不正确的ebuild对整个文件系统造成不可逆的破坏,我们需要严格限制文件系统的哪个区域允许portage在解压和编译时修改,这就是沙盘工作的路径,默认时,沙盘启动,并限定ebuild(和它执行过程中的明林)都在指定的区域内写磁盘.若ebuild越过沙盘保护的环境,试图在外部区域写磁盘,就构成了沙盘越界. 沙盘的用途: 沙盘是portage用来协助调试ebuild的机制.主要目的是提供一个安全的受保护的环境系统来运行功能未知的程序.实质上,它提供了一个可以用于编译源码包但不会干扰操作系统其他部分运行的环境. 在ebuild的src_unpack,src_compile,src_test和src_install阶段,ebuild.sh都在沙盘内操作. http://bugday.gentoo.org/sandbox.html http://devmanual.gentoo.org/general-concepts/sandbox/index.html 相关文章： 使用crossdev安装龙芯的O32 gnu交叉工具链 Ebuild and emerge gentoo的相关配置-make.conf Gentoo中的交叉编译利器&#8211;crossdev gentoo如何处理被屏蔽(masked)的包 by 杨珂 转自linuxsir 用crossdev装龙芯的n32 gnu交叉工具链<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F01%2F02%2F10570%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ebuild and emerge</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F02%2F27%2F9904%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo的相关配置-make.conf</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gentoo上安装Texlive2009</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F28%2F9963%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F19%2F10892%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">走进Debian和Gentoo中的系统初始化过程</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
<h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/01/07/10594/' rel='bookmark' title='使用crossdev安装龙芯的O32 gnu交叉工具链'>使用crossdev安装龙芯的O32 gnu交叉工具链</a></li>
<li><a href='http://www.lingcc.com/2010/01/02/10570/' rel='bookmark' title='Ebuild and emerge'>Ebuild and emerge</a></li>
<li><a href='http://www.lingcc.com/2008/02/27/9904/' rel='bookmark' title='gentoo的相关配置-make.conf'>gentoo的相关配置-make.conf</a></li>
<li><a href='http://www.lingcc.com/2009/12/31/10534/' rel='bookmark' title='Gentoo中的交叉编译利器&#8211;crossdev'>Gentoo中的交叉编译利器&#8211;crossdev</a></li>
<li><a href='http://www.lingcc.com/2008/03/28/9963/' rel='bookmark' title='gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir'>gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</a></li>
<li><a href='http://www.lingcc.com/2010/01/05/10588/' rel='bookmark' title='用crossdev装龙芯的n32 gnu交叉工具链'>用crossdev装龙芯的n32 gnu交叉工具链</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>emerge一个软件包时Portage的工作方式:<br />
1,Portage下载源码tar包和补丁(如果需要的话)<br />
2,Portage解压缩tar包到指定位置,所有的编译将在该目录展开,Portage默认使用/var/tmp/portage/packagename/work<br />
3,解压和打补丁(如果需要的话)后(ebuild中的src_unpack()函数),Portage开始编译,一般情况下在特定目录(ebuild使用${WORKDIR}变量指定目录)下执行configure和make命令.<br />
4,编译完成后,portage将所有指定目录下的文件合并到正在运行的系统中.(通常为/,但通过合并时设置ROOT=”/路径”可以修改),为了避免非法或不正确的ebuild对整个文件系统造成不可逆的破坏,我们需要严格限制文件系统的哪个区域允许portage在解压和编译时修改,这就是沙盘工作的路径,默认时,沙盘启动,并限定ebuild(和它执行过程中的明林)都在指定的区域内写磁盘.若ebuild越过沙盘保护的环境,试图在外部区域写磁盘,就构成了沙盘越界.<br />
<span id="more-10707"></span><br />
沙盘的用途:<br />
沙盘是portage用来协助调试ebuild的机制.主要目的是提供一个安全的受保护的环境系统来运行功能未知的程序.实质上,它提供了一个可以用于编译源码包但不会干扰操作系统其他部分运行的环境.</p>
<p>在ebuild的src_unpack,src_compile,src_test和src_install阶段,ebuild.sh都在沙盘内操作.</p>
<p>http://bugday.gentoo.org/sandbox.html</p>
<p>http://devmanual.gentoo.org/general-concepts/sandbox/index.html</p>
<div style=float:left><!-- JiaThis Button BEGIN -->
<div id="jiathis_style_32x32">
	<a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_renren"></a>
	<a class="jiathis_button_kaixin001"></a>
	<a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<!-- JiaThis Button END --></div><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F01%2F02%2F10570%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ebuild and emerge</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F02%2F27%2F9904%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo的相关配置-make.conf</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F04%2F09%2F10732%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Gentoo上安装Texlive2009</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2008%2F03%2F28%2F9963%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.lingcc.com%2F2010%2F05%2F19%2F10892%2F&from=http%3A%2F%2Fwww.lingcc.com%2F2010%2F03%2F07%2F10707%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">走进Debian和Gentoo中的系统初始化过程</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><p><h3>相关文章：</h3><ul>
<li><a href='http://www.lingcc.com/2010/01/07/10594/' rel='bookmark' title='使用crossdev安装龙芯的O32 gnu交叉工具链'>使用crossdev安装龙芯的O32 gnu交叉工具链</a></li>
<li><a href='http://www.lingcc.com/2010/01/02/10570/' rel='bookmark' title='Ebuild and emerge'>Ebuild and emerge</a></li>
<li><a href='http://www.lingcc.com/2008/02/27/9904/' rel='bookmark' title='gentoo的相关配置-make.conf'>gentoo的相关配置-make.conf</a></li>
<li><a href='http://www.lingcc.com/2009/12/31/10534/' rel='bookmark' title='Gentoo中的交叉编译利器&#8211;crossdev'>Gentoo中的交叉编译利器&#8211;crossdev</a></li>
<li><a href='http://www.lingcc.com/2008/03/28/9963/' rel='bookmark' title='gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir'>gentoo如何处理被屏蔽(masked)的包   by 杨珂 转自linuxsir</a></li>
<li><a href='http://www.lingcc.com/2010/01/05/10588/' rel='bookmark' title='用crossdev装龙芯的n32 gnu交叉工具链'>用crossdev装龙芯的n32 gnu交叉工具链</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.lingcc.com/2010/03/07/10707/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

