<?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>dipplum.com &#187; Debian</title>
	<atom:link href="http://dipplum.com/tag/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://dipplum.com</link>
	<description>Be  the change you wanna see in the world</description>
	<lastBuildDate>Sat, 12 Nov 2011 07:38:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>usplash主题制作问题</title>
		<link>http://dipplum.com/2009/08/20/usplash-theme-problem/</link>
		<comments>http://dipplum.com/2009/08/20/usplash-theme-problem/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 17:08:49 +0000</pubDate>
		<dc:creator>li</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[usplash]]></category>

		<guid isPermaLink="false">http://dipplum.com/2009/08/20/usplash-theme-problem/</guid>
		<description><![CDATA[Debian下目前有3个可以用的usplash主题包，分别是usplash-theme-debian，debian-edu-artwork-usplash，brdesktop-artwork-usplash。目前在lenny下制作出来的效果都有问题。截图： 为了解决这个问题，我先分析了usplash主题的制作原理。usplash的主题制作过程大概如下： 由一个svg图，分别生成1024&#215;876，800&#215;600，640&#215;480等分辨率下的背景图片。其实也可以不用svg，但非矢量图缩放效果可能不佳。也可以手动PS不同分辨率下的背景图片，也就不用借助svg的缩放了；下图是一个背景图: 编辑生成一个进度条的png文件。图像中除进度条部分，其他应该是透明色；下图是用gimp编辑进度条的透明色效果: 将不同分辨率下的背景图和进度条叠加，生成2种叠加后的进度条效果，分别代表&#34;进度为0&#34;和&#34;进度为100%&#34;两种状态； 统一所有图片的调色板。包括不同分辨率下的背景图、进度条效果图。下面是用gimp编辑图片看到的调色板: 将png图片转换为c文件 将c文件编译链接成so文件 而产生前面截图那样的错误，是因为图片的调色板没有统一。而调色板不统一的原因，是因为usplash用的图片转换工具修改了统一调色板的方法。 本来，usplash 用的统一调色板的方法，是通过imagemagick提供的convert命令，先将png转换到gif，再转换回png的方法。(可能是因为convert对png格式的调色板支持不好)。方法如下: convert image.png +dither -map ./cmap.gif gif:- &#124; convert gif:- image.png 后来这种方法不管用了。原因是从gif转回png格式时，convert不再保留调色板。 经过网上的搜索，发现新版本的imagemagick应该用下面的命令设置调色板： convert +dither image.png -type Palette -depth 8 -map cmap.gif image.png 修改Makefile中相关语句后，再次编译usplash主题，就会出现正确的效果了: 附usplash-theme-debian的patch： --- a/Makefile 2009-08-20 00:51:49.000000000 +0800 +++ b/Makefile 2009-08-20 00:34:28.000000000 +0800 @@ -88,8 +88,8 @@ &#160; %.c: %.png cmap.gif $&#40;E&#41; &#34; [...]]]></description>
			<content:encoded><![CDATA[<p>Debian下目前有3个可以用的usplash主题包，分别是usplash-theme-debian，debian-edu-artwork-usplash，brdesktop-artwork-usplash。目前在lenny下制作出来的效果都有问题。截图：</p>
<p><a href="http://dipplum.com/files/2009/08/usplash.png" rel="shadowbox[sbpost-366];player=img;"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="usplash" border="0" alt="usplash" src="http://dipplum.com/files/2009/08/usplash_thumb.png" width="627" height="484" /></a></p>
<p>为了解决这个问题，我先分析了usplash主题的制作原理。usplash的主题制作过程大概如下：</p>
<ul>
<li>由一个svg图，分别生成1024&#215;876，800&#215;600，640&#215;480等分辨率下的背景图片。其实也可以不用svg，但非矢量图缩放效果可能不佳。也可以手动PS不同分辨率下的背景图片，也就不用借助svg的缩放了；下图是一个背景图:</li>
</ul>
<p><a href="http://dipplum.com/files/2009/08/background_640x480.png" rel="shadowbox[sbpost-366];player=img;"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="background_640x480" border="0" alt="background_640x480" src="http://dipplum.com/files/2009/08/background_640x480_thumb.png" width="644" height="484" /></a> </p>
<ul>
<li>编辑生成一个进度条的png文件。图像中除进度条部分，其他应该是透明色；下图是用gimp编辑进度条的透明色效果:</li>
</ul>
<p><a href="http://dipplum.com/files/2009/08/progress.png" rel="shadowbox[sbpost-366];player=img;"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="progress" border="0" alt="progress" src="http://dipplum.com/files/2009/08/progress_thumb.png" width="501" height="277" /></a> </p>
<ul>
<li>将不同分辨率下的背景图和进度条叠加，生成2种叠加后的进度条效果，分别代表&quot;进度为0&quot;和&quot;进度为100%&quot;两种状态；</li>
</ul>
<p><a href="http://dipplum.com/files/2009/08/progressbg_640x480.png" rel="shadowbox[sbpost-366];player=img;"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="progressbg_640x480" border="0" alt="progressbg_640x480" src="http://dipplum.com/files/2009/08/progressbg_640x480_thumb.png" width="404" height="158" /></a> </p>
<p><a href="http://dipplum.com/files/2009/08/progressfg_640x480.png" rel="shadowbox[sbpost-366];player=img;"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="progressfg_640x480" border="0" alt="progressfg_640x480" src="http://dipplum.com/files/2009/08/progressfg_640x480_thumb.png" width="404" height="158" /></a> </p>
<ul>
<li><font color="#0000ff">统一所有图片的调色板。包括不同分辨率下的背景图、进度条效果图</font>。下面是用gimp编辑图片看到的调色板:</li>
</ul>
<p><a href="http://dipplum.com/files/2009/08/palette.png" rel="shadowbox[sbpost-366];player=img;"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="palette" border="0" alt="palette" src="http://dipplum.com/files/2009/08/palette_thumb.png" width="466" height="631" /></a> </p>
<ul>
<li>将png图片转换为c文件</li>
<li>将c文件编译链接成so文件</li>
</ul>
<p>而产生前面截图那样的错误，是因为图片的调色板没有统一。而调色板不统一的原因，是因为usplash用的图片转换工具修改了统一调色板的方法。 </p>
<p>本来，usplash 用的统一调色板的方法，是通过imagemagick提供的convert命令，先将png转换到gif，再转换回png的方法。(可能是因为convert对png格式的调色板支持不好)。方法如下:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">convert image.png +dither <span style="color: #660033;">-map</span> .<span style="color: #000000; font-weight: bold;">/</span>cmap.gif gif:-
  <span style="color: #000000; font-weight: bold;">|</span> convert gif:- image.png</pre></div></div>

<p>后来这种方法不管用了。原因是从gif转回png格式时，convert不再保留调色板。 </p>
<p>经过网上的搜索，<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467265">发现</a>新版本的imagemagick应该用下面的命令设置调色板：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">convert +dither image.png <span style="color: #660033;">-type</span> Palette <span style="color: #660033;">-depth</span> <span style="color: #000000;">8</span> <span style="color: #660033;">-map</span> cmap.gif image.png</pre></div></div>

<p>修改Makefile中相关语句后，再次编译usplash主题，就会出现正确的效果了:</p>
<p><a href="http://dipplum.com/files/2009/08/usplashgood.png" rel="shadowbox[sbpost-366];player=img;"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="usplashgood" border="0" alt="usplashgood" src="http://dipplum.com/files/2009/08/usplashgood_thumb.png" width="627" height="484" /></a> </p>
<p>附usplash-theme-debian的patch：</p>

<div class="wp_syntax"><div class="code"><pre class="make" style="font-family:monospace;"><span style="color: #004400;">---</span> a<span style="color: #004400;">/</span>Makefile	<span style="color: #CC2200;">2009</span><span style="color: #004400;">-</span>08<span style="color: #004400;">-</span><span style="color: #CC2200;">20</span> 00<span style="color: #004400;">:</span><span style="color: #CC2200;">51</span><span style="color: #004400;">:</span><span style="color: #CC2200;">49.000000000</span> <span style="color: #004400;">+</span>0800
<span style="color: #004400;">+++</span> b<span style="color: #004400;">/</span>Makefile	<span style="color: #CC2200;">2009</span><span style="color: #004400;">-</span>08<span style="color: #004400;">-</span><span style="color: #CC2200;">20</span> 00<span style="color: #004400;">:</span><span style="color: #CC2200;">34</span><span style="color: #004400;">:</span><span style="color: #CC2200;">28.000000000</span> <span style="color: #004400;">+</span>0800
<span style="color: #004400;">@@</span> <span style="color: #004400;">-</span><span style="color: #CC2200;">88</span><span style="color: #004400;">,</span><span style="color: #CC2200;">8</span> <span style="color: #004400;">+</span><span style="color: #CC2200;">88</span><span style="color: #004400;">,</span><span style="color: #CC2200;">8</span> <span style="color: #004400;">@@</span>
&nbsp;
 <span style="color: #004400;">%.</span>c<span style="color: #004400;">:</span> <span style="color: #004400;">%.</span>png cmap<span style="color: #004400;">.</span>gif
 	<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">E</span><span style="color: #004400;">&#41;</span> <span style="color: #CC2200;">&quot;  PNGSRC  &quot;</span> <span style="color: #000088; font-weight: bold;">$@</span>
<span style="color: #004400;">-</span>	<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">Q</span><span style="color: #004400;">&#41;</span> convert <span style="color: #000088; font-weight: bold;">$&lt;</span> <span style="color: #004400;">+</span>dither <span style="color: #004400;">-</span>map cmap<span style="color: #004400;">.</span>gif gif<span style="color: #004400;">:-</span> <span style="color: #004400;">|</span> \
<span style="color: #004400;">-</span>	     convert gif<span style="color: #004400;">:-</span> <span style="color: #000088; font-weight: bold;">$&lt;</span>
<span style="color: #004400;">+</span>	<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">Q</span><span style="color: #004400;">&#41;</span> convert <span style="color: #004400;">+</span>dither <span style="color: #000088; font-weight: bold;">$&lt;</span> <span style="color: #004400;">-</span>type Palette <span style="color: #004400;">-</span>depth <span style="color: #CC2200;">8</span> <span style="color: #004400;">-</span>map cmap<span style="color: #004400;">.</span>gif <span style="color: #000088; font-weight: bold;">$&lt;</span><span style="color: #004400;">.</span>new
<span style="color: #004400;">+</span>	<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">Q</span><span style="color: #004400;">&#41;</span> mv <span style="color: #000088; font-weight: bold;">$&lt;</span><span style="color: #004400;">.</span>new <span style="color: #000088; font-weight: bold;">$&lt;</span>
 	<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">Q</span><span style="color: #004400;">&#41;</span> pngtousplash <span style="color: #000088; font-weight: bold;">$&lt;</span> <span style="color: #004400;">&gt;</span> <span style="color: #000088; font-weight: bold;">$@</span>
&nbsp;
 <span style="color: #339900; font-style: italic;">#cmap.gif: background.svg progress.png</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://dipplum.com/2009/08/20/usplash-theme-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>定制 Debian Live</title>
		<link>http://dipplum.com/2009/06/20/customizing-debian-live/</link>
		<comments>http://dipplum.com/2009/06/20/customizing-debian-live/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 08:47:38 +0000</pubDate>
		<dc:creator>li</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[debian-live]]></category>

		<guid isPermaLink="false">http://dipplum.com/2009/06/20/customizing-debian-live/</guid>
		<description><![CDATA[Debian Live 是一款制作可从移动介质直接启动的 Linux 系统的工具，支持生成 iso 镜像，USB 磁盘镜像和 NFS 镜像。 Debian Live 定制性很强，下面简单介绍几项定制内容： 1. 定制 Debian Mirror 地址 如果你的工作机无法访问官方 mirror，一定要通过下面 lh_config 的 5 个参数，配置可以访问的 mirror： lh_config &#91;-m&#124;--mirror-bootstrap URL&#93; &#91;--mirror-binary URL&#93; &#91;--mirror-binary-security URL&#93; &#91;--mirror-chroot URL&#93; &#91;--mirror-chroot-security URL&#93; 2. 定制 syslinux splash 图像 syslinux 使用一种特殊的图像格式（RLE 或 LSS），需要用下面的方法准备： 用 GIMP 编辑图像，不要超过 640&#215;400。 设置为 14 Indexed Color。如果图像已经为 Indexed Color，但超过 [...]]]></description>
			<content:encoded><![CDATA[<p>Debian Live 是一款制作可从移动介质直接启动的 Linux 系统的工具，支持生成 iso 镜像，USB 磁盘镜像和 NFS 镜像。</p>
<p>Debian Live 定制性很强，下面简单介绍几项定制内容：</p>
<p><strong>1. 定制 Debian Mirror 地址</strong></p>
<p>如果你的工作机无法访问官方 mirror，一定要通过下面 lh_config 的 5 个参数，配置可以访问的 mirror：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">lh_config
            <span style="color: #7a0874; font-weight: bold;">&#91;</span>-m<span style="color: #000000; font-weight: bold;">|</span>--mirror-bootstrap URL<span style="color: #7a0874; font-weight: bold;">&#93;</span>
            <span style="color: #7a0874; font-weight: bold;">&#91;</span>--mirror-binary URL<span style="color: #7a0874; font-weight: bold;">&#93;</span>
            <span style="color: #7a0874; font-weight: bold;">&#91;</span>--mirror-binary-security URL<span style="color: #7a0874; font-weight: bold;">&#93;</span>
            <span style="color: #7a0874; font-weight: bold;">&#91;</span>--mirror-chroot URL<span style="color: #7a0874; font-weight: bold;">&#93;</span>
            <span style="color: #7a0874; font-weight: bold;">&#91;</span>--mirror-chroot-security URL<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p><strong>2. 定制 syslinux splash 图像</strong></p>
<p>syslinux 使用一种特殊的图像格式（RLE 或 LSS），需要用下面的方法准备：</p>
<ul>
<li>用 GIMP 编辑图像，不要超过 640&#215;400。</li>
<li>设置为 14 Indexed Color。如果图像已经为 Indexed Color，但超过 14 种，应该先转换成 RGB 格式，再转换回 14 Indexed Color</li>
<li>另存为 PPM 格式</li>
<li>使用 syslinux 包中的 ppmtolss16，将 PPM 图像转换成 LSS</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ppmtolss16 <span style="color: #ff0000;">'#d0d0d0=7'</span> <span style="color: #000000; font-weight: bold;">&lt;</span> splash.ppm <span style="color: #000000; font-weight: bold;">&gt;</span> splash.rle</pre></div></div>

</ul>
<p>得到 LSS 格式的图像之后，需要：</p>
<ul>
<li>放入 config/binary_syslinux/ 下，假设文件名为 splash.rle</li>
<li>同时修改 config/binary，设置：</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">LH_SYSLINUX_SPLASH</span>=<span style="color: #ff0000;">&quot;config/binary_syslinux/splash.rle&quot;</span></pre></div></div>

</ul>
<p>然后 lh_clean &amp;&amp; lh_build 生成新的镜像。</p>
<p><strong>3. 定制默认用户配置</strong></p>
<p>Debian 以及其他 Linux 发行版在创建新用户时，会将 /etc/skel 目录下的所有文件复制到新用户 HOME 目录下。借助这一特色，可以通过将配置文件放在 /etc/skel 目录下，起到默认配置的作用。</p>
<p>Debian Live 系统每次启动时会生成全新用户 HOME 目录，同样会拷贝 /etc/skel 目录下的所有文件。因此需要将配置文件放入 Debian Live 系统的 /etc/skel 目录下。</p>
<p>在 config/chroot_local-includes/ 目录下，创建 etc/skel 子目录，在生成 binary 时，这些文件会自动拷贝到文件系统上。</p>
<p>lh_clean &amp;&amp; lh_build 生成新的镜像。</p>
<p><strong>4. 定制 splashy</strong></p>
<p>splashy 可以在系统启动时，显示图形化的进度栏。splashy 的定制过程如下：</p>
<ul>
<li>创建 config/chroot_local-hooks/01-splash.sh：</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
splashy_config <span style="color: #660033;">-s</span> debian-moreblue <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #c20cb9; font-weight: bold;">true</span>
update-initramfs <span style="color: #660033;">-u</span> <span style="color: #660033;">-k</span> all</pre></div></div>

<li>chmod +x config/chroot_local-hooks/01-splash.sh</li>
<li>修改 config/chroot 文件，LH_PACKAGES 后增加两个包：splashy splashy-themes</li>
</ul>
<p>最后，lh_clean &amp;&amp; lh_build 生成新的镜像。</p>
<p><strong>5. 定制 usplash</strong></p>
<p>usplash 与 splash 类似，同样可以显示图形化启动进度。由于 splashy 不支持 initramfs，有一部分启动过程无法图形化，而 usplash 能弥补这一缺陷。</p>
<ul>
<li>参照 splashy 前两步，生成同样的 01-splash.sh 可执行脚本</li>
<li>修改config/chroot 文件，LH_PACKAGES 后增加两个包：usplashy usplash-theme-debian</li>
</ul>
<ul>最后，lh_clean &amp;&amp; lh_build 生成新的镜像。</ul>
<p><strong>6. 最小化生成 image</strong></p>
<p>通常减少 Debian/Linux 系统空间的方法无外乎：1 删除不用的 locale 信息，2 删除 APT 缓存。可以参照上面定制过程，在 config/chroot_local-hooks/ 目录下，创建 hooks 脚本实现。</p>
<ul>
<li>首先，修改config/chroot 文件，LH_PACKAGES 后添加 localepurge</li>
<li>创建 config/chroot_local-hooks/99-clean.sh 文件：</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>lists<span style="color: #000000; font-weight: bold;">/</span>mirror.ivic.org.cn<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/*</span>.bin
&nbsp;
debconf-set-selections <span style="color: #cc0000; font-style: italic;">&lt;&lt;EOF
debconf localepurge/nopurge select en, en_US.UTF-8
debconf localepurge/nopurge seen true
&nbsp;
debconf localepurge/mandelete select true
debconf localepurge/mandelete seen true
&nbsp;
debconf localepurge/dontbothernew select false
debconf localepurge/dontbothernew seen true
&nbsp;
debconf localepurge/showfreedspace select true
debconf localepurge/showfreedspace seen true
&nbsp;
debconf localepurge/verbose select false
debconf localepurge/verbose seen true
&nbsp;
debconf localepurge/quickndirtycalc select true
debconf localepurge/quickndirtycalc seen true
EOF</span>
&nbsp;
dpkg-reconfigure <span style="color: #660033;">-u</span> <span style="color: #660033;">-phigh</span> localepurge</pre></div></div>

<li>chmod +x config/chroot_local-hooks/99-clean.sh</li>
</ul>
<p>最后 lh_clean &amp;&amp; lh_build 生成新的镜像。</p>
<p><strong>7. 使用 fluxbox</strong></p>
<p>fluxbox 是一款小巧的 X Window Manager。生成使用 fluxbox 的 Debian Live 系统的过程如下：</p>
<ul>
<li>修改config/chroot 文件，LH_PACKAGES_LISTS 后添加 fluxbox（替换 xfce/gnome/kde 等）</li>
<li>创建 chroot_local-packageslists/fluxbox，内容如下：</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## LH: Fluxbox</span>
<span style="color: #666666; font-style: italic;">#include &lt;standard-x11&gt;</span>
&nbsp;
fluxbox gdm
<span style="color: #666666; font-style: italic;">##desktop-base</span></pre></div></div>

</ul>
<p>最后 lh_clean &amp;&amp; lh_build 生成新的镜像。</p>
]]></content:encoded>
			<wfw:commentRss>http://dipplum.com/2009/06/20/customizing-debian-live/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>debconf 和 dpkg-preconfgure 的用法</title>
		<link>http://dipplum.com/2009/06/20/debconf-dpkg-preconfigure-usage/</link>
		<comments>http://dipplum.com/2009/06/20/debconf-dpkg-preconfigure-usage/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 06:15:42 +0000</pubDate>
		<dc:creator>li</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[debconf]]></category>
		<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://dipplum.com/2009/06/20/debconf-dpkg-preconfigure-usage/</guid>
		<description><![CDATA[debconf 是 Debian 使用的一种软件包配置方法。支持 debconf 的软件在安装时，会弹出对话框，要求用户输入一定配置参数。 在非交互式环境下安装这类软件，用户无法在线提供软件的配置项。因此用户需要通过 dpkg-preconfigure 预先指定软件配置。 目前 dpkg-preconfigure 的用法比较奇怪。没有非常完美的用法，总觉得怪怪的。下面这个方案应该是我从网上可以找到，综合比较靠谱的。 1. 导入 debconf 模板 debconf 模板包含软件的配置项的名称、说明、默认值等内容。一般来说 debconf 模板是包含在 deb 包中。由于需要在安装 deb 时自动提供软件配置，所以需要在安装 deb 包之前，提前导入 debconf 模板。过程如下。 apt-get clean (清除 apt/cache 中缓存的 Debian 包) apt-get install -d mysql-server-5.0 (下载 mysql-server-5.0，不安装) dpkg-preconfigure /var/cache/apt/archives/mysql-server-5.0*.deb (导入 debconf 模板) 不完美的地方就在这里：导入一个软件的配置项，竟然要用三个命令。总觉得应该一个命令搞定。。。 2. 指定 debconf 配置 模板导入之后，可以使用 debconf-set-selections 设置软件配置。用下面的命令： # [...]]]></description>
			<content:encoded><![CDATA[<p>debconf 是 Debian 使用的一种软件包配置方法。支持 debconf 的软件在安装时，会弹出对话框，要求用户输入一定配置参数。</p>
<p>在非交互式环境下安装这类软件，用户无法在线提供软件的配置项。因此用户需要通过 dpkg-preconfigure 预先指定软件配置。 </p>
<p>目前 dpkg-preconfigure 的用法比较奇怪。没有非常完美的用法，总觉得怪怪的。下面这个方案应该是我从网上可以找到，综合比较靠谱的。</p>
<p><strong>1. 导入 debconf 模板</strong></p>
<p>debconf 模板包含软件的配置项的名称、说明、默认值等内容。一般来说 debconf 模板是包含在 deb 包中。由于需要在安装 deb 时自动提供软件配置，所以需要在安装 deb 包之前，提前导入 debconf 模板。过程如下。</p>
<ul>
<li>apt-get clean (清除 apt/cache 中缓存的 Debian 包) </li>
<li>apt-get install -d mysql-server-5.0 (下载 mysql-server-5.0，不安装) </li>
<li>dpkg-preconfigure /var/cache/apt/archives/mysql-server-5.0*.deb (导入 debconf 模板) </li>
</ul>
<p>不完美的地方就在这里：导入一个软件的配置项，竟然要用三个命令。总觉得应该一个命令搞定。。。 </p>
<p><strong>2. 指定 debconf 配置</strong></p>
<p>模板导入之后，可以使用 debconf-set-selections 设置软件配置。用下面的命令：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># debconf-set-selections</span>
<span style="color: #c20cb9; font-weight: bold;">debconf</span> mysql-server-<span style="color: #000000;">5.0</span><span style="color: #000000; font-weight: bold;">/</span>start_on_boot <span style="color: #000000; font-weight: bold;">select</span> <span style="color: #c20cb9; font-weight: bold;">true</span>
<span style="color: #c20cb9; font-weight: bold;">debconf</span> mysql-server-<span style="color: #000000;">5.0</span><span style="color: #000000; font-weight: bold;">/</span>start_on_boot seen <span style="color: #c20cb9; font-weight: bold;">true</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>ctrl+d<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>上面命令将 mysql-server-5.0/start_on_boot 设置为 true，并且设置配置项已经显示（区分配置项的值是默认值，还是用户输入值）。一般来说，软件安装时，只会显示 seen 为 false 的那些配置参数。</p>
<p>如果不知道软件有哪些配置选项，可以用 debconf-show 看到：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># debconf-show mysql-server-5.0</span>
  mysql-server<span style="color: #000000; font-weight: bold;">/</span>root_password_again: <span style="color: #7a0874; font-weight: bold;">&#40;</span>password omitted<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">*</span> mysql-server<span style="color: #000000; font-weight: bold;">/</span>root_password: <span style="color: #7a0874; font-weight: bold;">&#40;</span>password omitted<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  mysql-server-<span style="color: #000000;">5.0</span><span style="color: #000000; font-weight: bold;">/</span>really_downgrade: <span style="color: #c20cb9; font-weight: bold;">false</span>
  mysql-server-<span style="color: #000000;">5.0</span><span style="color: #000000; font-weight: bold;">/</span>need_sarge_compat: <span style="color: #c20cb9; font-weight: bold;">false</span>
  mysql-server-<span style="color: #000000;">5.0</span><span style="color: #000000; font-weight: bold;">/</span>start_on_boot: <span style="color: #c20cb9; font-weight: bold;">true</span>
  mysql-server<span style="color: #000000; font-weight: bold;">/</span>error_setting_password:
  mysql-server-<span style="color: #000000;">5.0</span><span style="color: #000000; font-weight: bold;">/</span>nis_warning:
  mysql-server-<span style="color: #000000;">5.0</span><span style="color: #000000; font-weight: bold;">/</span>postrm_remove_databases: <span style="color: #c20cb9; font-weight: bold;">false</span>
  mysql-server-<span style="color: #000000;">5.0</span><span style="color: #000000; font-weight: bold;">/</span>need_sarge_compat_done: <span style="color: #c20cb9; font-weight: bold;">true</span>
  mysql-server<span style="color: #000000; font-weight: bold;">/</span>password_mismatch:</pre></div></div>

<p>上面每行输出中第一个 * 表示 seen 为 true，没有星号表示 seen 为 false；每行输出中，冒号前面配置项，冒号后是值。 </p>
<p><strong>3. 安装软件</strong></p>
<p>如果所有的 debconf 选项都通过上面的方法设置完毕。用下面的方法安装</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mysql-server-<span style="color: #000000;">5.0</span></pre></div></div>

<p>此时应该不会显示 debconf 的对话框。</p>
]]></content:encoded>
			<wfw:commentRss>http://dipplum.com/2009/06/20/debconf-dpkg-preconfigure-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>检查 Debian 服务器的 exim 邮件队列</title>
		<link>http://dipplum.com/2009/04/01/debian-check-exim-queue/</link>
		<comments>http://dipplum.com/2009/04/01/debian-check-exim-queue/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 04:06:39 +0000</pubDate>
		<dc:creator>li</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://dipplum.com/2009/04/01/debian-check-exim-queue/</guid>
		<description><![CDATA[exim 是 Debian 系统预装的邮件服务器。在系统使用过程中，可能会出现网络故障，导致一些邮件进入 exim 重试队列，每次重发失败都会给管理员发信，非常讨厌。 从网上找了一个 exim 秘籍，非常有用。只用了有限几个命令就可以排除上述故障。 显示 exim 队列中邮件数目 exim -bpc 显示 exim 队列中邮件信息，邮件 id 号，收件人信息等 exim -bp 重新发送 exim 队列中的邮件，并显示 SMTP 协议交互 exim -q -v 强制重新发送 exim 队列中的邮件。有些失败邮件设置了下次重试时间，在此之前要强制发送 exim -qf -v 给定邮件 id，删除队列中的邮件。id号通过 -bp 命令可以获得 exim -Mrm &#60;msg-id&#62;]]></description>
			<content:encoded><![CDATA[<p>exim 是 Debian 系统预装的邮件服务器。在系统使用过程中，可能会出现网络故障，导致一些邮件进入 exim 重试队列，每次重发失败都会给管理员发信，非常讨厌。</p>
<p>从网上找了一个 <a href="http://bradthemad.org/tech/notes/exim_cheatsheet.php">exim 秘籍</a>，非常有用。只用了有限几个命令就可以排除上述故障。</p>
<ul>
<li>显示 exim 队列中邮件数目</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-bpc</span></pre></div></div>

<li>显示 exim 队列中邮件信息，邮件 id 号，收件人信息等</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-bp</span></pre></div></div>

<li>重新发送 exim 队列中的邮件，并显示 SMTP 协议交互</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-q</span> <span style="color: #660033;">-v</span></pre></div></div>

<li>强制重新发送 exim 队列中的邮件。有些失败邮件设置了下次重试时间，在此之前要强制发送</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-qf</span> <span style="color: #660033;">-v</span></pre></div></div>

<li>给定邮件 id，删除队列中的邮件。id号通过 -bp 命令可以获得</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-Mrm</span> <span style="color: #000000; font-weight: bold;">&lt;</span>msg-id<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

</ul>
]]></content:encoded>
			<wfw:commentRss>http://dipplum.com/2009/04/01/debian-check-exim-queue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian 下 MacBook 触摸板设置</title>
		<link>http://dipplum.com/2009/03/30/debian-macbook-synaptics/</link>
		<comments>http://dipplum.com/2009/03/30/debian-macbook-synaptics/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 00:43:37 +0000</pubDate>
		<dc:creator>li</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[开源软件]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[MacBook]]></category>

		<guid isPermaLink="false">http://dipplum.com/2009/03/30/debian-macbook-synaptics/</guid>
		<description><![CDATA[窃以为，MacBook 的触摸板是 Apple 人机界面中最不方便的一环，只有一个按键，手感也不如 IBM 的指点杆，没有鼠标情况下，操作非常不方便。 Linux 下的 MacBook 触摸板更是痛中之痛。Linux 下触摸板的驱动是 Synaptics，默认设置下，移动速度很慢，反应不灵敏；用两手指轻敲模拟右键的功能无法使用，不接外接鼠标就没有右键；用着简直抓狂。一直以来用 IBM 笔记本养成的在床上编程的习惯受到了严重挑战。 在新版本的 xorg 的中，可以自动发现硬件设备并自动配置，允许用户使用最小化的 xorg.conf 启动 X。其实就是一个空的 xorg.conf 也能启动。但该功能和现存的 Synaptics 配置方法相抵触，导致 google 上搜到的大部分配置方法都不能成功配置 Synaptics 的参数。 解决方法很简单： 方法1：提供一个完整的，old fashion 的 xorg.conf 文件，尤其要包含 ServerLayout Section，其中要引用 Synaptics Section 方法2：如果仍然希望使用 minimal xorg.conf，应该在 Synaptics Section加上 Option “CorePointer” 很显然，方法2要简单些。下面提供一个用方法2配置的 xorg.conf 文件，包含我的 Synaptics 配置。功能如下 禁用 1 Finger Tap 功能 [...]]]></description>
			<content:encoded><![CDATA[<p>窃以为，MacBook 的触摸板是 Apple 人机界面中最不方便的一环，只有一个按键，手感也不如 IBM 的指点杆，没有鼠标情况下，操作非常不方便。</p>
<p>Linux 下的 MacBook 触摸板更是痛中之痛。Linux 下触摸板的驱动是 Synaptics，默认设置下，移动速度很慢，反应不灵敏；用两手指轻敲模拟右键的功能无法使用，不接外接鼠标就没有右键；用着简直抓狂。一直以来用 IBM 笔记本养成的在床上编程的习惯受到了严重挑战。</p>
<p>在新版本的 xorg 的中，可以自动发现硬件设备并自动配置，允许用户使用最小化的 xorg.conf 启动 X。其实就是一个空的 xorg.conf 也能启动。但该功能和现存的 Synaptics 配置方法相抵触，导致 google 上搜到的大部分配置方法都不能成功配置 Synaptics 的参数。</p>
<p>解决方法很简单：</p>
<ul>
<li>方法1：提供一个完整的，old fashion 的 xorg.conf 文件，尤其要包含 ServerLayout Section，其中要引用 Synaptics Section </li>
<li>方法2：如果仍然希望使用 minimal xorg.conf，应该在 Synaptics Section加上 Option “CorePointer” </li>
</ul>
<p>很显然，方法2要简单些。下面提供一个用方法2配置的 xorg.conf 文件，包含我的 Synaptics 配置。功能如下</p>
<ul>
<li>禁用 1 Finger Tap 功能</li>
<li>2 Finger Tap 对应右键，3 Finger Tap 对应中键(按不出来)，同时点击左上角区域代表中键</li>
<li>触摸板右边和底边分别是垂直和水平滚轮</li>
<li>其他是一些微调参数，主要为了让触摸板更灵敏</li>
</ul>
<p>下面配置应该适用于 Debian Lenny/Squeeze/Sid，代码如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
</pre></td><td class="code"><pre class="xorg_conf" style="font-family:monospace;"><span style="color: #b1b100;">Section</span> <span style="color: #0000ff;">&quot;InputDevice&quot;</span>
    <span style="color: #990000;">Identifier</span> <span style="color: #0000ff;">&quot;Synaptics Touchpad&quot;</span>
    <span style="color: #990000;">Driver</span> <span style="color: #0000ff;">&quot;synaptics&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;SHMConfig&quot;</span> <span style="color: #0000ff;">&quot;on&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;CorePointer&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;LeftEdge&quot;</span> <span style="color: #0000ff;">&quot;121&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;RightEdge&quot;</span> <span style="color: #0000ff;">&quot;1094&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;TopEdge&quot;</span> <span style="color: #0000ff;">&quot;80&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;BottomEdge&quot;</span> <span style="color: #0000ff;">&quot;300&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;FingerLow&quot;</span> <span style="color: #0000ff;">&quot;10&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;FingerHigh&quot;</span> <span style="color: #0000ff;">&quot;15&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;FingerPress&quot;</span> <span style="color: #0000ff;">&quot;256&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;MaxTapTime&quot;</span> <span style="color: #0000ff;">&quot;300&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;MaxTapMove&quot;</span> <span style="color: #0000ff;">&quot;220&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;MaxDoubleTapTime&quot;</span> <span style="color: #0000ff;">&quot;180&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;SingleTapTimeout&quot;</span> <span style="color: #0000ff;">&quot;180&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;ClickTime&quot;</span> <span style="color: #0000ff;">&quot;100&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;FastTaps&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;EmulateMidButtonTime&quot;</span> <span style="color: #0000ff;">&quot;75&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;EmulateTwoFingerMinZ&quot;</span> <span style="color: #0000ff;">&quot;257&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;VertScrollDelta&quot;</span> <span style="color: #0000ff;">&quot;5&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;HorizScrollDelta&quot;</span> <span style="color: #0000ff;">&quot;5&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;VertEdgeScroll&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;HorizEdgeScroll&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;CornerCoasting&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;VertTwoFingerScroll&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;HorizTwoFingerScroll&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;MinSpeed&quot;</span> <span style="color: #0000ff;">&quot;0.493&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;MaxSpeed&quot;</span> <span style="color: #0000ff;">&quot;1.5544&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;AccelFactor&quot;</span> <span style="color: #0000ff;">&quot;0.2&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;TrackstickSpeed&quot;</span> <span style="color: #0000ff;">&quot;40&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;EdgeMotionMinZ&quot;</span> <span style="color: #0000ff;">&quot;30&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;EdgeMotionMaxZ&quot;</span> <span style="color: #0000ff;">&quot;160&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;EdgeMotionMinSpeed&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;EdgeMotionMaxSpeed&quot;</span> <span style="color: #0000ff;">&quot;38&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;EdgeMotionUseAlways&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;UpDownScrolling&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;LeftRightScrolling&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;UpDownScrollRepeat&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;LeftRightScrollRepeat&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;ScrollButtonRepeat&quot;</span> <span style="color: #0000ff;">&quot;100&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;TouchpadOff&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;GuestMouseOff&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;LockedDrags&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;LockedDragTimeout&quot;</span> <span style="color: #0000ff;">&quot;5000&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;RTCornerButton&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;RBCornerButton&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;LTCornerButton&quot;</span> <span style="color: #0000ff;">&quot;2&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;LBCornerButton&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;TapButton1&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;TapButton2&quot;</span> <span style="color: #0000ff;">&quot;3&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;TapButton3&quot;</span> <span style="color: #0000ff;">&quot;2&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;CircularScrolling&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;CircScrollDelta&quot;</span> <span style="color: #0000ff;">&quot;0.1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;CircScrollTrigger&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;CircularPad&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;PalmDetect&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;PalmMinWidth&quot;</span> <span style="color: #0000ff;">&quot;10&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;PalmMinZ&quot;</span> <span style="color: #0000ff;">&quot;200&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;CoastingSpeed&quot;</span> <span style="color: #0000ff;">&quot;0&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;PressureMotionMinZ&quot;</span> <span style="color: #0000ff;">&quot;30&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;PressureMotionMaxZ&quot;</span> <span style="color: #0000ff;">&quot;160&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;PressureMotionMinFactor&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;PressureMotionMaxFactor&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
    <span style="color: #990000;">Option</span> <span style="color: #0000ff;">&quot;GrabEventDevice&quot;</span> <span style="color: #0000ff;">&quot;1&quot;</span>
<span style="color: #b1b100;">EndSection</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://dipplum.com/2009/03/30/debian-macbook-synaptics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Debian 下编译静态链接的 ffmpeg 版本</title>
		<link>http://dipplum.com/2009/03/24/debian-static-ffmpeg/</link>
		<comments>http://dipplum.com/2009/03/24/debian-static-ffmpeg/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 19:39:35 +0000</pubDate>
		<dc:creator>li</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[ffmpeg]]></category>

		<guid isPermaLink="false">http://dipplum.com/2009/03/24/debian-%e4%b8%8b%e7%bc%96%e8%af%91%e9%9d%99%e6%80%81%e9%93%be%e6%8e%a5%e7%9a%84-ffmpeg-%e7%89%88%e6%9c%ac/</guid>
		<description><![CDATA[ffmpeg 是一款开源视频编码转换工具，最近刚刚发布 0.5 版本。ffmpeg 支持 h264，mpeg4，aac，mp3，等多种视频音频编码格式，同时支持 avi，mp4，mov，flv 等多种 container 格式。 Debian 中源中自带 ffmpeg，由于版权问题，只支持很少的几种编解码器，功能非常弱，可用性比较差。Debian Multimedia 项目弥补了这一缺陷，提供了预编译好的支持各种常用格式的 ffmpeg。 由于 Linux 发行版对于动态链接库的使用情有独钟，喜欢用链接到 Shared Object（so）库的方式编译各种软件，Debian 自然也不例外。而 ffmpeg 这款博览各家之长的软件拥有众多的库依赖关系，因此不能单独安装。不同发行版之间，甚至相同发行版的不同版本号之间，ffmpeg 的安装包都是不兼容的。安装起来非常不方便。 花了一周末的时间，使用 Debian 成功编译出静态链接的 ffmpeg 版本，得到脚本如下。下载后在 Debian 中直接运行即可。我在当前 Debian Multimedia 的 ffmpeg-0.5.svn20090318，和 Sid，Squeeze，Lenny 上测试该脚本成功。如果软件下载速度太慢，请自行修改脚本中的 Debian 源 URL。 另外，我用 Intel C Compiler 编译了 ffmpeg 的静态版本，只能运行在 Cuo 2 Duo 之后的芯片上。简单测试了一下，mpeg4 编码大概能比 gcc 版本快 [...]]]></description>
			<content:encoded><![CDATA[<p>ffmpeg 是一款开源视频编码转换工具，最近刚刚发布 0.5 版本。ffmpeg 支持 h264，mpeg4，aac，mp3，等多种视频音频编码格式，同时支持 avi，mp4，mov，flv 等多种 container 格式。</p>
<p>Debian 中源中自带 ffmpeg，由于版权问题，只支持很少的几种编解码器，功能非常弱，可用性比较差。<a href="http://debian-multimedia.org">Debian Multimedia 项目</a>弥补了这一缺陷，提供了预编译好的支持各种常用格式的 ffmpeg。</p>
<p>由于 Linux 发行版对于动态链接库的使用情有独钟，喜欢用链接到 Shared Object（so）库的方式编译各种软件，Debian 自然也不例外。而 ffmpeg 这款博览各家之长的软件拥有众多的库依赖关系，因此不能单独安装。不同发行版之间，甚至相同发行版的不同版本号之间，ffmpeg 的安装包都是不兼容的。安装起来非常不方便。</p>
<p>花了一周末的时间，使用 Debian 成功编译出静态链接的 ffmpeg 版本，得到脚本如下。下载后在 Debian 中直接运行即可。我在当前 Debian Multimedia 的 ffmpeg-0.5.svn20090318，和 Sid，Squeeze，Lenny 上测试该脚本成功。如果软件下载速度太慢，请自行修改脚本中的 Debian 源 URL。</p>
<p>另外，我用 Intel C Compiler 编译了 <a href="http://ivic.org.cn/~dipplum/pub/ffmpeg.icc.ssse3">ffmpeg 的静态版本</a>，只能运行在 Cuo 2 Duo 之后的芯片上。简单测试了一下，mpeg4 编码大概能比 gcc 版本快 10% 左右。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#/bin/sh</span>
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list.d<span style="color: #000000; font-weight: bold;">/</span>build-static-ffmpeg.list <span style="color: #cc0000; font-style: italic;">&lt;&lt;EOF
deb http://debian.ustc.edu.cn/debian sid main contrib non-free
deb-src http://debian.ustc.edu.cn/debian sid main contrib non-free
&nbsp;
deb http://debian.ustc.edu.cn/debian-multimedia sid main
deb-src http://debian.ustc.edu.cn/debian-multimedia sid main
EOF</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-t</span> sid <span style="color: #c20cb9; font-weight: bold;">install</span> debian-multimedia-keyring debian-archive-keyring
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> nvidia-glx-dev<span style="color: #000000; font-weight: bold;">/</span>DEBIAN
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&gt;</span> nvidia-glx-dev<span style="color: #000000; font-weight: bold;">/</span>DEBIAN<span style="color: #000000; font-weight: bold;">/</span>control <span style="color: #cc0000; font-style: italic;">&lt;&lt;EOF
Package: nvidia-glx-dev
Priority: optional
Maintainer: nobody@example.com
Architecture: all
Version: 180.29
Description: dummy package for nvidia-glx-dev
 dummy package for nvidia-glx-dev
EOF</span>
&nbsp;
dpkg-deb <span style="color: #660033;">-b</span> nvidia-glx-dev
<span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-i</span> nvidia-glx-dev.deb 
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-t</span> sid build-dep <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-t</span> sid <span style="color: #c20cb9; font-weight: bold;">install</span> libsdl1.2-dev <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-t</span> sid build-dep <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-t</span> sid <span style="color: #c20cb9; font-weight: bold;">install</span> libusb-<span style="color: #000000;">1.0</span>-<span style="color: #000000;">0</span>-dev
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-t</span> sid <span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> ffmpeg-<span style="color: #000000; font-weight: bold;">*/</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&gt;</span> static_build <span style="color: #cc0000; font-style: italic;">&lt;&lt;EOF
debian/rules clean
debian/rules patch
&nbsp;
CFLAGS=&quot;-Wall -g&quot;
CC=&quot;ccache gcc&quot;
NCPUS=\$(getconf _NPROCESSORS_ONLN 2&gt;/dev/null || echo 1)
&nbsp;
./configure \
	--disable-ffplay --disable-ffserver --disable-shared --enable-static \
	--extra-libs=&quot;-static -ldirac_encoder -ldirac_decoder -lstdc++ -lspeex -lvorbis -lxvidcore -ldc1394 -lraw1394 -lusb-1.0 -lm -lasound -ldl&quot; \
	--prefix=/usr --extra-cflags=&quot;\$CFLAGS&quot; --cc=&quot;\$CC&quot; \
	--libdir=\\\${prefix}/lib --shlibdir=\\\${prefix}/lib --bindir=\\\${prefix}/bin \
	--incdir=\\\${prefix}/include/ffmpeg --enable-libmp3lame \
	--enable-gpl --enable-libfaad --mandir=\\\${prefix}/share/man --enable-libvorbis \
	--enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc \
	--enable-libamr-nb --enable-libamr-wb --enable-x11grab --enable-libgsm \
	--enable-libx264 --enable-libtheora --enable-libdc1394 \
	--enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac \
	--disable-decoder=libdirac --enable-libschroedinger --disable-encoder=libschroedinger \
	--enable-libspeex --enable-avfilter-lavf --disable-mmx \
	--disable-altivec --disable-armv5te --disable-armv6 --disable-vis
&nbsp;
echo &quot;#define FFMPEG_VERSION \&quot;SVN-r18029-static\&quot;&quot; &gt; version.h
&nbsp;
make -j \$NCPUS &amp;&amp; echo Build success || echo build failed
strip ffmpeg
&nbsp;
./ffmpeg -version
cp ffmpeg ..
EOF</span>
&nbsp;
. static_build 
<span style="color: #7a0874; font-weight: bold;">echo</span> Type <span style="color: #ff0000;">&quot;. static_build&quot;</span> under <span style="color: #7a0874; font-weight: bold;">source</span> code <span style="color: #c20cb9; font-weight: bold;">dir</span> to rebuild</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://dipplum.com/2009/03/24/debian-static-ffmpeg/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>debmirror不能镜像当前的Debian Repo</title>
		<link>http://dipplum.com/2009/02/27/debmirror-debian-repo-problem/</link>
		<comments>http://dipplum.com/2009/02/27/debmirror-debian-repo-problem/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 20:24:37 +0000</pubDate>
		<dc:creator>li</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[debmirror]]></category>

		<guid isPermaLink="false">http://dipplum.com/2009/02/27/debmirror-debian-repo-problem/</guid>
		<description><![CDATA[不知道何时起，Debian的Repository就不包含Packages文件了，只有压缩版本的Packages.bz2和Packages.gz。同样，Sources.gz和Sources.bz2也完全替代了Sources。导致debmirror无法同步现在的Debian Repo。报的错误类似：“…/Packages failed md5sum check”。 修正方法如下： 按照下面的patch修改/usr/bin/debmirror 删除镜像目录下的临时文件目录 rm –r /path_to_local_mirro/.temp --- debmirror 2009-02-27 04:10:57.000000000 +0800 +++ debmirror.orig 2009-02-27 04:12:45.000000000 +0800 @@ -690,14 +690,14 @@ foreach my $dist &#40;@dists&#41; &#123; foreach my $section &#40;@sections&#41; &#123; foreach my $arch &#40;@arches&#41; &#123; - #add_bytes(&#34;dists/$dist/$section/binary-$arch/Packages&#34;); + add_bytes&#40;&#34;dists/$dist/$section/binary-$arch/Packages&#34;&#41;; add_bytes&#40;&#34;dists/$dist/$section/binary-$arch/Packages.gz&#34;&#41;; add_bytes&#40;&#34;dists/$dist/$section/binary-$arch/Packages.bz2&#34;&#41;; add_bytes&#40;&#34;dists/$dist/$section/binary-$arch/Release&#34;&#41;; add_bytes&#40;&#34;dists/$dist/$section/binary-$arch/Packages.diff/Index&#34;&#41; unless &#40;$pdiff_mode eq &#34;none&#34;&#41;; &#125; if &#40;$do_source&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>不知道何时起，Debian的Repository就不包含Packages文件了，只有压缩版本的Packages.bz2和Packages.gz。同样，Sources.gz和Sources.bz2也完全替代了Sources。导致debmirror无法同步现在的Debian Repo。报的错误类似：“…/Packages failed md5sum check”。</p>
<p>修正方法如下：</p>
<ol>
<li>按照下面的patch修改/usr/bin/debmirror</li>
<li>删除镜像目录下的临时文件目录 rm –r /path_to_local_mirro/.temp</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #339933;">---</span> debmirror   <span style="color: #cc66cc;">2009</span><span style="color: #339933;">-</span>02<span style="color: #339933;">-</span><span style="color: #cc66cc;">27</span> 04<span style="color: #339933;">:</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">57.000000000</span> <span style="color: #339933;">+</span>0800
<span style="color: #339933;">+++</span> debmirror<span style="color: #339933;">.</span>orig      <span style="color: #cc66cc;">2009</span><span style="color: #339933;">-</span>02<span style="color: #339933;">-</span><span style="color: #cc66cc;">27</span> 04<span style="color: #339933;">:</span><span style="color: #cc66cc;">12</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">45.000000000</span> <span style="color: #339933;">+</span>0800
<span style="color: #339933;">@@</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">690</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">14</span> <span style="color: #339933;">+</span><span style="color: #cc66cc;">690</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">14</span> <span style="color: #339933;">@@</span>
 <span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$dist</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@dists</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$section</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@sections</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$arch</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@arches</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">-</span>      <span style="color: #666666; font-style: italic;">#add_bytes(&quot;dists/$dist/$section/binary-$arch/Packages&quot;);</span>
<span style="color: #339933;">+</span>      add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/binary-$arch/Packages&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/binary-$arch/Packages.gz&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/binary-$arch/Packages.bz2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/binary-$arch/Release&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/binary-$arch/Packages.diff/Index&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">unless</span>                                                                               <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$pdiff_mode</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">&quot;none&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
     <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$do_source</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">-</span>      <span style="color: #666666; font-style: italic;">#add_bytes(&quot;dists/$dist/$section/source/Sources&quot;);</span>
<span style="color: #339933;">+</span>      add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/source/Sources&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/source/Sources.gz&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/source/Sources.bz2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/source/Release&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">@@</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">706</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">13</span> <span style="color: #339933;">+</span><span style="color: #cc66cc;">706</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">13</span> <span style="color: #339933;">@@</span>
   <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@extra_dirs</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">-</span>  <span style="color: #666666; font-style: italic;">#add_bytes(&quot;$_/Packages&quot;);</span>
<span style="color: #339933;">+</span>  add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Packages&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Packages.gz&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Packages.bz2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Release&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Packages.diff/Index&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$do_source</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">-</span>    <span style="color: #666666; font-style: italic;">#add_bytes(&quot;$_/Sources&quot;);</span>
<span style="color: #339933;">+</span>    add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Sources&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Sources.gz&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Sources.bz2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Sources.diff/Index&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://dipplum.com/2009/02/27/debmirror-debian-repo-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian下网卡对802.1Q VLAN的支持</title>
		<link>http://dipplum.com/2008/10/14/debian-vlan/</link>
		<comments>http://dipplum.com/2008/10/14/debian-vlan/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 10:39:13 +0000</pubDate>
		<dc:creator>li</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[802.1q]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[vlan]]></category>

		<guid isPermaLink="false">http://dipplum.com/2008/10/14/debian-vlan/</guid>
		<description><![CDATA[现在的交换机大部分都支持802.1Q VLAN了, 通过VLAN可以将一个交换机上的不同端口分隔成隔离的链路, 也可以将多个交换机上的端口连接到同一个链路. 有时候, 我们可能希望一台机器同时连入多个VLAN, 最好是通过一块网卡. 也就是说, 让一个网络端口同时属于多个VLAN. 要实现这样的功能, 需要做两个方面的配置: 交换机配置 首先要把该主机对应的交换机端口设置为混合端口, 只有混合端口可以同时加入多个VLAN, 下面是Huawei交换机的配置片段: interface Ethernet0/1 port link-type hybrid port hybrid vlan 10 20 tagged port hybrid pvid vlan 10 上述配置让交换机的1号端口成为混合端口, 并同时加入id号为10和20的VLAN, 主VLAN号是10. Debian主机配置 首先需要在Debian上安装vlan配置工具. apt-get install vlan 然后, 我们可以在Debian的网络配置文件中, 配置每个VLAN对应的网卡. 下面是/etc/network/interfaces文件的片段: auto eth0.10 iface eth0.10 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.254 [...]]]></description>
			<content:encoded><![CDATA[<p>现在的交换机大部分都支持802.1Q VLAN了, 通过VLAN可以将一个交换机上的不同端口分隔成隔离的链路, 也可以将多个交换机上的端口连接到同一个链路.</p>
<p>有时候, 我们可能希望一台机器同时连入多个VLAN, 最好是通过一块网卡. 也就是说, 让一个网络端口同时属于多个VLAN. 要实现这样的功能, 需要做两个方面的配置:</p>
<p><strong>交换机配置</strong></p>
<p>首先要把该主机对应的交换机端口设置为混合端口, 只有混合端口可以同时加入多个VLAN, 下面是Huawei交换机的配置片段:</p>
<p><code>interface Ethernet0/1      <br />port link-type hybrid       <br />port hybrid vlan 10 20 tagged       <br />port hybrid pvid vlan 10</code></p>
<p>上述配置让交换机的1号端口成为混合端口, 并同时加入id号为10和20的VLAN, 主VLAN号是10.</p>
<p><strong>Debian主机配置</strong></p>
<p>首先需要在Debian上安装vlan配置工具.</p>
<p><code>apt-get install vlan</code></p>
<p>然后, 我们可以在Debian的网络配置文件中, 配置每个VLAN对应的网卡. 下面是/etc/network/interfaces文件的片段:</p>
<p><code>auto eth0.10      <br />iface eth0.10 inet static       <br />address 192.168.1.10       <br />netmask 255.255.255.0       <br />gateway 192.168.1.254       </p>
<p>iface eth0.20 inet static       <br />address 192.168.2.10&#160; <br />netmask 255.255.255.0</code></p>
<p>上述配置文件配置的主机, 分别有两块虚拟网卡eth0.10, eth0.20, 对应VLAN 10和VLAN 20所在的网络.</p>
<p>除了配置文件之外, 管理员还可以通过vconfig命令, 增加或者删除VLAN.</p>
]]></content:encoded>
			<wfw:commentRss>http://dipplum.com/2008/10/14/debian-vlan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>grub2和GPT兼容问题</title>
		<link>http://dipplum.com/2008/09/02/grub2%e5%92%8cgpt%e5%85%bc%e5%ae%b9%e9%97%ae%e9%a2%98/</link>
		<comments>http://dipplum.com/2008/09/02/grub2%e5%92%8cgpt%e5%85%bc%e5%ae%b9%e9%97%ae%e9%a2%98/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 07:30:58 +0000</pubDate>
		<dc:creator>li</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[GPT]]></category>
		<category><![CDATA[grub]]></category>

		<guid isPermaLink="false">http://dipplum.com/?p=10</guid>
		<description><![CDATA[说来挺丢脸的, Debian用了将近8年, 直到前一阵才提交了生平第一个Debian的bug, 关于grub2无法安装至使用GPT分区表硬盘的问题. Debian的package maintainer很热情的询问了关于这个bug的一些问题, 然后告诉我这个bug可能是grub本身的问题, 而不是Debian打包中出现的问题, 建议我报告到upstream maintainer那里去. 后来想想比较麻烦, 我就没再提交. 结果昨天又收到Debian包管理员Robert Millan的来信, 让我试试刚刚上传到experimental的新版本grub2(1.96+20080831-1), 说他认为我的bug已经在这个版本中解决了, 还把理由称述在bug report的注释里面了. 面对这么负责的管理员, 我除了感动, 还能说什么呢. 为了试用在experimental中的软件包, 需要首先修改/etc/apt/sources.list文件, 增加下面一行 deb http://debian.ustc.edu.cn/debian ../project/experimental main 然后安装experimental中的grub2 apt-get update apt-get -t experimental install grub2 安装好之后, 使用下面的命令把grub2安装到GPT硬盘上, 发现已经可以成功安装了. sudo grub-install '(hd0)']]></description>
			<content:encoded><![CDATA[<p>说来挺丢脸的, Debian用了将近8年, 直到前一阵才提交了生平<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489287">第一个Debian的bug</a>, 关于grub2无法安装至使用<a href="http://en.wikipedia.org/wiki/GUID_Partition_Table">GPT分区表</a>硬盘的问题. Debian的package maintainer很热情的询问了关于这个bug的一些问题, 然后告诉我这个bug可能是grub本身的问题, 而不是Debian打包中出现的问题, 建议我报告到upstream maintainer那里去.</p>
<p>后来想想比较麻烦, 我就没再提交. 结果昨天又收到Debian包管理员Robert Millan的来信, 让我试试刚刚上传到experimental的新版本grub2(1.96+20080831-1), 说他认为我的bug已经在这个版本中解决了, 还把理由称述在bug report的注释里面了. 面对这么负责的管理员, 我除了感动, 还能说什么呢.</p>
<p>为了试用在experimental中的软件包, 需要首先修改/etc/apt/sources.list文件, 增加下面一行</p>
<p><code>deb http://debian.ustc.edu.cn/debian ../project/experimental main</code></p>
<p>然后安装experimental中的grub2<br />
<code><br />
apt-get update<br />
apt-get -t experimental install grub2</code></p>
<p>安装好之后, 使用下面的命令把grub2安装到GPT硬盘上, 发现已经可以成功安装了.</p>
<p><code>sudo grub-install '(hd0)'</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dipplum.com/2008/09/02/grub2%e5%92%8cgpt%e5%85%bc%e5%ae%b9%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

