2012年4月30日月曜日

my gentoo に skype 入れようとしたら以下のエラー。

ryox61:/etc/portage$ sudo emerge skype

 * IMPORTANT: 7 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

Calculating dependencies... done!
[ebuild     U  ] app-emulation/emul-linux-x86-baselibs-20120127 [20110928]
[ebuild  N     ] app-emulation/emul-linux-x86-db-20120127  USE="-development"
[ebuild     U  ] app-emulation/emul-linux-x86-xlibs-20120127 [20110928]
[ebuild     U  ] app-emulation/emul-linux-x86-opengl-20120127 [20110928]
[ebuild     U  ] app-emulation/emul-linux-x86-medialibs-20120127 [20110928]
[ebuild     U  ] app-emulation/emul-linux-x86-soundlibs-20120127 [20110928]
[ebuild     U  ] app-emulation/emul-linux-x86-sdl-20120127 [20110928]
[ebuild  N     ] app-emulation/emul-linux-x86-qtlibs-20120127  USE="-development"
[ebuild  N    ~] net-im/skype-2.2.0.35-r1  USE="-pax_kernel -qt-static"

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

emul-linux-x86 関連を以下のように一つずつ update で回避。

for p in emul-linux-x86-{gtklibs,opengl,sdl,medialibs,soundlibs,xlibs,baselibs} ; do sudo emerge -u $p ; done
emerge skyepe

2012年4月19日木曜日

X60 に kernel 3.2.12 Atheros ドライバ



X60 の gentoo の kernel を 3.2.12 に上げたんだけど、ifconfig で
内蔵 Atheros 無線 LAN カードを on にしようとしたら以下のエラー。

SIOCSIFFLAGS: Operation not possible due to RF-kill

Web を調べる限りどうも rfkill というユーティリティでその有効無効を
設定できるよう。 emerge で rfkill 入れて rfkill list してみてみたら確
かに soft blocked というところが以下のように yes になってる

 0: phy0: Wireless LAN
     Soft blocked: yes
     Hard blocked: no

なので rfkill unblock 0 などとして off してみたところ上記の yes の
ところが no になった。これで行けるかと思い ifconfig wlan3 up してみ
たところ、また最初と同じエラー。はぁ?と思い rfkill list したのだが、
今度は下記のように Hard が yes。

 0: phy0: Wireless LAN
     Soft blocked: no
     Hard blocked: yes

えぇぇ〜。rmmod で ath5k を外して modprobe しなおしたりいろいろやった
がどうも ifconfig で interface を up にすると Hard blocked yes
になってしまう。

modinfo 見ても rfkill 関連のオプションなし。結局 ath5k のソースを見た
ところ、問答無用に rfkill を有効にしていて off る方法はなさげ。

が、以下のパッチ発見。

http://answerpot.com/showthread.php?3197032-ath5k%3A+Add+a+module+parameter+to+disable+hw+rf+kill+switch

単純にパラメータ増やして rfkill のところを無効にしている。ただ、このま
まじゃあたらないので手パッチした。手パッチしたのを diff 取ったので一応
以下にアップしておく。これでうまくいけばいいんだけど…

 http://www.fastriver.net/~ryo/mycontents/ath5k/base.c-3.2.12-gentoo.patch

あ、コンパイル終わったかな。以下の内容で /etc/modprobe.d/ath5k.conf
を作成して modprobe ath5k

options ath5k no_hw_rfkill_switch=1

どうも最初に rfkill unblock 0 しなくちゃならんのは変わらないが、その後
ifconfig wlan3 up できた! ad-hoc も OK だし。よかった!

2012年4月18日水曜日

単なる自分のためのメモ

本日 emerge -p -u world したら以下とほぼ同じ現象発生。

https://forums-web1.gentoo.org/viewtopic-t-915134-start-0.html


sys-apps/util-linux-2.20.1-r1 sys-apps/sysvinit-2.88-r3がどーたら
こーたらでブロック。細かいことはあとで調べようと、とりあえずす
ぐにやっちゃいたかったので、上記 URL にあるように emerge に
--deep を付与することにした。


関門は通過したが、その後また以下と同じ現象発生。

http://forums.gentoo.org/viewtopic-t-914400-start-0.html


こんどは talloc がどーたらこーたらでブロック。上記 URL によれば、
一旦 talloc を削除して oneshot で入れなおせと(emerge -C してから
emerge -1)。


その後 worldしたところできた。

2012年4月16日月曜日

emulator から proxy 経由で android.webkit.WebView

emulator 経由で WebView が proxy を使うようにしたかった。
以下を発見したのでメモ。

android WebView internet access problem, because of proxy?

http://stackoverflow.com/questions/6673159/android-webview-internet-access-problem-because-of-proxy

onCreate() に以下記述
  WebView.enablePlatformNotifications();

AndroidManifest.xml に以下追加
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
  <uses-permission android:name="android.permission.INTERNET"></uses-permission>

2012年4月10日火曜日

modifyTimestamp の書式

LDAP の modifyTimestamp の書式がどうなってるのかとRFC2252をチェック。

 5.1.2. modifyTimestamp

   This attribute SHOULD appear in entries which have been modified
   using the Modify operation.

    ( 2.5.18.2 NAME 'modifyTimestamp' EQUALITY generalizedTimeMatch
      ORDERING generalizedTimeOrderingMatch
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
      SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )
 
ということで 「1.3.6.1.4.1.1466.115.121.1.24」だそうで、これは
「Generalized Time syntax」だそうで。

これをぐぐると、IBM や MS のページくらいしか無いのだが、以下の記述があり。 
 
 
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/rzahy/rzahyutctime.htm
Generalized Time 構文は次の形式を取ります。

YYYYMMDDHHMMSS[.|,fraction][(+|-HHMM)|Z]
年に 4 桁、月、日、時、分、および秒それぞれに 2 
桁、および秒のオプションの小数部があります。これ以上追加しない場合には、日時はローカル時間帯という前提になります。時刻を協定世界時で測ることを示
すために、時刻または地方時の時差に大文字の Z を追加してください。
たとえば、次のようになります。

"19991106210627.3"
これは地方時では、1999 年 11 月 6 日、午後 9 時 6 分 27.3 秒です。
          

"19991106210627.3Z"
これは協定世界時です。
          

"19991106210627.3-0500"
これは最初の例と同じ地方時で、協定世界時と比較すると 5 時間の差があります。

秒のオプションの小数部を指定する場合は、ピリオドまたはコンマが必要です。地方時の時差では、「+」または「-」を時間と分の値の前に入れる必要があります。

2012年4月6日金曜日

?! って正規表現を知らんかった。

<LocationMatch  "^/(?!error.html)">

で error.html 以外。この ?! という正規表現を知らなかった。

https://issues.apache.org/bugzilla/show_bug.cgi?id=10932