<?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>Hi! I&#039;m clsung &#187; FreeBSD</title>
	<atom:link href="http://blog.dragon2.net/category/hacker/freebsd/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.dragon2.net</link>
	<description>clsung&#039;s blog site</description>
	<lastBuildDate>Mon, 06 Feb 2012 09:29:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>[FreeBSD] byobu-config need newt as RUN_DEPENDS</title>
		<link>http://blog.dragon2.net/2011/07/25/1045.php</link>
		<comments>http://blog.dragon2.net/2011/07/25/1045.php#comments</comments>
		<pubDate>Mon, 25 Jul 2011 02:09:49 +0000</pubDate>
		<dc:creator>clsung</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://blog.dragon2.net/?p=1045</guid>
		<description><![CDATA[byobu-3.29_1 will failed when I execute the &#8216;byobu-config&#8217;: $ byobu-config Traceback &#40;most recent call last&#41;: &#160; File &#34;/usr/local/bin/byobu-config&#34;, line 25, in &#60;module&#62; &#160; &#160; import sys, os, os.path, time, string, commands, gettext, glob, snack ImportError: No module named snack To solve this, you will need to install devel/newt (be sure to define WITH_PYTHON).]]></description>
			<content:encoded><![CDATA[<p>byobu-3.29_1 will failed when I execute the &#8216;byobu-config&#8217;: <span id="more-1045"></span></p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">$ byobu-config<br />
Traceback <span class="br0">&#40;</span>most recent call <span class="kw2">last</span><span class="br0">&#41;</span>:<br />
&nbsp; File <span class="st0">&quot;/usr/local/bin/byobu-config&quot;</span>, line 25, <span class="kw1">in</span> <span class="sy0">&lt;</span>module<span class="sy0">&gt;</span><br />
&nbsp; &nbsp; import sys, os, os.path, <span class="kw1">time</span>, string, commands, <span class="kw2">gettext</span>, glob, snack<br />
ImportError: No module named snack</div>
</div>
<p>To solve this, you will need to install devel/newt (be sure to define WITH_PYTHON).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dragon2.net/2011/07/25/1045.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[FreeBSD] porttools</title>
		<link>http://blog.dragon2.net/2009/12/17/912.php</link>
		<comments>http://blog.dragon2.net/2009/12/17/912.php#comments</comments>
		<pubDate>Thu, 17 Dec 2009 08:17:52 +0000</pubDate>
		<dc:creator>clsung</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ports]]></category>

		<guid isPermaLink="false">http://blog.dragon2.net/?p=912</guid>
		<description><![CDATA[FreeBSD 在某年某月某日引進了 porttools, 一個 porters/committers 都愛用的小工具&#8230; 最快速的安裝方法當然是&#8230; % cd /usr/ports/ports-mgmt/porttools % make install clean 為了接下來的日子裡, 不用再一直 send-pr , 填 form, 我們要來寫 ~/.porttools, 以便 porttools 每次執行時都可以幫我們自動填入: % cat ~/.porttools # FreeBSD Port Tools configuration file &#8211; see porttools(5) # vim: ft=sh EMAIL=&#34;c4g_AT_F5D.org&#34; FULLNAME=&#34;Cheng-Lung Sung&#34; ORGANIZATION=&#34;FreeBSD @ Taiwan&#34; BUILDROOT=&#34;/tmp&#34; ARCHIVE_DIR=&#34;&#34; DIFF_MODE=&#34;CVS&#34; DIFF_VIEWER=&#34;more&#34; PORTLINT_FLAGS=&#34;abct&#34; 當然各位觀眾請依照 porttools(5) 自行改寫。 簡單的用法，情境一，你要送某個 ports 的更新，假定目錄是 foo/bar (/usr/ports/foo/bar) 好了: % cd foo/bar % port test # 幫你跑所需要的測試 % port submit # 幫你跑 send-pr # 沒了 情境二，你有個新的 ports 想送進 ports tree，假定目錄是 bar/foo (/usr/ports/bar/foo) 好了: % cd foo/bar % port test # 幫你跑所需要的測試 % port submit # 幫你跑 send-pr # 沒了 咦，怎麼一樣？對啦，就是一樣啊，所以用法真的很簡單吧。當然，我少講了一個 port create ，建 new port 時的指令，不過我自己是喜歡用 cp -R 把類似的目錄 copy 一份來改啦。 如果是 committers 的話，還有 port commit 這個指令可以用哦。]]></description>
			<content:encoded><![CDATA[<p>FreeBSD 在某年某月某日引進了 <a href="http://sourceforge.net/projects/porttools/">porttools</a>, 一個 <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/">porters</a>/<a href="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/">committers</a> 都愛用的小工具&#8230; <span id="more-912"></span></p>
<p>最快速的安裝方法當然是&#8230;</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw3">cd</span> <span class="sy0">/</span>usr<span class="sy0">/</span>ports<span class="sy0">/</span>ports-mgmt<span class="sy0">/</span>porttools<br />
<span class="sy0">%</span> <span class="kw2">make</span> <span class="kw2">install</span> clean</div>
</div>
<p>為了接下來的日子裡, 不用再一直 <a href="http://www.freebsd.org/send-pr.html">send-pr</a> , 填 form, 我們要來寫 ~/.porttools, 以便 <a href="http://sourceforge.net/projects/porttools/">porttools</a> 每次執行時都可以幫我們自動填入:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw2">cat</span> ~<span class="sy0">/</span>.porttools<br />
<span class="co0"># FreeBSD Port Tools configuration file &#8211; see porttools(5)</span><br />
<span class="co0"># vim: ft=sh</span><br />
<span class="re2">EMAIL</span>=<span class="st0">&quot;c4g_AT_F5D.org&quot;</span><br />
<span class="re2">FULLNAME</span>=<span class="st0">&quot;Cheng-Lung Sung&quot;</span><br />
<span class="re2">ORGANIZATION</span>=<span class="st0">&quot;FreeBSD @ Taiwan&quot;</span><br />
<span class="re2">BUILDROOT</span>=<span class="st0">&quot;/tmp&quot;</span><br />
<span class="re2">ARCHIVE_DIR</span>=<span class="st0">&quot;&quot;</span><br />
<span class="re2">DIFF_MODE</span>=<span class="st0">&quot;CVS&quot;</span><br />
<span class="re2">DIFF_VIEWER</span>=<span class="st0">&quot;more&quot;</span><br />
<span class="re2">PORTLINT_FLAGS</span>=<span class="st0">&quot;abct&quot;</span></div>
</div>
<p>當然各位觀眾請依照 porttools(5) 自行改寫。</p>
<p>簡單的用法，情境一，你要送某個 ports 的更新，假定目錄是 foo/bar (/usr/ports/foo/bar) 好了:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw3">cd</span> foo<span class="sy0">/</span>bar<br />
<span class="sy0">%</span> port <span class="kw3">test</span> <span class="co0"># 幫你跑所需要的測試</span><br />
<span class="sy0">%</span> port submit <span class="co0"># 幫你跑 send-pr</span><br />
<span class="co0"># 沒了</span></div>
</div>
<p>情境二，你有個新的 ports 想送進 ports tree，假定目錄是 bar/foo (/usr/ports/bar/foo) 好了:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw3">cd</span> foo<span class="sy0">/</span>bar<br />
<span class="sy0">%</span> port <span class="kw3">test</span> <span class="co0"># 幫你跑所需要的測試</span><br />
<span class="sy0">%</span> port submit <span class="co0"># 幫你跑 send-pr</span><br />
<span class="co0"># 沒了</span></div>
</div>
<p>咦，怎麼一樣？對啦，就是一樣啊，所以用法真的很簡單吧。當然，我少講了一個 port create ，建 new port 時的指令，不過我自己是喜歡用 cp -R 把類似的目錄 copy 一份來改啦。</p>
<p>如果是 <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/">committers </a> 的話，還有 port commit 這個指令可以用哦。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dragon2.net/2009/12/17/912.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>昇級 FreeBSD 8.0-RELEASE</title>
		<link>http://blog.dragon2.net/2009/12/04/902.php</link>
		<comments>http://blog.dragon2.net/2009/12/04/902.php#comments</comments>
		<pubDate>Fri, 04 Dec 2009 02:16:18 +0000</pubDate>
		<dc:creator>clsung</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[jail]]></category>

		<guid isPermaLink="false">http://blog.dragon2.net/2009/12/04/902.php</guid>
		<description><![CDATA[在 FreeBSD Planet 上有詳細一點的 HowTo。 不過主要就是先複製一份（或直接改寫 sup-file），以下都假定你是以 root 權限跑: % cp /usr/share/examples/cvsup/stable-supfile /root/8-release % vim /root/8-release &#40;偷渡一下 vim&#41; 裡面主要是改兩個地方 host &#038; release/tag *default host=cvsup.tw.FreeBSD.org *default release=cvs tag=RELENG_8_0 當然也可以把 tag 指定為 RELENG_8_0_0_RELEASE, 不過這樣就吃不到後續的更新了，例如昨天出的 p1: 20091203: p1 FreeBSD-SA-09:15.ssl, FreeBSD-SA-09:16.rtld, FreeBSD-SA-09:17.freebsd-update Disable SSL renegotiation in order to protect against a serious protocol flaw. [09:15] Correctly handle failures from unsetenv resulting from a corrupt environment in rtld-elf. [09:16] Fix permissions in freebsd-update in order to prevent leakage of sensitive files. [09:17] 接著更新 src tree: % csup /root/8-release 然後就先備便 binary files &#038; kernel: % make buildworld &#38;&#38; make buildkernel 在這裡之前，都不會對原來的系統造成任何影響。 然後跑一下 mergemaster -p 檢查必要的檔案更新。 % mergemaster -p 這是靠 VCS Id 來檢查是否有新檔，所以很有可能手賤把 /etc/master.passwd &#038; /etc/group 給幹掉，如果不幸發生，記得去 /var/backups 去撿備份。（把 VCS Id 弄成一樣也是個解法啦 XD） 接著就準備昇級了： % make installkernel % reboot &#40;and specify -s into single user mode&#41; % cd /usr/src ; make installworld % mergemaster % reboot 雖然說是建議要先有一次 reboot 進入單人模式 (-s)，不過我喜歡直接上了 XD，本人的方式是 % make installworld &#38;&#38; make installkernel % mergemaster % reboot &#38;&#38; *pray* 這裡就完成了主系統的更新了。 接著，如果你有 jail 的話，也要記得一起更新啊。附帶一提， FreeBSD-8.0 可以允許 Multi-IP/IPv6 jails : Multi-IP/IPv6 jails With FreeBSD 8 it will be possible to assign multiple IPv4 addresses to a jail, as well as assigning IPv6 addresses. People that offer hosting services can greatly enjoy these features, a jailed [...]]]></description>
			<content:encoded><![CDATA[<p>在 <a href="http://blogs.freebsdish.org/">FreeBSD Planet</a> 上有詳細一點的 <a href="http://www.evilcoder.org/2009/11/27/welcome-to-freebsd-8/" title="Welcome to FreeBSD 8!"> HowTo</a>。 <span id="more-902"></span></p>
<p>不過主要就是先複製一份（或直接改寫 sup-file），以下都假定你是以 root 權限跑:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw2">cp</span> <span class="sy0">/</span>usr<span class="sy0">/</span>share<span class="sy0">/</span>examples<span class="sy0">/</span>cvsup<span class="sy0">/</span>stable-supfile <span class="sy0">/</span>root<span class="sy0">/</span>8-release<br />
<span class="sy0">%</span> <span class="kw2">vim</span> <span class="sy0">/</span>root<span class="sy0">/</span>8-release <span class="br0">&#40;</span>偷渡一下 <span class="kw2">vim</span><span class="br0">&#41;</span></div>
</div>
<p>裡面主要是改兩個地方 host &#038; release/tag</p>
<div class="codesnip-container" >
<div class="vim codesnip" style="font-family:monospace;"><span class="sy0">*</span>default host=cvsup<span class="sy0">.</span>tw<span class="sy0">.</span>FreeBSD<span class="sy0">.</span>org<br />
<span class="sy0">*</span>default release=cvs tag=RELENG_8_0</div>
</div>
<p>當然也可以把 tag 指定為 RELENG_8_0_0_RELEASE, 不過這樣就吃不到後續的更新了，例如昨天出的 p1:</p>
<blockquote><p>20091203:       p1      FreeBSD-SA-09:15.ssl, FreeBSD-SA-09:16.rtld,<br />
                        FreeBSD-SA-09:17.freebsd-update<br />
        Disable SSL renegotiation in order to protect against a serious<br />
        protocol flaw. [09:15]</p>
<p>        Correctly handle failures from unsetenv resulting from a corrupt<br />
        environment in rtld-elf. [09:16]</p>
<p>        Fix permissions in freebsd-update in order to prevent leakage of<br />
        sensitive files. [09:17]</p></blockquote>
<p>接著更新 src tree:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> csup <span class="sy0">/</span>root<span class="sy0">/</span><span class="nu0">8</span>-release</div>
</div>
<p>然後就先備便 binary files &#038; kernel:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw2">make</span> buildworld <span class="sy0">&amp;&amp;</span> <span class="kw2">make</span> buildkernel</div>
</div>
<p>在這裡之前，都不會對原來的系統造成任何影響。</p>
<p>然後跑一下 mergemaster -p 檢查必要的檔案更新。</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> mergemaster <span class="re5">-p</span></div>
</div>
<p>這是靠 VCS Id 來檢查是否有新檔，所以很有可能手賤把 /etc/master.passwd &#038; /etc/group 給幹掉，如果不幸發生，記得去 /var/backups 去撿備份。（把 VCS Id 弄成一樣也是個解法啦 XD）</p>
<p>接著就準備昇級了：</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw2">make</span> installkernel<br />
<span class="sy0">%</span> reboot <span class="br0">&#40;</span>and specify <span class="re5">-s</span> into single user mode<span class="br0">&#41;</span><br />
<span class="sy0">%</span> <span class="kw3">cd</span> <span class="sy0">/</span>usr<span class="sy0">/</span>src ; <span class="kw2">make</span> installworld<br />
<span class="sy0">%</span> mergemaster<br />
<span class="sy0">%</span> reboot</div>
</div>
<p>雖然說是建議要先有一次 reboot 進入單人模式 (-s)，不過我喜歡直接上了 XD，本人的方式是</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw2">make</span> installworld <span class="sy0">&amp;&amp;</span> <span class="kw2">make</span> installkernel<br />
<span class="sy0">%</span> mergemaster<br />
<span class="sy0">%</span> reboot <span class="sy0">&amp;&amp;</span> <span class="sy0">*</span>pray<span class="sy0">*</span></div>
</div>
<p>這裡就完成了主系統的更新了。</p>
<p>接著，如果你有 jail 的話，也要記得一起更新啊。附帶一提， FreeBSD-8.0 可以允許 Multi-IP/IPv6 jails :</p>
<blockquote><p>Multi-IP/IPv6 jails</p>
<p>With FreeBSD 8 it will be possible to assign multiple IPv4 addresses to a jail, as well as assigning IPv6 addresses. People that offer hosting services can greatly enjoy these features, a jailed webserver for example can now use many more addresses and do proper SSL virtualhosting.</p></blockquote>
<p>更新 jail 的方式很簡單，只要 make installworld 並加上 DESTDIR 即可:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw3">cd</span> <span class="sy0">/</span>usr<span class="sy0">/</span>src<br />
<span class="sy0">%</span> <span class="kw2">make</span> installworld <span class="re2">DESTDIR</span>=<span class="sy0">/</span>path<span class="sy0">/</span>to<span class="sy0">/</span>jail</div>
</div>
<p>我自己還會手賤順便做 mergemaster 就是了</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw3">cd</span> <span class="sy0">/</span>usr<span class="sy0">/</span>src<br />
<span class="sy0">%</span> mergemaster <span class="re5">-D</span> <span class="sy0">/</span>path<span class="sy0">/</span>to<span class="sy0">/</span>jail</div>
</div>
<p>最後，重要的來啦，因為原本經由 ports 安裝的軟體（或是自行安裝的），有些還是連到舊的 library（如原本連的是 libxxx.0, 8.0-R 裝的是 libxxx.1），所以一時之間可能覺得沒問題，不過最好還是檢查一下。然後看著日漸肥大的 /usr ，當然要讓過去的過去囉～～</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw3">cd</span> <span class="sy0">/</span>usr<span class="sy0">/</span>src<br />
<span class="sy0">%</span> <span class="kw2">make</span> delete-old-libs<br />
<span class="sy0">%</span> <span class="kw2">make</span> delete-old</div>
</div>
<p>如果在 production 機器上，最好多詳細檢查 XD，如果是個人用的，就先做再說，反正不行， rebuild from ports 就好 <img src='http://blog.dragon2.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>UPDATE: 預設 delete-old/delete-old-libs 會逐項詢問你要不要砍，如果想一次砍掉，記得加個 -DBATCH_DELETE_OLD_FILES:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw3">cd</span> <span class="sy0">/</span>usr<span class="sy0">/</span>src<br />
<span class="sy0">%</span> <span class="kw2">make</span> -DBATCH_DELETE_OLD_FILES delete-old-libs<br />
<span class="sy0">%</span> <span class="kw2">make</span> -DBATCH_DELETE_OLD_FILES delete-old</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.dragon2.net/2009/12/04/902.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The FreeBSD Forums Official Site</title>
		<link>http://blog.dragon2.net/2008/11/19/657.php</link>
		<comments>http://blog.dragon2.net/2008/11/19/657.php#comments</comments>
		<pubDate>Wed, 19 Nov 2008 02:03:44 +0000</pubDate>
		<dc:creator>clsung</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://blog.dragon2.net/?p=657</guid>
		<description><![CDATA[Here.]]></description>
			<content:encoded><![CDATA[<p><a href="http://forums.freebsd.org/index.php" title="The FreeBSD Forums">Here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dragon2.net/2008/11/19/657.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>差點以為 Linux 過氣了？</title>
		<link>http://blog.dragon2.net/2008/09/02/556.php</link>
		<comments>http://blog.dragon2.net/2008/09/02/556.php#comments</comments>
		<pubDate>Tue, 02 Sep 2008 01:34:34 +0000</pubDate>
		<dc:creator>clsung</dc:creator>
				<category><![CDATA[feeling]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[天龍八部]]></category>

		<guid isPermaLink="false">http://blog.dragon2.net/?p=556</guid>
		<description><![CDATA[這年頭怎麼老有人愛寫些類似墓誌銘的文章？ 記得陳錢總統在位時，就開始紀念已逝的民主，而今日在 OpenSource ，竟然有人會下這種標題「為什麼當年成功的是 Linux，而不是 BSD？」？所以說標題取的好，大家就會想點進去看，不管裡面內容如何，至少人氣就 up up 啦。 講當年成功的是 Linux ，感覺起來好像現在不太成功了？ :p 當然仔細看內文並不是那個意思啦，不過再仔細看一下，可以明顯感受到 Tetralet 對於 BSD （講 FreeBSD 好了，看得出來他應該沒用過其他的 *BSD ）的認知其實連一知半解都還說不太上。事實上，我想現在 Linux 還是很紅，不過說來說去，紅的是哪一套 Linux 呢？我自己在用 Ubuntu ，可是 Gentoo 也不錯。有些東西在 Gentoo 上可以跑的好好的，在我的 Ubuntu 上就是不行，我會去怪 Linux 嗎？最多也是罵罵 Ubuntu 吧？ 至於 FreeBSD 又哪裡不成功了？這我就更不懂啦，這年頭的作業系統要怎樣才叫做成功呢？我真的不太懂。 不過我知道像 MySQL 、Apache 之類的軟體，是不會跟你去計較可不可以只在 FreeBSD 或是 Linux 上執行的。效能如何，自然會有 hacker 去努力，所以也有不少人也是各種作業系統都去玩的。 於是我又想到了天龍八部裡的一段話： &#8230;枯榮大師部道︰“ 你在一陽指上的修為，已到了第幾品境界？” 本因額頭出汗，答道︰“ 弟子根鈍，又兼未能精進，只修得到第四品。” 枯榮大師再問︰“ 以你所見，大理段氏的一陽指與少林拈花指、多羅葉指、無相劫指三項指法較，孰優孰劣？” 本因道︰“ 指法無優劣，功力有高下。”&#8230; 我想，如果標題或是內文不要妄下定論的話，或許給人的感覺會好一點吧]]></description>
			<content:encoded><![CDATA[<p>這年頭怎麼老有人愛寫些類似墓誌銘的文章？<span id="more-556"></span><br />
記得陳錢總統在位時，就開始<a href="http://blog.dragon2.net/2007/05/20/463.php" title="台灣民主紀念館">紀念已逝的民主</a>，而今日在 OpenSource ，竟然有人會下這種標題「<a href="http://tetralet.luna.com.tw/index.php?op=ViewArticle&#038;articleId=209&#038;blogId=1">為什麼當年成功的是 Linux，而不是 BSD？</a>」？所以說標題取的好，大家就會想點進去看，不管裡面內容如何，至少人氣就 up up 啦。</p>
<p>講當年成功的是 Linux ，感覺起來好像現在不太成功了？ :p 當然仔細看內文並不是那個意思啦，不過再仔細看一下，可以明顯感受到 Tetralet 對於 BSD （講 <a href="http://www.freebsd.org/" title="The FreeBSD Project">FreeBSD</a> 好了，看得出來他應該沒用過其他的 *BSD ）的認知其實連一知半解都還說不太上。事實上，我想現在 Linux 還是很紅，不過說來說去，紅的是哪一套 Linux 呢？我自己在用 <a href="http://www.ubuntu.com/">Ubuntu</a> ，可是 <a href="http://www.gentoo.org/">Gentoo</a> 也不錯。有些東西在 <a href="http://www.gentoo.org/">Gentoo</a> 上可以跑的好好的，在我的 <a href="http://www.ubuntu.com/">Ubuntu</a> 上就是不行，我會去怪 Linux 嗎？最多也是罵罵 <a href="http://www.ubuntu.com/">Ubuntu</a> 吧？</p>
<p>至於 <a href="http://www.freebsd.org/" title="The FreeBSD Project">FreeBSD</a> 又哪裡不成功了？這我就更不懂啦，這年頭的作業系統要怎樣才叫做成功呢？我真的不太懂。 <img src='http://blog.dragon2.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  不過我知道像 <a href="www.mysql.com">MySQL</a> 、<a href="http://www.apache.org/" title="The Apache Software Foundation">Apache</a> 之類的軟體，是不會跟你去計較可不可以只在 <a href="http://www.freebsd.org/" title="The FreeBSD Project">FreeBSD</a> 或是 Linux 上執行的。效能如何，自然會有 hacker 去努力，所以也有不少人也是各種作業系統都去玩的。</p>
<p>於是我又想到了天龍八部裡的一段話：</p>
<blockquote><p>&#8230;枯榮大師部道︰“ 你在一陽指上的修為，已到了第幾品境界？” 本因額頭出汗，答道︰“ 弟子根鈍，又兼未能精進，只修得到第四品。” 枯榮大師再問︰“ 以你所見，大理段氏的一陽指與少林拈花指、多羅葉指、無相劫指三項指法較，孰優孰劣？” 本因道︰“ 指法無優劣，功力有高下。”&#8230;</p></blockquote>
<p>我想，如果標題或是內文不要妄下定論的話，或許給人的感覺會好一點吧 <img src='http://blog.dragon2.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dragon2.net/2008/09/02/556.php/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Screen, SecureCRT, UTF-8 and FreeBSD</title>
		<link>http://blog.dragon2.net/2008/06/04/533.php</link>
		<comments>http://blog.dragon2.net/2008/06/04/533.php#comments</comments>
		<pubDate>Wed, 04 Jun 2008 02:41:07 +0000</pubDate>
		<dc:creator>clsung</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[256-color]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[securecrt]]></category>

		<guid isPermaLink="false">http://blog.dragon2.net/?p=533</guid>
		<description><![CDATA[Finally I got my environment on FreeBSD UTF-8-lized. Note on SecureCRT: set Character encoding to "UTF-8&#8243; Note on Screen: set following command in .screenrc defutf8 on defc1 off defencoding utf8 bind b encoding big5 utf8 bind u encoding utf8 utf8 Note on Screen with 256 color: % cd /usr/ports/sysutils/screen % make config # XTERM_256 Enable support for 256 colour xterm % make deinstall reinstall clean And set following command in .screenrc term xterm termcapinfo xterm &#8216;Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm&#8217; attrcolor b ".I" attrcolor i "+b" defbce on And re-start the screen (not just re-attach it) Others, refer to yzlin&#8216;s post.]]></description>
			<content:encoded><![CDATA[<p>Finally I got my environment on FreeBSD UTF-8-lized.</p>
<p>Note on SecureCRT: set Character encoding to "UTF-8&#8243;<br />
Note on Screen: set following command in .screenrc</p>
<div class="codesnip-container" >defutf8 on<br />
defc1 off<br />
defencoding utf8</p>
<p>bind b encoding big5 utf8<br />
bind u encoding utf8 utf8</p></div>
<p>Note on Screen with 256 color: </p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">%</span> <span class="kw3">cd</span> <span class="sy0">/</span>usr<span class="sy0">/</span>ports<span class="sy0">/</span>sysutils<span class="sy0">/</span><span class="kw2">screen</span><br />
<span class="sy0">%</span> <span class="kw2">make</span> config <span class="co0"># XTERM_256 Enable support for 256 colour xterm</span><br />
<span class="sy0">%</span> <span class="kw2">make</span> deinstall reinstall clean</div>
</div>
<p>And set following command in .screenrc</p>
<div class="codesnip-container" >term xterm<br />
termcapinfo xterm &#8216;Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm&#8217;<br />
attrcolor b ".I"<br />
attrcolor i "+b"<br />
defbce on</div>
<p>And re-start the screen (not just re-attach it)</p>
<p>Others, refer to <a href="http://blog.yzlin.org/" title="林光生活兩光過">yzlin</a>&#8216;s <a href="http://blog.yzlin.org/2008/05/14/22/" title="Make UTF-8 Environment Comfortable">post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dragon2.net/2008/06/04/533.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PyLucene Win32 on googlecode</title>
		<link>http://blog.dragon2.net/2008/04/10/525.php</link>
		<comments>http://blog.dragon2.net/2008/04/10/525.php#comments</comments>
		<pubDate>Thu, 10 Apr 2008 06:34:26 +0000</pubDate>
		<dc:creator>clsung</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[pylucene]]></category>

		<guid isPermaLink="false">http://blog.dragon2.net/?p=525</guid>
		<description><![CDATA[之前要相容地使用 Lucene 的 Index ，所以花了不上功夫在 FreeBSD 上玩 PyLucene。 為了在 Win32 上也可以用 PyLucene，先是去 download 了 python ，再試圖由這裡下載 binary 檔，沒想到竟然一個說我區域不對（這裡不是北京啊～～～），一個是根本連不到。不死心再 google 了一下，發現了這個專案，不錯。 是說 PyLucene 竟然沒有 2.3 的 source tar ball，不知道是在幹嘛？這樣我很難 update textproc/py-lucene 啊。]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.dragon2.net/2006/11/14/392.php">之前</a>要相容地使用 <a href="http://lucene.apache.org/" title="Welcome to Lucene!<br />
">Lucene</a> 的 Index ，所以花了不上功夫在 <a href="http://www.freebsd.org" title="FreeBSD">FreeBSD</a> 上玩 <a href="http://pylucene.osafoundation.org/" title="PyLucene project">PyLucene</a>。<br />
<span id="more-525"></span><br />
為了在 Win32 上也可以用 <a href="http://pylucene.osafoundation.org/" title="PyLucene project">PyLucene</a>，先是去 download 了 <a href="http://www.python.org/" title="Python">python</a> ，再試圖由<a href="http://charupload.wordpress.com/2007/12/28/pylucene-gcj-220-1-for-win32-python-25/" title="PyLucene GCJ 2.2.0-1 for win32, python 2.5">這裡</a>下載 binary 檔，沒想到竟然一個說我區域不對（這裡不是北京啊～～～），一個是根本連不到。不死心再 google 了一下，發現了<a href="http://code.google.com/p/pylucene-win32-binary/" title="PyLucene binaries for win32">這個專案</a>，不錯。</p>
<p>是說 <a href="http://pylucene.osafoundation.org/" title="PyLucene project">PyLucene</a> 竟然沒有 <a href="http://svn.osafoundation.org/pylucene/branches/release-2.3/" title="PyLucene Release-2.3">2.3</a> 的 source tar ball，不知道是在幹嘛？這樣我很難 update <a href="http://www.freshports.org/textproc/py-lucene" title="FreshPorts -- textproc/py-lucene">textproc/py-lucene</a> 啊。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dragon2.net/2008/04/10/525.php/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>vim helps me in commit p5- ports</title>
		<link>http://blog.dragon2.net/2008/01/09/502.php</link>
		<comments>http://blog.dragon2.net/2008/01/09/502.php#comments</comments>
		<pubDate>Wed, 09 Jan 2008 00:26:14 +0000</pubDate>
		<dc:creator>clsung</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[CPAN]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.dragon2.net/2008/01/09/502.php</guid>
		<description><![CDATA[As tobez(1) said, we committers should provide Changes in commit log, so&#8230;.. I&#8217;ve add these two lines into my .vimrc: map &#60;buffer&#62; ,w /p5-&#40;&#91;^/&#93;+&#41;/&#60;CR&#62; &#34;vyaW nmap &#60;F12&#62; ,w /^Changes:&#60;CR&#62; Ahttp://search.cpan.org/dist/&#60;C-R&#62;v&#60;ESC&#62; :1&#60;CR&#62; :/dist/&#91;^/&#93;+/p5&#60;CR&#62; :. s,dist/&#91;^/&#93;+/p5-,dist/,&#60;CR&#62; :. s,Makefile,Changes,&#60;CR&#62; Then everytime I hit F12, it will help me add the following lines: Changes: http://search.cpan.org/dist/XXX-YYY/Changes However, some perl modules provide ChangeLog instead of Changes, so need to pay attention to it. Anton Berezin]]></description>
			<content:encoded><![CDATA[<p>As tobez<sup>(<a href="http://blog.dragon2.net/2008/01/09/502.php#footnote_0_502" id="identifier_0_502" class="footnote-link footnote-identifier-link" title="Anton Berezin">1</a>)</sup> <a href="http://lists.freebsd.org/pipermail/freebsd-perl/2007-December/001666.html" title="Tip of the day: version-independent location of a CPAN distribution's Changes file">said</a>, we committers should provide Changes in commit log, so&#8230;..</p>
<p>I&#8217;ve add these two lines into my .vimrc:<br />
<span id="more-502"></span></p>
<div class="codesnip-container" >
<div class="robots codesnip" style="font-family:monospace;">map &lt;buffer&gt; ,w /p5-<span class="br0">&#40;</span><span class="br0">&#91;</span>^/<span class="br0">&#93;</span>+<span class="br0">&#41;</span>/&lt;CR&gt; &quot;vyaW<br />
nmap &lt;F12&gt; ,w /^Changes<span class="sy0">:</span>&lt;CR&gt; Ahttp<span class="sy0">:</span>//search.cpan.org/dist/&lt;C-R&gt;v&lt;ESC&gt; <span class="sy0">:</span><span class="nu0">1</span>&lt;CR&gt; <span class="sy0">:</span>/dist/<span class="br0">&#91;</span>^/<span class="br0">&#93;</span>+/p5&lt;CR&gt; <span class="sy0">:</span>. s,dist/<span class="br0">&#91;</span>^/<span class="br0">&#93;</span>+/p5-,dist/,&lt;CR&gt; <span class="sy0">:</span>. s,Makefile,Changes,&lt;CR&gt;</div>
</div>
<p>Then everytime I hit F12, it will help me add the following lines:</p>
<blockquote><p>Changes:  http://search.cpan.org/dist/XXX-YYY/Changes</p></blockquote>
<p>However, some perl modules provide ChangeLog instead of Changes, so need to pay attention to it.</p>
<ol class="footnotes"><li id="footnote_0_502" class="footnote">Anton Berezin</li></ol>]]></content:encoded>
			<wfw:commentRss>http://blog.dragon2.net/2008/01/09/502.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The FreeBSD Laptop Compatibility List</title>
		<link>http://blog.dragon2.net/2008/01/04/500.php</link>
		<comments>http://blog.dragon2.net/2008/01/04/500.php#comments</comments>
		<pubDate>Fri, 04 Jan 2008 02:26:46 +0000</pubDate>
		<dc:creator>clsung</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[Lenovo]]></category>
		<category><![CDATA[Notebook]]></category>

		<guid isPermaLink="false">http://blog.dragon2.net/2008/01/04/500.php</guid>
		<description><![CDATA[The FreeBSD Laptop Compatibility List Dell xps m1330 &#8211; Armin rnajbar &#8211; 19.12.2007 07:29h Lenovo (IBM) T61 &#8211; hyppopotamus &#8211; 08.11.2007 14:21h]]></description>
			<content:encoded><![CDATA[<p><a href="http://laptop.bsdgroup.de/freebsd/">The FreeBSD Laptop Compatibility List</a></p>
<ul>
<li><a href="http://laptop.bsdgroup.de/freebsd/index.html?action=show_laptop_detail&#038;laptop=12666">Dell xps m1330 &#8211; Armin rnajbar &#8211; 19.12.2007 07:29h</a></li>
<li><a href="http://laptop.bsdgroup.de/freebsd/index.html?action=show_laptop_detail&#038;laptop=12654">Lenovo (IBM) T61  &#8211; hyppopotamus &#8211; 08.11.2007 14:21h</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dragon2.net/2008/01/04/500.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl 5.10.0 is released</title>
		<link>http://blog.dragon2.net/2007/12/19/495.php</link>
		<comments>http://blog.dragon2.net/2007/12/19/495.php#comments</comments>
		<pubDate>Wed, 19 Dec 2007 04:42:12 +0000</pubDate>
		<dc:creator>clsung</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[ports]]></category>

		<guid isPermaLink="false">http://blog.dragon2.net/2007/12/19/495.php</guid>
		<description><![CDATA[Perl 5.10.0 is available here. Also with the torrent file. You might want to see What&#8217;s new for perl 5.10.0, for me, the most important thing is Named Capture Buffers(1) And here are some things about performance: In-place sorting: Sorting arrays in place (@a = sort @a) is now optimized&#8230;. Lexical array access: faster Weak references are cheaper: Weak reference creation is now O(1) rather than O(n), deletion remains O(n)&#8230;. sort() enhancements: faster and memory usage reduced Regular expressions optimisations And known problem(s), maybe solved in future (5.12): UTF-8 problems: The handling of Unicode still is unclean in several places, where it&#8217;s dependent on whether a string is internally flagged as UTF-8 Also bundled with some new modules, such asCPANPLUS and encoding::warnings Let&#8217;s wait and see when it will in ports. Notes: the discussion thread is here. Thanks to Rafaël Garcia-Suarez Just like most recent programming languages do (e.g. C# .Net)]]></description>
			<content:encoded><![CDATA[<p>Perl 5.10.0 is available <a href="http://search.cpan.org/~rgarcia/perl-5.10.0/">here</a>. Also with <a href="http://thepiratebay.org/tor/3938859">the torrent file</a>.</p>
<p>You might want to see <a href="http://search.cpan.org/~rgarcia/perl-5.10.0/pod/perl5100delta.pod">What&#8217;s new for perl 5.10.0</a>, for me, the most important thing is <em>Named Capture Buffers</em><sup>(<a href="http://blog.dragon2.net/2007/12/19/495.php#footnote_0_495" id="identifier_0_495" class="footnote-link footnote-identifier-link" title="Just like most recent programming languages do (e.g. C# .Net) ">1</a>)</sup> <img src='http://blog.dragon2.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  And here are some things about performance:</p>
<ul>
<li>In-place sorting: Sorting arrays in place (@a = sort @a) is now optimized&#8230;.</li>
<li>Lexical array access: faster</li>
<li>Weak references are cheaper: Weak reference creation is now O(1) rather than O(n), deletion remains O(n)&#8230;.</li>
<li>sort() enhancements: faster and memory usage reduced</li>
<li>Regular expressions optimisations</li>
</ul>
<p>And known problem(s), maybe solved in future (5.12):</p>
<ul>
<li>UTF-8 problems: The handling of Unicode still is unclean in several places, where it&#8217;s dependent on whether a string is internally flagged as UTF-8</li>
</ul>
<p>Also bundled with some <a href="http://search.cpan.org/~rgarcia/perl-5.10.0/pod/perl5100delta.pod#New_modules">new modules</a>, such as<a href="http://search.cpan.org/dist/CPANPLUS">CPANPLUS</a> and <a href="http://search.cpan.org/dist/encoding-warnings/">encoding::warnings</a> <img src='http://blog.dragon2.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Let&#8217;s wait and see when it will in <a href="http://www.freebsd.org/cgi/cvsweb.cgi/ports/" tiltle="FreeBSD ports">ports</a>. <img src='http://blog.dragon2.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Notes: the discussion thread is <a href="http://groups.google.com/group/perl.perl5.porters/browse_thread/thread/28f79d120969e01a/" title="Perl 5.10.0 is released">here</a>. Thanks to <a href="http://search.cpan.org/~rgarcia/">Rafaël Garcia-Suarez</a> <img src='http://blog.dragon2.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ol class="footnotes"><li id="footnote_0_495" class="footnote">Just like most recent programming languages do (e.g. C# .Net) </li></ol>]]></content:encoded>
			<wfw:commentRss>http://blog.dragon2.net/2007/12/19/495.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

