<?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>rafan's blog &#187; Workstation Lab</title>
	<atom:link href="http://blog.rafan.org/categories/csie/217/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.rafan.org</link>
	<description>rafan? rafan!</description>
	<lastBuildDate>Mon, 26 Apr 2010 15:19:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-RC3-17376</generator>
		<item>
		<title>FreeBSD local ports</title>
		<link>http://blog.rafan.org/archives/121</link>
		<comments>http://blog.rafan.org/archives/121#comments</comments>
		<pubDate>Thu, 18 May 2006 15:16:37 +0000</pubDate>
		<dc:creator>rafan</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[CSIE]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Ports]]></category>
		<category><![CDATA[Workstation Lab]]></category>

		<guid isPermaLink="false">http://rafan.infor.org/blog/archives/121</guid>
		<description><![CDATA[前陣子在整理工作站裝的 Ports 跟 patches 的時候，決定自己造造一個 local 的類別，來放這個 patch 過的 ports，好處是很多東西就不用再手動 patch，而且也可以換像是 portsnap(8) 這種好東西。 在做這些東西之前，最好要對 Ports system 有些認識，一些細節的部份我就不多說，可以參考 FreeBSD Porter&#8217;s Handbook。首先，要造一個目錄來放 local ports： mkdir /usr/ports/local 然後，造一個 local/Makefile： COMMENT = Local ports SUBDIR += your_port .include &#60;bsd.port.subdir.mk&#62; 跟 local/Makefile.inc： PKGNAMEPREFIX?= local- PKGCATEGORY= local 然後在 ports/Makefile.local 寫： SUBDIR += local 在 /etc/make.conf 加上： VALID_CATEGORIES+= local 再來就是你要自己製造你想要的 ports 了，這邊就不多說了。還有一個問題要處理的是 [...]]]></description>
			<content:encoded><![CDATA[<p>前陣子在整理工作站裝的 Ports 跟 patches 的時候，決定自己造造一個 local 的類別，來放這個 patch 過的 ports，好處是很多東西就不用再手動 patch，而且也可以換像是 portsnap(8) 這種好東西。</p>
<p>在做這些東西之前，最好要對 Ports system 有些認識，一些細節的部份我就不多說，可以參考 <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/">FreeBSD Porter&#8217;s Handbook</a>。首先，要造一個目錄來放 local ports：</p>
<blockquote><p>mkdir /usr/ports/local</p></blockquote>
<p>然後，造一個 local/Makefile：</p>
<blockquote><p>COMMENT = Local ports<br />
SUBDIR += your_port<br />
.include &lt;bsd.port.subdir.mk&gt;</p></blockquote>
<p>跟 local/Makefile.inc：</p>
<blockquote><p>PKGNAMEPREFIX?= local-<br />
PKGCATEGORY=    local</p></blockquote>
<p>然後在 ports/Makefile.local 寫：</p>
<blockquote><p>SUBDIR += local</p></blockquote>
<p>在 /etc/make.conf 加上：</p>
<blockquote><p>VALID_CATEGORIES+=      local</p></blockquote>
<p>再來就是你要自己製造你想要的 ports 了，這邊就不多說了。還有一個問題要處理的是 INDEX。如果有用 portupgrade(1) 的話，每次更新過 ports tree 之後，用 portsdb -Uu 來更新一次 INDEX 跟 INDEX.db，這樣子才不會出意外。我知道這個很慢（在 P4-2.8G 的機器大概是 13 分鐘），不高興的話，可以試試看 sysutils/p5-FreeBSD-PortIndex 或者想辦法用 portsanp(8) 的 make_index 弄，這部份可以參考前陣子 -ports@ mailing 上面有過一些討論。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rafan.org/archives/121/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>nfs mount 不要用 intr (-i)</title>
		<link>http://blog.rafan.org/archives/120</link>
		<comments>http://blog.rafan.org/archives/120#comments</comments>
		<pubDate>Thu, 16 Mar 2006 01:53:32 +0000</pubDate>
		<dc:creator>rafan</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[CSIE]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Workstation Lab]]></category>

		<guid isPermaLink="false">http://rafan.infor.org/blog/archives/120</guid>
		<description><![CDATA[前陣子在研究為什麼單純的 dd 寫到 nfs 上面 ^C 會 panic，在半天之內 post 三次到 stable@，不過都沒人理我 XD 後來翻 open PRs，看到 PR/79700，裡面說到 intr (-i) 這個選項會讓很多行為變得很怪，不太建議使用。後來仔細一看，我真的用了這個，拿掉之後，一切快樂無比&#8230;。 另外，我懷疑 217 很多卡在 nfsaio 的也是這個原因，不過要等下次重開機才能拿掉這選項了。]]></description>
			<content:encoded><![CDATA[<p>前陣子在研究為什麼單純的 dd 寫到 nfs 上面 ^C 會 panic，在半天之內 post 三次到 stable@，不過都沒人理我 XD 後來翻 open PRs，看到 <a title="kern/79700" href="http://www.freebsd.org/cgi/query-pr.cgi?pr=79700">PR/79700</a>，裡面說到 intr (-i) 這個選項會讓很多行為變得很怪，不太建議使用。後來仔細一看，我真的用了這個，拿掉之後，一切快樂無比&#8230;。</p>
<p>另外，我懷疑 217 很多卡在 nfsaio 的也是這個原因，不過要等下次重開機才能拿掉這選項了。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rafan.org/archives/120/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FreeBSD foot-shooting!</title>
		<link>http://blog.rafan.org/archives/114</link>
		<comments>http://blog.rafan.org/archives/114#comments</comments>
		<pubDate>Thu, 01 Sep 2005 10:48:24 +0000</pubDate>
		<dc:creator>rafan</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[CSIE]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Workstation Lab]]></category>

		<guid isPermaLink="false">http://rafan.infor.org/blog/?p=114</guid>
		<description><![CDATA[As of 5.x and above, you can NOT modify partition table whose disk is in-use. This is so-called anti-foot-shooting feature of GEOM. After searching mailing lists, I found that setting the 4-th bit of kern.geom.debugflags to 1 will turn off this *feature*. *grin* The original message is here.]]></description>
			<content:encoded><![CDATA[<p>As of 5.x and above, you can NOT modify partition table whose disk is in-use. This is so-called anti-foot-shooting feature of GEOM.</p>
<p>After searching mailing lists, I found that setting the 4-th bit of kern.geom.debugflags to 1 will turn off this *feature*. *grin*</p>
<p>The original message is <a href="http://groups.google.com.tw/group/comp.unix.bsd.freebsd.misc/msg/cd212f2b65cfb099?hl=zh-TW&#038;">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rafan.org/archives/114/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NFS 跟 HTT</title>
		<link>http://blog.rafan.org/archives/88</link>
		<comments>http://blog.rafan.org/archives/88#comments</comments>
		<pubDate>Fri, 15 Apr 2005 08:26:18 +0000</pubDate>
		<dc:creator>rafan</dc:creator>
				<category><![CDATA[CSIE]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Workstation Lab]]></category>

		<guid isPermaLink="false">http://rafan.infor.org/blog/archives/88</guid>
		<description><![CDATA[剛才被抱怨說為什麼最近在 NFS 存取大檔案都很慢，結果我測了一下，寫 100MB 要 30 秒，這速度實在是太糟糕了，結果跑去 server 把 HTT *打開*，瞬間變成 5秒&#8230;。說到這個，有另外一台機器，*打開* HTT 的話（5.3），network 反應時間會不正常。到底是 FreeBSD 你有問題還是 HTT 有問題&#8230;. 說到 5.3，讓我想到最近應該有台 SMP 跑 4.x 的機器硬碟有問題要換掉，應該會重灌，我在認真考慮玩玩看 DragonFly BSD 1.2，然後等 1.3 出之後，看看效果到底怎樣。]]></description>
			<content:encoded><![CDATA[<p>剛才被抱怨說為什麼最近在 NFS 存取大檔案都很慢，結果我測了一下，寫 100MB 要 30 秒，這速度實在是太糟糕了，結果跑去 server  把 HTT *打開*，瞬間變成 5秒&#8230;。說到這個，有另外一台機器，*打開* HTT 的話（5.3），network 反應時間會不正常。到底是 FreeBSD 你有問題還是 HTT 有問題&#8230;.</p>
<p>說到 5.3，讓我想到最近應該有台 SMP 跑 4.x 的機器硬碟有問題要換掉，應該會重灌，我在認真考慮玩玩看 DragonFly BSD 1.2，然後等 1.3 出之後，看看效果到底怎樣。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rafan.org/archives/88/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD 5.4-RC? on amd64</title>
		<link>http://blog.rafan.org/archives/87</link>
		<comments>http://blog.rafan.org/archives/87#comments</comments>
		<pubDate>Fri, 15 Apr 2005 08:23:06 +0000</pubDate>
		<dc:creator>rafan</dc:creator>
				<category><![CDATA[CSIE]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Workstation Lab]]></category>

		<guid isPermaLink="false">http://rafan.infor.org/blog/archives/87</guid>
		<description><![CDATA[最近一台 5.4-RC1/2 的 amd64 機器，有事沒事就給我 hang 在那邊，一定要 reboot 才行。早一點的時候，已經寫信去 stable@ 幹兩下了，同時先回 5.3-p9，雖然我記得 5.3 也會，可是沒那麼頻繁（開個兩個小時就炸了&#8230; !@#$），先放著看看了]]></description>
			<content:encoded><![CDATA[<p>最近一台 5.4-RC1/2 的 amd64 機器，有事沒事就給我 hang 在那邊，一定要 reboot 才行。早一點的時候，已經寫信去 stable@ 幹兩下了，同時先回 5.3-p9，雖然我記得 5.3 也會，可是沒那麼頻繁（開個兩個小時就炸了&#8230; !@#$），先放著看看了 <img src='http://blog.rafan.org/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rafan.org/archives/87/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LPRng 跟 8bit jobname</title>
		<link>http://blog.rafan.org/archives/86</link>
		<comments>http://blog.rafan.org/archives/86#comments</comments>
		<pubDate>Fri, 08 Apr 2005 06:30:31 +0000</pubDate>
		<dc:creator>rafan</dc:creator>
				<category><![CDATA[CSIE]]></category>
		<category><![CDATA[Printing]]></category>
		<category><![CDATA[Workstation Lab]]></category>

		<guid isPermaLink="false">http://rafan.infor.org/blog/archives/86</guid>
		<description><![CDATA[長久一來，如果印中文檔名的話，jobname 是爛掉的，剛去看 LPRng source，發現他在 Clean_meta() 的時候被處理過，而理由在這邊。 簡單的說，因為 RFC1179 根本就沒定義 control file 可以包含的字元集，而很多 implementation 都會假定有，於是乎 LPRng 只好把他們幹掉，以免和其他的 implementation 產生問題。 我剛看了一下 source，這個在生 control file (lpr) 的時候就會處理，所以得所有 client 都弄一弄，另外一個是 lpd 也會在收到 job 的時候處理&#8230; 所以看起來最快的方式是把 Clean_meta() 變成假的 XD 不過可能得再仔細看看 code，以免 exploitable&#8230; Update: 我又想了一下，最快的就是先過 rawurlencode() 然後就沒問題了 *grin*（其實我目的只是要在 web 上面讀出來是對的&#8230;） Update2: patch]]></description>
			<content:encoded><![CDATA[<p>長久一來，如果印中文檔名的話，jobname 是爛掉的，剛去看 LPRng source，發現他在 Clean_meta() 的時候被處理過，而理由在<a href="http://www.lprng.com/LPRng-Reference-Multipart/safechars.htm">這邊</a>。</p>
<p>簡單的說，因為 RFC1179 根本就沒定義 control file 可以包含的字元集，而很多 implementation 都會假定有，於是乎 LPRng 只好把他們幹掉，以免和其他的 implementation 產生問題。</p>
<p>我剛看了一下 source，這個在生 control file (lpr) 的時候就會處理，所以得所有 client  都弄一弄，另外一個是 lpd 也會在收到 job 的時候處理&#8230; 所以看起來最快的方式是把 Clean_meta() 變成假的 XD 不過可能得再仔細看看 code，以免 exploitable&#8230; <img src='http://blog.rafan.org/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> </p>
<p>Update: 我又想了一下，最快的就是先過 rawurlencode() 然後就沒問題了 *grin*（其實我目的只是要在 web 上面讀出來是對的&#8230;）<br />
Update2: <a href="http://rafan.infor.org/patch/patch-LPRng-urlencode-jobname">patch</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rafan.org/archives/86/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ypbind -m</title>
		<link>http://blog.rafan.org/archives/82</link>
		<comments>http://blog.rafan.org/archives/82#comments</comments>
		<pubDate>Sun, 03 Apr 2005 09:15:39 +0000</pubDate>
		<dc:creator>rafan</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[CSIE]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Workstation Lab]]></category>

		<guid isPermaLink="false">http://rafan.infor.org/blog/archives/82</guid>
		<description><![CDATA[剛發現 ypbind 有加 -m 的時候，如果原本 bind 的 fail，他會花較久的時候才會 bind 到另外一台。還沒空仔細研究狀況，不過現在拿掉 -m 了。]]></description>
			<content:encoded><![CDATA[<p>剛發現 ypbind 有加 -m 的時候，如果原本 bind 的 fail，他會花較久的時候才會 bind 到另外一台。還沒空仔細研究狀況，不過現在拿掉 -m 了。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rafan.org/archives/82/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>magicfilter 2.x</title>
		<link>http://blog.rafan.org/archives/80</link>
		<comments>http://blog.rafan.org/archives/80#comments</comments>
		<pubDate>Wed, 23 Mar 2005 13:50:56 +0000</pubDate>
		<dc:creator>rafan</dc:creator>
				<category><![CDATA[CSIE]]></category>
		<category><![CDATA[Printing]]></category>
		<category><![CDATA[Workstation Lab]]></category>

		<guid isPermaLink="false">http://rafan.infor.org/blog/archives/80</guid>
		<description><![CDATA[我終於發現了，magicfilter 2.x 的 filter 那個裡面格式其實還是差不多，只是印表機的 description 用 m4 寫，所以應該可以來換了&#8230;]]></description>
			<content:encoded><![CDATA[<p>我終於發現了，magicfilter 2.x 的 filter 那個裡面格式其實還是差不多，只是印表機的 description 用 m4 寫，所以應該可以來換了&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rafan.org/archives/80/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>forward 的用處&#8230;</title>
		<link>http://blog.rafan.org/archives/79</link>
		<comments>http://blog.rafan.org/archives/79#comments</comments>
		<pubDate>Wed, 16 Mar 2005 13:26:45 +0000</pubDate>
		<dc:creator>rafan</dc:creator>
				<category><![CDATA[CSIE]]></category>
		<category><![CDATA[Workstation Lab]]></category>

		<guid isPermaLink="false">http://rafan.infor.org/blog/?p=79</guid>
		<description><![CDATA[剛才在研究某封怪信為什麼會跑到 root 的信箱，才發現某人的 .forward 裡面放的是 root&#8230; !@#$%]]></description>
			<content:encoded><![CDATA[<p>剛才在研究某封怪信為什麼會跑到 root 的信箱，才發現某人的 .forward 裡面放的是 root&#8230; !@#$%</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rafan.org/archives/79/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>有沒有腦袋</title>
		<link>http://blog.rafan.org/archives/78</link>
		<comments>http://blog.rafan.org/archives/78#comments</comments>
		<pubDate>Thu, 10 Mar 2005 14:34:49 +0000</pubDate>
		<dc:creator>rafan</dc:creator>
				<category><![CDATA[CSIE]]></category>
		<category><![CDATA[Workstation Lab]]></category>

		<guid isPermaLink="false">http://rafan.infor.org/blog/?p=78</guid>
		<description><![CDATA[媽的，機器就兩顆 CPU 你跑個 16 隻/55 隻程式是會比較爽是吧!]]></description>
			<content:encoded><![CDATA[<p> 媽的，機器就兩顆 CPU 你跑個 16 隻/55 隻程式是會比較爽是吧!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rafan.org/archives/78/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

