2008年5月5日月曜日

(FreeBSD) たまにportupgradeがおかしなことをする? ~ アップデートに失敗してアンインストールされてしまう

以前から薄々気がついていたこと。



portupgradeでportsのソフトウェアのアップデートをしたときに、アップデート作業が何かのエラーで途中で失敗してしまうと、どういうわけか、今までインストールされていたものがアンインストールされて、それでおしまい、という酷いことが、たまにおきてます。



これまで、「まあいいか、気のせい、気のせい」、で済ませていたのですが、先週、たまたま、実行する様子をながめていて、「おい、何やってんだよ!」と言いたくなる様子が見えました。



「portupgrade -Pa」で、バイナリパッケージ(事前に別マシンでportupgrade -pでビルドしておいたパッケージ)を使って、アップデートをしていました。



thunderbirdのアップデートが失敗したあげく、アンインストールされてしまいました。



--->  Checking for the latest package of 'mail/thunderbird'
--->  Fetching the package(s) for 'thunderbird-2.0.0.12_3' (mail/thunderbird)
--->  Fetching thunderbird-2.0.0.12_3
★このとき、たまたま/usr/ports/packages以下に、thunderbirdのバイナリパッケージがなかったので、外にFTPでダウンロードしようとしている
fetch: ftp://ftp3.FreeBSD.org/pub/FreeBSD/ports/i386/packages-6-stable/All/thunderbird-2.0.0.12_3.tbz: Connection refused
** The command returned a non-zero exit status: 1
** Failed to fetch ftp://ftp3.FreeBSD.org/pub/FreeBSD/ports/i386/packages-6-stable/All/thunderbird-2.0.0.12_3.tbz
fetch: ftp://ftp3.FreeBSD.org/pub/FreeBSD/ports/i386/packages-6-stable/All/thunderbird-2.0.0.12_3.tgz: Connection refused
** The command returned a non-zero exit status: 1
** Failed to fetch ftp://ftp3.FreeBSD.org/pub/FreeBSD/ports/i386/packages-6-stable/All/thunderbird-2.0.0.12_3.tgz
★ただ、firewallの関係で、ダウンロードに失敗
** Failed to fetch thunderbird-2.0.0.12_3
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! thunderbird-2.0.0.12_3        (fetch error)
** Could not find the latest version (2.0.0.12_3)
--->  Using the port instead of a package
★バイナリパッケージはあきらめ、portsで、ソースから独自にビルドしようとしている
--->  Upgrading 'thunderbird-2.0.0.12_1' to 'thunderbird-2.0.0.12_3' (mail/thunderbird)
--->  Building '/usr/ports/mail/thunderbird'
===>  Cleaning for thunderbird-2.0.0.12_3
★portauditによって、このバージョンのthunderbirdにはセキュリティホールがあることがわかっているので、ビルドが中止される
===>  thunderbird-2.0.0.12_3 has known vulnerabilities:
=> firefox -- javascript garbage collector vulnerability.
   Reference: <http://www.FreeBSD.org/ports/portaudit/67bd39ba-12b5-11dd-bab7-0016179b2dd5.html>
=> mozilla -- multiple vulnerabilities.
   Reference: <http://www.FreeBSD.org/ports/portaudit/12b336c6-fe36-11dc-b09c-001c2514716c.html>
=> Please update your ports tree and try again.
*** Error code 1



Stop in /work/FreeBSD/ports/mail/thunderbird.
*** Error code 1



Stop in /work/FreeBSD/ports/mail/thunderbird.
★というわけで、エラー終了になると思いきや・・・何かやってる
--->  Backing up the old version
★アンインストールしはじめた。何やってんだよ!
--->  Uninstalling the old version
--->  Deinstalling 'thunderbird-2.0.0.12_1'
Could not parse file '/usr/local/share/applications/gimp-2.2.desktop': No such file or directory
★とうとうアンインストールしてしまった
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 1164 packages found (-1 +0) (...) done]
★ビルドに失敗してるのに、なぜかインストールしようとしてる
--->  Installing the new version via the port
★セキュリティホールがあるから、インストールもできないんだってば
===>  thunderbird-2.0.0.12_3 has known vulnerabilities:
=> firefox -- javascript garbage collector vulnerability.
   Reference: <http://www.FreeBSD.org/ports/portaudit/67bd39ba-12b5-11dd-bab7-0016179b2dd5.html>
=> mozilla -- multiple vulnerabilities.
   Reference: <http://www.FreeBSD.org/ports/portaudit/12b336c6-fe36-11dc-b09c-001c2514716c.html>
=> Please update your ports tree and try again.
*** Error code 1



Stop in /work/FreeBSD/ports/mail/thunderbird.
*** Error code 1



Stop in /work/FreeBSD/ports/mail/thunderbird.
*** Error code 1



Stop in /work/FreeBSD/ports/mail/thunderbird.
===>  Cleaning for thunderbird-2.0.0.12_3
--->  Cleaning out obsolete shared libraries



で、結局、アンインストールされて、終わり。





以下は、似たようなことを、別のFreeBSD7なマシンでやってみたときの様子。



--->  Checking for the latest package of 'mail/thunderbird'
--->  Fetching the package(s) for 'thunderbird-2.0.0.12_3' (mail/thunderbird)
--->  Fetching thunderbird-2.0.0.12_3
** The command returned a non-zero exit status: 1
** Failed to fetch ftp://ftp3.FreeBSD.org/pub/FreeBSD/ports/i386/packages-7-stable/All/thunderbird-2.0.0.12_3.tbz
** The command returned a non-zero exit status: 1
** Failed to fetch ftp://ftp3.FreeBSD.org/pub/FreeBSD/ports/i386/packages-7-stable/All/thunderbird-2.0.0.12_3.tgz
** Failed to fetch thunderbird-2.0.0.12_3
** Listing the failed packages (-:ignored / *:skipped / !:failed)
    ! thunderbird-2.0.0.12_3    (fetch error)
** Could not find the latest version (2.0.0.12_3)
--->  Using the port instead of a package
--->  Upgrading 'thunderbird-2.0.0.12_1' to 'thunderbird-2.0.0.12_3' (mail/thunderbird)
--->  Building '/usr/ports/mail/thunderbird'
===>  Cleaning for thunderbird-2.0.0.12_3
===>  thunderbird-2.0.0.12_3 has known vulnerabilities:
=> firefox -- javascript garbage collector vulnerability.
   Reference: <http://www.FreeBSD.org/ports/portaudit/67bd39ba-12b5-11dd-bab7-0016179b2dd5.html>
=> mozilla -- multiple vulnerabilities.
   Reference: <http://www.FreeBSD.org/ports/portaudit/12b336c6-fe36-11dc-b09c-001c2514716c.html>
=> Please update your ports tree and try again.
*** Error code 1



Stop in /a/sba/host/usr/ports/mail/thunderbird.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.41350.2 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=thunderbird-2.0.0.12_1 UPGRADE_PORT_VER=2.0.0.12_1 make FETCH_BEFORE_ARGS=-q
** Fix the problem and try again.



こちらの場合は、portsでビルドしようとして、セキュリティホールがあるから中止、となるところまでは同じですが、そのとき「** Command failed」というのが出てて、そこでportupgradeも終了しているんです。何ですか、この違いは…



そろそろ、rubyの勉強をはじめた方がいいのでしょうかね。



0 件のコメント:

コメントを投稿