絖綛 N@i.jp  昨日:00043024
 今日:00016592
 総計:00309048
keywords
管理者専用
  Post   Add link   Control Panel 































新しいトピック
最新:04/16 19:55


新しいコメント
最新:07/28 16:47






管理人へMAIL

プライバシーポリシー

ClamAV 0.102.0 が MacOS X(Tiger-PPC)でビルドできなくなっていたので強行突破してみた(1)

参照:ClamAV


大多数の人には役に立たない、自分のための備忘録です


 オープンソースのアンチウィルスソフト ClamAV Ver.0.102.0が 10月2日にリリースになったのだけど、自宅サーバー(Mac mini G4, Mac OS X 10.4.11 Tiger-PPC)でビルドしようとしたらエラーでビルドできなくなっていました。

$ make
〜
  OBJC     cert_util_mac.lo
../shared/mac/cert_util_mac.m:24:36: 致命的エラー: Security/SecRequirement.h: No such file or directory
コンパイルを停止しました。
make[2]: *** [Makefile:832: cert_util_mac.lo] エラー 1
make[2]: ディレクトリ '/Users/nai/tmp/ClamAV/clamav-0.102.0/libfreshclam' から出ます
make[1]: *** [Makefile:854: all-recursive] エラー 1
make[1]: ディレクトリ '/Users/nai/tmp/ClamAV/clamav-0.102.0' から出ます
make: *** [Makefile:650: all] エラー 2

原因は見てのとおり"Security/SecRequirement.h" が Mac OS X 10.4.11 (Tiger-PPC) には無いからです。このファイルは Mac OS X 10.7 (Lion)で追加された物らしいので、ClamAVの方でもこんな古いOSのサポートなんか考えてないでしょう。しかし一つ前の ClamAV-0.101.4 まではビルドできていたので、今版から "Security/SecRequirement.h" を使うようになったのでしょうね。

 どうしようかな〜。ClamAVはメモリ消費が激し過ぎて、もうウチの Mac mini G4 のような貧弱なマシンで動かすのは厳しく、普段は使っていないのだけど・・・別に最新版でなくても良いかぁ〜と思って暫く放置していたのですが、昨日少し突破策を探ってみまして、ちょっとだけ何とかなりました。

 一つ前の ClamAV-0.101.4 と sharedディレクトリの下を比較したところ、今版から "shared/mac" と "shared/linux" というディレクトリが出来ており、MacとLinuxとで異なる内容になる物について各々のソースプログラムが格納されているようです。で、Mac用のソースプログラムが "shared/mac/cert_util_mac.m" で、この中から "Security/SecRequirement.h" をimportしているんですね。importしたいファイルが無いんじゃ正攻法では突破できず強行突破するしかないわけでして、以下のようにしてみました。

$ cd shared/mac
$ mv cert_util_mac.m cert_util_mac.m.org
$ ln -s ../linux/cert_util_linux.c ./cert_util_mac.m

要するに Mac用のソースは使わず、Linux用のソースを使うようにしただけです。これで何とかビルドは成功しました。しかし、動作はちょっとダメっぽい。
 "shared/mac/cert_util_mac.m"にはコメントで「OpenSSL certificate verification for macOS.」と書かれてあるので、OpenSSLによる暗号化通信に関する処理ではないかな?ClamAV-0.102.0のリリースノートによると、ウィルス定義ファイル更新コマンド freshclam で HTTPSサポートを追加したとあるので、これに関係しているのではないかと思われました。
 そこで手動で freshclam を動かしてみたところ、確かに https でウィルス定義ファイルをダウンロードしようとしているのですが、証明書または暗号鍵の問題か?ダウンロードが失敗しているっぽい。

$ sudo /usr/local/clamXav/bin/freshclam --config-file=/usr/local/clamXav/etc/freshclam.conf --verbose
ClamAV update process started at Sun Oct 27 10:51:12 2019
Current working dir is /usr/local/clamXav/share/clamav/
Current working dir restored to /usr/local/clamXav/share/clamav
Querying current.cvd.clamav.net
TTL: 624
fc_dns_query_update_info: Software version from DNS: 0.102.0
Current working dir is /usr/local/clamXav/share/clamav/
check_for_new_database_version: Local copy of daily found: daily.cld.
query_remote_database_version: daily.cvd version from DNS: 25614
daily database available for update (local version: 25613, remote version: 25614)
Current database is 1 version behind.
Downloading database patch # 25614...
Retrieving https://database.clamav.net/daily-25614.cdiff
downloadFile: Download source:      https://database.clamav.net/daily-25614.cdiff
downloadFile: Download destination: ./clamav-36734c4dcb548790c0f339aedfbb91b0.tmp
*   Trying 104.16.218.84:443...
* TCP_NODELAY set
* Connected to database.clamav.net (104.16.218.84) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 0
WARNING: Download failed (60) WARNING:  Message: SSL peer certificate or SSH remote key was not OK
WARNING: getpatch: Can't download daily-25614.cdiff from https://database.clamav.net/daily-25614.cdiff

〜長いので途中略〜

Retrieving https://database.clamav.net/daily.cvd
downloadFile: Download source:      https://database.clamav.net/daily.cvd
downloadFile: Download destination: /usr/local/clamXav/share/clamav/tmp/clamav-6265f86e56377d74a302bde6661a2af5.tmp
*   Trying 104.16.219.84:443...
* TCP_NODELAY set
* Connected to database.clamav.net (104.16.219.84) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 0
ERROR: Download failed (60) ERROR:  Message: SSL peer certificate or SSH remote key was not OK
ERROR: getcvd: Can't download daily.cvd from https://database.clamav.net/daily.cvd
Giving up on https://database.clamav.net...
ERROR: Update failed for database: daily
Current working dir restored to /usr/local/clamXav/share/clamav
WARNING: fc_update_databases: fc_update_database failed: Connection failed (5)
ERROR: Database update process failed: Connection failed (5)
ERROR: Update failed.

さて、どうしたものか。"SSL certificate problem: unable to get local issuer certificate"(赤字の部分。ローカル証明書が取得できない?)って言っているから、何か設定が要るのかなぁ。それとも一つ前の版に戻すか?


■ このトピックへのコメント投稿フォーム ■
キャンセル
※ HTMLタグは使えません
* 名前
* MAIL
* URL
本文
PASS ※ 半角英数8文字まで
認証 ※ 八八四七八を半角数字で入力して下さい
  * 印の項目をcookieに保存する

2019 calendar
11月
12
3456789
10111213141516
17181920212223
24252627282930


掲示板
最新:08/15 17:19


GsBlog was developed by GUSTAV, Copyright(C) 2003, Web Application Factory All Rights Reserved.