FreeBSD - メンテナンス・トラブルシュート - pkg・ports アップデート関連 - spamassassin-3.4.1_11 → 3.4.1_12

 
1. 概要
2. 調査
3. 進展?
4. 消極的解決

1. 概要

 発生は 2018年6月28日。

> pkg version -vl "<"
spamassassin-3.4.1_11              <   needs updating (index has 3.4.1_12)
 によりアップグレードすると

> portupgrade -Rr spamassassin
[Reading data from pkg(8) ... - 394 packages found - done]
[Gathering depends for mail/spamassassin ................................................................................................................................................................................................................................ done]
[Exclude up-to-date packages .................** Port marked as IGNORE: security/p5-Crypt-OpenSSL-RSA:
        is marked as broken: does not build with DEFAULT_VERSIONS+=ssl=openssl-devel
........................................................ done]
--->  Skipping 'mail/spamassassin' (spamassassin-3.4.1_11) because a requisite package 'p5-Crypt-OpenSSL-RSA-0.28_2' (security/p5-Crypt-OpenSSL-RSA) failed (specify -k to force)
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        - security/p5-Crypt-OpenSSL-RSA (marked as IGNORE)
        * mail/spamassassin (spamassassin-3.4.1_11)

2. 調査

 察するに「SSL(Secure Sockets Layer)」の項に書いていますが、2018年6月28日に openssl を openssl-devel に移行していますが。  p5-Crypt-OpenSSL-RSA が openssl-devel でビルドされていないぞと言っているのでは?  そもそも p5-Crypt-OpenSSL-RSA がインストールされているのかを調べます。

> pkg version -v -n p5-Crypt-OpenSSL-RSA
p5-Crypt-OpenSSL-RSA-0.28_2        =   up-to-date with index
 いるいる。
/etc/make.conf
 に

DEFAULT_VERSIONS+=ssl=openssl-devel
 の記述がある状態で make してインストールしなおせばいいのかな?

プロンプト略
cd /usr/ports/security/p5-Crypt-OpenSSL-RSA
make clean
make
make deinstall
make install
 上記は make の段階で失敗

===>  p5-Crypt-OpenSSL-RSA-0.28_2 is marked as broken: does not build with
DEFAULT_VERSIONS+=ssl=openssl-devel.
*** Error code 1

Stop.
make: stopped in /usr/ports/security/p5-Crypt-OpenSSL-RSA
 う~ん。  あきまへんな、これは。  本項は p5-Crypt-OpenSSL-RSA が openssl-devel に対応されるまで待つとします。

3. 進展?

 前回書いたのが、2018年6月28日で7月2日に少し進展がありました。

> pkg version -vl "<"
mysql57-server-5.7.22              <   needs updating (index has 5.7.22_2)
p5-Crypt-OpenSSL-RSA-0.28_2        <   needs updating (index has 0.30)
php56-openssl-5.6.35_1             <   needs updating (index has 5.6.36_1)
postgresql96-server-9.6.9          <   needs updating (index has 9.6.9_1)
spamassassin-3.4.1_11              <   needs updating (index has 3.4.1_12)
 となりまして p5-Crypt-OpenSSL-RSA が 0.28 から 0.30 に上がるので一気に解決するかと喜びました。

> portupgrade -Rr p5-Crypt-OpenSSL-RSA
[Reading data from pkg(8) ... - 394 packages found - done]
[Gathering depends for security/p5-Crypt-OpenSSL-RSA ............ done]
[Gathering depends for mail/spamassassin .......... done]
[Exclude up-to-date packages ..................................... done]
--->  Upgrading 'p5-Crypt-OpenSSL-RSA-0.28_2' to 'p5-Crypt-OpenSSL-RSA-0.30' (security/p5-Crypt-OpenSSL-RSA)
--->  Building '/usr/ports/security/p5-Crypt-OpenSSL-RSA'
===>  Cleaning for p5-Crypt-OpenSSL-RSA-0.30

・・・略・・・

Installing p5-Crypt-OpenSSL-RSA-0.30...
===>  Cleaning for p5-Crypt-OpenSSL-RSA-0.30
--->  Cleaning out obsolete shared libraries
--->  Upgrading 'spamassassin-3.4.1_11' to 'spamassassin-3.4.1_12' (mail/spamassassin)
--->  Building '/usr/ports/mail/spamassassin'
===>  Cleaning for spamassassin-3.4.1_12
===>  License APACHE20 accepted by the user
===>   spamassassin-3.4.1_12 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by spamassassin-3.4.1_12 for building
===>  Extracting for spamassassin-3.4.1_12
=> SHA256 Checksum OK for Mail-SpamAssassin-3.4.1.tar.gz.

・・・略・・・

***************************************************************************
NOTE: the optional Net::Patricia module is not installed,
minimum required version is 1.16.

  If this module is available, it will be used for IP address lookups
  in tables internal_networks, trusted_networks, and msa_networks. Recommended
  when a number of entries in these tables is large, i.e. in hundreds
  or thousands. However, in case of overlapping (or conflicting) networks
  in these tables, lookup results may differ as Net::Patricia finds a
  tightest-matching entry, while a sequential NetAddr::IP search finds
  a first-matching entry. So when overlapping network ranges are given,
  specifying more specific subnets (longest netmask) first, followed by
  wider subnets ensures predictable results.

checking binary dependencies and their versions...

