非公開プロパティの探し方

Mac OS X 用のコマンドはプロパティを設定することでデフォルトの動作を変えられるが、公表されていないプロパティも少なくない。

プロパティは文字列で指定するので、コマンドを strings にかけると非公開のプロパティも見つけられる。

ところが Dock を調べてみても、プロパティっぽい文字列が一切出てこない。

$ strings /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock
r5Ij0I
.TA^
"EuG
    ...
{ao/u
e88P
~7B$

ひょっとすると、無駄に UTF-16 とかの文字列を使ってるんだろうか?

$ nkf -W16e /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock |
> strings
^L^L^L^L^L
^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L
^L^L^L^L^L^L^L^L^L^L^L^L^L^L
    ...
@$^LP
@$^LP
____

違ったみたい。

いろいろ足掻いてみた結果、

$ nkf -We /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock |
> strings
__PAGEZERO
__TEXT
    ...
orientation
middle
start
pinning
suck
    ...

見れた。

openssl が新しくなったらしい

MacPorts の更新を確認してみると、

$ port outdated
The following installed ports are outdated:
openssl                        0.9.8k_0 < 0.9.8k_0

バージョンがまったく同じに見えるんですけど。

$ sudo port upgrade openssl
--->  Fetching openssl
--->  Verifying checksum(s) for openssl
--->  Extracting openssl
--->  Applying patches to openssl
--->  Configuring openssl
--->  Building openssl
--->  Staging openssl into destroot
--->  Deactivating openssl @0.9.8k_0+rfc3779
--->  Uninstalling openssl @0.9.8k_0+rfc3779
--->  Installing openssl @0.9.8k_0+rfc3779
--->  Activating openssl @0.9.8k_0+rfc3779
--->  Cleaning openssl

何か更新したらしい。

$ port outdated
No installed ports are outdated.

$ port installed openssl
The following ports are currently installed:
  openssl @0.9.8j_0+rfc3779
  openssl @0.9.8k_0+rfc3779 (active)

謎だ。

音楽の再生がひっかかる

音楽の再生中に CD の音とびのようになる (ことがある)

音とびした箇所を聞き直すと、今度は音とびしないので、AAC ファイルが壊れている訳ではなさそう。

最近、いろいろ環境を変えたので、何が原因なのか分からない。

同じ日に同じ設定で読み込んだ 2 枚の CD のうち、片方だけが音とびする。

なんだか CPU パワーが足りてない感じ。
初期の iPod touch だから?
買い替え時なのかなぁ?

*1:256Kbsp と iTunes Plus は同じ?

その後の MacPorts

これで解決したかと思ったけど、やっぱりなにか問題があるみたい。

$ sudo port upgrade installed
    ...
--->  Activating perl5 @5.8.8_0+darwin_9
Error: Activating perl5 @5.8.8_0 failed: Image error:
/opt/local/bin/a2p is being used by the active perl5.8 port.
Please deactivate this port first, or use the -f flag to force the activation.
    ...

さて、どうしたもんか。

MacPorts で Perl を upgrade できない

どうやらインストールされている Perl のバージョンが古いらしい。

$ port outdated
The following installed ports are outdated:
perl5                          5.8.8_0 < 5.8.8_2

ところが upgrade すると失敗する。

$ sudo port upgrade perl5
--->  Activating perl5.8 @5.8.8_3+darwin_9
Error: Activating perl5.8 @5.8.8_3 failed: Image error: /opt/local/bin/a2p is being used by the active perl5 port.  Please deactivate this port first, or use the -f flag to force the activation.
--->  Activating perl5.8 @5.8.8_3+darwin_9
Error: Target org.macports.activate returned: Image error: /opt/local/bin/a2p is being used by the active perl5 port.  Please deactivate this port first, or use the -f flag to force the activation.
Error: The following dependencies failed to build: perl5.8
Error: Unable to upgrade port: 1

最新は 5.8.8_2 だと言っておきながら、5.8.8_3 を activate しようとしているっぽい。

調べてみると ……

$ port installed perl5
The following ports are currently installed:
  perl5 @5.8.8_0+darwin_9 (active)

$ port installed | grep perl
  perl5 @5.8.8_0+darwin_9 (active)
  perl5.10 @5.10.0_1+shared
  perl5.10 @5.10.0_2+shared (active)
  perl5.8 @5.8.8_3+darwin_9

なんと!
perl5 と perl5.10 の他に perl5.8 とか言う port もあるのか。

$ sudo port activate perl5.8
--->  Activating perl5.8
Error: port activate failed: Image error: /opt/local/bin/a2p is being used by the active perl5 port.  Please deactivate this port first, or use the -f flag to force the activation.

perl5 と perl5.8 は同時に activate できないと。

$ sudo port deactivate perl5
--->  Deactivating perl5

$ sudo port activate perl5.8
--->  Activating perl5.8

これで正解なのか?

ClamAV をアップデート

2ヶ月ほど前から MacPorts でインストールした ClamAV が動かなかった。

いつものように port upgrade した後、freshclam が動かないことを確認し (;_;)、最新の clamav をアンインストールすると、ひとつ前のバージョンも動かなくなってしまった。

焦りまくって、ひとつ前のバージョンを再インストール。
すると、どういう訳か最新バージョンがインストールされている。

なんでやねん!

そして、freshclam が動かないことを確認すると …… なぜかちゃんと動いてる。謎だ。

嬉しくなって、適当なファイルを clamscan してみると …… 動かない!!

$ clamscan ip8600osx483ej7.dmg 
clamscan: unrecognized option `--unzip'
ERROR: Unknown option passed.
ERROR: Can't parse the command line

--tar --jar --tgz などのアーカイブの中身をスキャンするためのオプションが軒並なくなってる。
ちゃんと中身もスキャンしてくれるんだろうか?

しかし、どうやって確認すれば …… しばし途方に暮れる。

そう言えばフリーの Web メールに、ウイルス付きメールが大量に来てたはず。

早速、それっぽいメールをお取り寄せ。
tar cz した後に tar cj したファイルをスキャンしてみた。

$ clamscan virus.tar.bz2
virus.tar.bz2: Trojan.Agent-59552 FOUND

----------- SCAN SUMMARY -----------
Known viruses: 455148
Engine version: 0.94
Scanned directories: 0
Scanned files: 1
Infected files: 1
Data scanned: 0.07 MB
Time: 2.088 sec (0 m 2 s)

ちゃんと中身もスキャンしてる。