長年お世話になっていたportauditですが、サーバからこんなメールが・・・
FQDN security run output Database created: Wed Sep 2 04:13:00 JST 2015 Checking for packages with security vulnerabilities: Affected package: portaudit-0.6.1 Type of problem: PORTAUDIT IS DISCONTINUED (database: 2015-09-01). Reference: https://www.freebsd.org/security/ Affected package: pcre-8.33 Type of problem: pcre -- heap overflow vulnerability. Reference: https://vuxml.freebsd.org/freebsd/6900e6f1-4a79-11e5-9ad8-14dae9d210b8.html Affected package: pcre-8.33 以下ずらずらと更新済みのpkg が列記されている・・・
というわけで、2015年9月1日でportauditはディスコンとなった由。
(^_^)ノ""""
# pkg info portaudit-0.6.1 portaudit-0.6.1 Name : portaudit Version : 0.6.1 Installed on : Sat Apr 12 09:10:00 JST 2014 Origin : ports-mgmt/portaudit Architecture : freebsd:9:x86:64 Prefix : /usr/local Categories : Licenses : Maintainer : unknown WWW : http://people.freebsd.org/~eik/portaudit/ Comment : Checks installed ports against a list of security vulnerabilities Annotations : Flat size : 18.4KiB Description : portaudit provides a system to check if installed ports are listed in a database of published security vulnerabilities. After installation it will update this security database automatically and include its reports in the output of the daily security run. If you have found a vulnerability not listed in the database, please contact the FreeBSD Security Officer <security-officer@FreeBSD.org>. Refer to http://www.freebsd.org/security/#sec for more information. WWW: http://people.freebsd.org/~eik/portaudit/ Oliver Eikemeier <eik@FreeBSD.org>
# pkg delete portaudit-0.6.1 Updating database digests format: 100% Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: portaudit-0.6.1 The operation will free 18 KiB. Proceed with deinstalling packages? [y/N]: y [1/1] Deinstalling portaudit-0.6.1... [1/1] Deleting files for portaudit-0.6.1: 100% The portaudit package has been deleted. If you're *not* upgrading and won't be using it any longer, you may want to remove the portaudit database: rm -Rf /var/db/portaudit
# /usr/local/sbin/portaudit -Fda /usr/local/sbin/portaudit: Command not found.
有り難う、オリバー!
ports collection にセキュリティホールなどが見つかった場合に通知してくれるツールである portaudit をインストールする。
% sudo portinstall portaudit
早速 sudo を使って portinstall を実行する。ここで入力するパスワードは root のパスワードではなく、自分のパスワードであることに注意。
また、portaudit インストール直後に、画面の指示に従って portaudit を実行しておくと良い。最新の ports collection になった状態で作業しているので、おそらく問題はないはず。
% sudo /usr/local/sbin/portaudit -Fda
portaudit は、インストールされると自動的に、毎日実行されるようになる。
portaudit によって、インストール済みの port にセキュリティホールが見つかった場合には以下のような表示が出るか、もしくはメイルが来る。これはmysql-server にセキュリティホールが見つかったときのものである。
Checking for packages with security vulnerabilities: Affected package: mysql-server-5.0.21 Type of problem: MySQL -- SQL-injection security vulnerability. Reference: <http://www.FreeBSD.org/ports/portaudit/7f8cecea-f199-11da-8422-00123ffe8333.html> 1 problem(s) in your installed packages found. You are advised to update or deinstall the affected package(s) immediately.
この場合、以下のように portupgrade を実行し port の更新を行う。
# portupgrade mysql-server-5.0.21
もちろん、実際に更新をする port は、セキュリティホールが見つかったものにしなければならない。
% portupgrade imlib2-1.2.1.010_2 /usr/local/etc/pkgtools.conf:513: warning: already initialized constant BEFOREDEINSTALL /usr/local/etc/pkgtools.conf:517: warning: already initialized constant AFTERINSTALL ---> Session started at: Sat, 29 Sep 2007 06:40:58 +0900 ---> Upgrade of graphics/imlib2 started at: Sat, 29 Sep 2007 06:40:59 +0900 ---> Upgrading 'imlib2-1.2.1.010_2' to 'imlib2-20070223_1,1' (graphics/imlib2) ---> Build of graphics/imlib2 started at: Sat, 29 Sep 2007 06:40:59 +0900 ---> Building '/usr/ports/graphics/imlib2' ===> Cleaning for imlib2-20070223_1,1 ===> Found saved configuration for imlib2-20070223_1,1 ===> Extracting for imlib2-20070223_1,1 => MD5 Checksum OK for imlib2-20070223.tar.bz2. => SHA256 Checksum OK for imlib2-20070223.tar.bz2. ===> Patching for imlib2-20070223_1,1 ===> Applying FreeBSD patches for imlib2-20070223_1,1 ===> imlib2-20070223_1,1 depends on executable: pkg-config - found ===> imlib2-20070223_1,1 depends on file: /usr/local/libdata/xorg/libraries - not found ===> Verifying install for /usr/local/libdata/xorg/libraries in /usr/ports/x11/xorg-libraries /usr/X11R6 exists, but it is not a symlink. Installation cannot proceed. This looks like an incompletely removed old version of X. In the current version, /usr/X11R6 must be a symlink if it exists at all.Please read /usr/ports/UPDATING (entry of 20070519) for the procedure to upgrade X.org related ports.*** Error code 1 Stop in /usr/ports/x11/xorg-libraries. *** Error code 1 Stop in /usr/ports/graphics/imlib2. *** Error code 1 Stop in /usr/ports/graphics/imlib2. ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.14252.0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=imlib2-1.2.1.010_2 UPGRADE_PORT_VER=1.2.1.010_2 make ** Fix the problem and try again. ---> Build of graphics/imlib2 ended at: Sat, 29 Sep 2007 06:41:03 +0900 (consumed 00:00:04) ---> Saving the log as '/var/log/ports/graphics::imlib2' ---> Upgrade of graphics/imlib2 ended at: Sat, 29 Sep 2007 06:41:03 +0900 (consumed 00:00:04) ---> ** Upgrade tasks 1: 0 done, 0 ignored, 0 skipped and 1 failed ---> Listing the results (+:done / -:ignored / *:skipped / !:failed) ! graphics/imlib2 (imlib2-1.2.1.010_2) (unknown build error) ---> Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed ---> Session ended at: Sat, 29 Sep 2007 06:41:03 +0900 (consumed 00:00:05)
http://heipooh.jugem.jp/?eid=94
/usr/X11R6 must be a symlink /usr/X11R6 が、/usr/local の symlink になっていないと言うようなもの。
とりあえず、 /usr/ports/UPDATING (entry of 20070519)をみなおして
# sh /usr/ports/Tools/scripts/mergebase.sh を実行。
でもダメだったので
強引だけど
# mv /usr/X11R6 /usr/X11R6_backup
で、
# cd /usr/ports/x11/xorg-libraries # make patch # make install clean