***************************************************************************
NOTE: the optional wget binary is not installed,
recommended version is 1.8.2 or higher.

   Sa-update will use curl, wget or fetch to download updates.
   Because perl module LWP does not support IPv6, sa-update as of
   3.4.0 will use these standard programs to download rule updates
   leaving LWP as a fallback if none of the programs are found.

   *IMPORTANT NOTE*: You only need one of these programs.

dependency check complete...

REQUIRED module missing: HTML::Parser
REQUIRED module missing: NetAddr::IP

・・・略・・・

optional module missing: Net::Patricia
optional binary missing or nonfunctional: wget

warning: some functionality may not be available,
please read the above report before continuing!

Can't open Makefile: No such file or directory.
===>  Building for spamassassin-3.4.1_12
make[2]: cannot open Makefile.

make[2]: stopped in /usr/ports/mail/spamassassin/work/Mail-SpamAssassin-3.4.1
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/mail/spamassassin
*** Error code 1

Stop.
make: stopped in /usr/ports/mail/spamassassin
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20180702-90897-5rqhdy env UPGRADE_TOOL=portupgrade UPGRADE_PORT=spamassassin-3.4.1_11 UPGRADE_PORT_VER=3.4.1_11 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! mail/spamassassin (spamassassin-3.4.1_11)     (interrupted by user)
 うむ、こけましたが、これは wget がないためのように見えます。

プロンプト略
whereis wget
wget: /usr/ports/ftp/wget
cd /usr/ports/ftp/wget
make
make install

> portupgrade -Rr spamassassin
[Reading data from pkg(8) ... - 395 packages found - done]
[Gathering depends for mail/spamassassin .............................................. done]
[Exclude up-to-date packages ......................................................................... done]
--->  Upgrading 'spamassassin-3.4.1_11' to 'spamassassin-3.4.1_12' (mail/spamassassin)
--->  Building '/usr/ports/mail/spamassassin'

・・・略・・・

checking binary dependencies and their versions...
dependency check complete...

REQUIRED module missing: HTML::Parser
REQUIRED module missing: NetAddr::IP
optional module missing: Digest::SHA1
optional module missing: Mail::SPF
optional module missing: Geo::IP
optional module missing: Net::CIDR::Lite
optional module missing: Razor2
optional module missing: IO::Socket::INET6
optional module missing: IO::Socket::SSL
optional module missing: DBI
optional module missing: LWP::UserAgent
optional module missing: Encode::Detect::Detector
optional module missing: Net::Patricia

warning: some functionality may not be available,
please read the above report before continuing!

・・・略・・・

 あぁ、前のをもっとよく読んでおけばよかった。  これがないのね。しかし、spamassassin と同時にインストールされてなかったのかなぁ?。  いや、これは「perl5」で 5.24 から 5.26 にアップデートしたときに 5.24 のままになっていたものたちのようです。  納得。  ひとつひとつ探してインストールしていきました。  HTML::Parser だと

> whereis p5-HTML-Parser
p5-HTML-Parser: /usr/ports/www/p5-HTML-Parser
 みたいな感じですね。  例外なのが Razor2 で、これは spamassassin 内にあるので特に明示的にインストールしなくてよさそうです。これは「FreeBSD で spam 対策」の受け売り。  次に見つからないのが LWP::UserAgent と Encode::Detect::Detector 。  ってやってるときに。  あ、spamassassin を clean して make しなおせばいいじゃんって気づきました。

> cd /usr/ports/mail/spamassassin/
> make clean
> make
portupgrade -Rr mysql57-server
[Reading data from pkg(8) ... - 394 packages found - done]
[Gathering depends for databases/mysql57-server .................................... done]
[Exclude up-to-date packages ....................................... done]
--->  Upgrading 'mysql57-server-5.7.22' to 'mysql57-server-5.7.22_2' (databases/mysql57-server)
--->  Building '/usr/ports/databases/mysql57-server'
===>  Cleaning for mysql57-server-5.7.22_2
===>  License GPLv2 accepted by the user
===>   mysql57-server-5.7.22_2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by mysql57-server-5.7.22_2 for building
===>  Extracting for mysql57-server-5.7.22_2

・・・略・・・

-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    INSTALL_LDCONFIGDIR


-- Build files have been written to: /usr/ports/databases/mysql57-server/work/.build
===>  Building for mysql57-server-5.7.22_2

・・・略・・・

make[2]: stopped in /usr/ports/databases/mysql57-server/work/.build
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

・・・略・・・

configure: error: Cannot use SSL; libraries or header files are missing.
You may try using 'configure --disable-ssl'.
*** [spamc/Makefile] Error code 1

make[2]: stopped in /usr/ports/mail/spamassassin/work/Mail-SpamAssassin-3.4.1
1 error

make[2]: stopped in /usr/ports/mail/spamassassin/work/Mail-SpamAssassin-3.4.1
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/mail/spamassassin
*** Error code 1

Stop.
make: stopped in /usr/ports/mail/spamassassin
 う~ん。mysql57-server も必要かぁ。  「configure --disable-ssl」すればよさそうだけど・・・それはちょっとね。  ってことでまた他のモジュールのアップデート待ちとなるのだ。

4. 消極的解決

 消極的っつっても仕方ないのですが・・・。  spamassassin-3.4.1_12 で正常に portupgrade できるようになりました。