CONTENTS

Lastmodified 2015-08-05 (水) 15:19:53


no pkg(8) available; Manually upgrade/reinstall ports-mgmt/pkg

http://freebsd.fkimura.com/pkg-a0.html

root@ns:/var/named/etc # portupgrade ports-mgmt/pkg
root@ns:/var/named/etc # cd /usr/ports/ports-mgmt/pkg
root@ns:/usr/ports/ports-mgmt/pkg # make install clean
You are about to convert your system to pkg while you have ports/packages
installed with the old pkg_install tools.

To switch to pkg:
    1) Install ports-mgmt/pkg
       cd ports-mgmt/pkg && make UPGRADEPKG=1 install clean
    2) Convert your package database by running pkg2ng

*** [pre-everything] Error code 1

Stop in /usr/ports/ports-mgmt/pkg.
root@ns:/usr/ports/ports-mgmt/pkg #
root@ns:/usr/ports/ports-mgmt/pkg # make UPGRADEPKG=1 install clean
      :
      :
      :
 /bin/mkdir -p '/usr/ports/ports-mgmt/pkg/work/stage/usr/local/libdata/pkgconfig'
 install  -m 0644 libpkg/pkg.pc '/usr/ports/ports-mgmt/pkg/work/stage/usr/local/libdata/pkgconfig'
====> Compressing man pages (compress-man)
===>  Installing for pkg-1.5.5
===>  Checking if pkg already installed
===>   Registering installation for pkg-1.5.5
Installing pkg-1.5.5...
If you are upgrading from the old package format, first run:

  # pkg2ng

===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/lib/libpkg.so.3.0.0

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
http://wiki.freebsd.org/pkgng
===>  Cleaning for pkg-1.5.5
root@ns:/usr/ports/ports-mgmt/pkg #
root@ns:/usr/ports/ports-mgmt/pkg # pkg2ng
Converting packages from /var/db/pkg
Converting screen-4.0.3_14...
Installing screen-4.0.3_14...
Converting perl-5.14.2_3...
Installing perl-5.14.2_3...
Converting m4-1.4.16_1,1...
Installing m4-1.4.16_1,1...
Converting libtool-2.4.2...
Installing libtool-2.4.2...
Converting libiconv-1.14...
Installing libiconv-1.14...
Converting gettext-0.18.1.1...
      :
      :
      :
Converting apache22-2.2.25...
pkg: duplicate directory listing: /usr/local/share/doc/apache22, ignoring
Installing apache22-2.2.25...
Analysing shared libraries, this will take a while...
Checking all packages: 100%
root@ns:/usr/ports/ports-mgmt/pkg #
root@ns:/usr/ports/ports-mgmt/pkg # pkg audit -F
Fetching vuln.xml.bz2: 100%   515 iB 264.0kB/s    00:02
libxml2-2.8.0_1 is vulnerable:
libxml2 -- entity substitution DoS
CVE: CVE-2014-0191
WWW: https://vuxml.FreeBSD.org/freebsd/efdd0edc-da3d-11e3-9ecb-2c4138874f7d.html

libxml2-2.8.0_1 is vulnerable:
libxml2 -- lack of end-of-document check DoS
CVE: CVE-2013-2877
WWW: https://vuxml.FreeBSD.org/freebsd/e7bb3885-da40-11e3-9ecb-2c4138874f7d.html
      :
      :
      :
ruby-1.8.7.371,1 is vulnerable:
Ruby -- OpenSSL Hostname Verification Vulnerability
CVE: CVE-2015-1855
WWW: https://vuxml.FreeBSD.org/freebsd/d4379f59-3e9b-49eb-933b-61de4d0b0fdb.html

8 problem(s) in the installed packages found. 
root@ns:/usr/ports/ports-mgmt/pkg # portupgrade bash-4.2.42
[Rebuilding the pkgdb <format:bdb_btree> in /var/db/pkg ... USING PKGNG
- 139 packages found (-0 +139) ...............................................................
.....................................100....................................... done]
USING PKGNG
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 25083 port
....3000.........4000.........5000.........6000.........7000.........8000.........9000.........
14000.........15000.........16000.........17000.........18000.........19000.........20000......
...21000.........22000.........23000.........24000.........25000 ..... done]
--->  Upgrading 'bash-4.2.42' to 'bash-4.3.39_3' (shells/bash)
--->  Building '/usr/ports/shells/bash'

pkgngへの移行 P5K 2014/04/26

【参考URL】http://www.uconst.org/blog/archives/305

FreeBSD 9.1-RELEASE-p11

  981  3:26    /usr/sbin/pkg
  982  3:27    pkg2ng
  983  3:29    echo 'WITH_PKGNG=yes' >> /etc/make.conf
  984  3:30    pkgdb -fu
  985  3:30    cd /usr/local/etc
  986  3:31    mv pkg.conf pkg.conf_prepkgng
  987  3:32    cp pkg.conf.sample pkg.conf
  988  3:32    pkg check -Bdsr
  990  3:33    pkg upgrade

と、ここで、

pkg No valid repository found.

を頂く。

  991  3:34    mkdir -p /usr/local/etc/pkg/repos
  993  3:34    touch /usr/local/etc/pkg/repos/FreeBSD.conf
  

/usr/local/etc/pkg/repos/FreeBSD.conf の内容は以下の通り。改行コードはLFで

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: true
}
  994  3:36    pkg upgrade

ここで、Perlの環境のコンフリクトがあるとのことで、以下を実行。

  995  3:42    pkg set -o lang/perl5.14:lang/perl5.16
  996  3:42    pkg upgrade
  997  3:45    pkg upgrade
Updating repository catalogue
Nothing to do

を頂く。

  999  3:46    pkg audit -F
Vulnxml file up-to-date.
0 problem(s) in the installed packages found.

OK!

 1000  3:47    reboot
 1001  3:49    top
 1002  3:49    pkg audit -F
 1003  3:50    history

ここで、試しに、

# portaudit -Fda
New pkg tools detected: found 283 installed packages.

The portaudit tool is now obsolete, please remove portaudit and use the
command 'pkg audit' instead.  See man pkg-audit(8) for more information.

Running /usr/local/sbin/pkg-static audit -F:
Vulnxml file up-to-date.
0 problem(s) in the installed packages found.

とのこと。(^^ゞ


root@k222:/etc/defaults # pkg upgrade
Updating repository catalogue
Upgrades have been requested for the following 198 packages:

       Installing perl5: 5.16.3_9
       Installing db48: 4.8.30.0
       Upgrading autoconf-wrapper: 20130530 -> 20131203
                  :      :
       Reinstalling bdftopcf-1.0.4 (direct dependency changed)
       Reinstalling t1lib-5.1.2_2,1 (direct dependency changed)
       Upgrading php5-gd: 5.4.25 -> 5.4.27
The upgrade will require 42 MB more space

0 B to be downloaded

Proceed with upgrading packages [y/N]: y
Checking integrity...
Conflict found on path /usr/local/bin/a2p between perl5.14-5.14.4_6(lang/perl5.14) and perl5-5.16.3_9(lang/perl5.16)

Conflict found on path /usr/local/bin/c2ph between perl5.14-5.14.4_6(lang/perl5.14) and perl5-5.16.3_9(lang/perl5.16)


root@k222:/etc/defaults # pkg set -o lang/perl5.14:lang/perl5.16
Change origin from lang/perl5.14 to lang/perl5.16 for perl-5.14.4? [y/N]: y
pkg: WARNING: locally installed freetds-msdblib-0.64_9,1 conflicts on /usr/local/bin/bsqldb with:
       - freetds-0.64_9,1
root@k222:/ # pkg set -o databases/freetds-msdblib:databases/freetds
Change origin from databases/freetds-msdblib to databases/freetds for all dependencies? [y/N]: y

などとするも、やはり同じコンフリクト・・・がでる。で、

pkg delete freetds-0.64_9,1
pkg: Error while trying to delete packages, dependencies that are still required:
databases/freetds: databases/php5-mssql, databases/php5-pdo_dblib, databases/php5-sybase_ct

とあったので、

portupgrade -r databases/freetds

してから、

pkg upgrade

したら、OKだった(?_?)

http://www.freebsd.org/doc/ja/books/handbook/pkgng-intro.html


  430  18:10   portupgrade freetype2-2.5.2
  431  18:11   pkg audit
  432  18:11   pkg audit
  433  18:11   portupgrade libyaml-0.1.4_3
  434  18:12   pkg audit
  435  18:12   portupgrade -r python27-2.7.6_2
  436  18:15   top
  437  18:15   reboot
  438  4:41    screen -r
  439  6:36    top
  440  6:36    portaudit -Fda
  441  6:37    pkg check
  442  6:37    pkg check -F
  443  6:37    pkg check -Bdsr
  444  6:39    pkgdb -fu
  445  6:41    pkg upgrade
  446  6:51    pkg upgrade
  447  6:53    pkg update
  448  6:53    pkg upgrade
  449  6:56    pkg autoremove
  450  6:56    pkg upgrade
  451  6:57    pkg autoremove
  452  6:57    pkg upgrade
  453  6:58    pkg autoremove
  454  6:58    pkg update
  455  6:58    pkg upgrade
  456  6:58    pkg update
  457  6:58    pkg autoremove
  458  7:13    history

pkg No valid repository found. 2014/04/16

【参考URL】 http://www.uconst.org/blog/archives/305

# mkdir -p /usr/local/etc/pkg/repos

ディレクトリ /usr/local/etc/pkg/repos を作成

vi /usr/local/etc/pkg/repos/FreeBSD.conf

設定ファイル /usr/local/etc/pkg/repos/FreeBSD.conf を作成

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: true
}

http://april.fool.jp/blogs/2013/03/freebsd-%E6%97%A5%E5%B8%B8%E4%BD%BF%E3%81%84%E3%81%AEpkgng-%E3%81%9D%E3%81%AE1/


pkgng への移行 2014/04/12

参考URL http://blog.goo.ne.jp/koyusoma5102/e/1b5379e2f290398de4698a5f1acb203a

FreeBSD 9.1-RELEASE-p11 (GENERIC)

blackhole# /usr/sbin/pkg

The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y

Bootstrapping pkg please wait
Installing pkg-1.2.7_1... done
If you are upgrading from the old package format, first run:
 # pkg2ng

blackhole# pkg2ng

pkg2ng: Command not found.
blackhole# rehash
blackhole# pkg2ng
pkg: PACKAGESITE in pkg.conf is deprecated. Please create a repository configuration file
Converting packages from /var/db/pkg
Converting p5-Module-Metadata-1.000019...
Installing p5-Module-Metadata-1.000019... done
Converting munin-node-2.0.17...
        :            :
        :            :
Converting p5-TimeDate-2.30_1,1...
Installing p5-TimeDate-2.30_1,1... done
Analysing shared libraries, this will take a while... pkg: PACKAGESITE in pkg.conf is deprecated. Please create
a repository configuration file
done
blackhole#

blackhole# echo 'WITH_PKGNG=yes' >> /etc/make.conf

blackhole# pkgdb -fu

--->  Updating the pkgdb
[Reading data from pkg(8) ... pkg: PACKAGESITE in pkg.conf is deprecated. Please create a repository configuration file
- 83 packages found - done]
blackhole#

/usr/local/etc/pkg.conf を pkg.conf.sampleと置き換える。

blackhole# cd /usr/local/etc
blackhole# mv pkg.conf pkg.conf_prepkgng
blackhole# cp pkg.conf.sample pkg.conf

blackhole# pkg check -Bdsr

devel/autoconf has a missing dependency: lang/perl5.12
devel/automake has a missing dependency: lang/perl5.12
sysutils/fastest_cvsup has a missing dependency: lang/perl5.12
misc/help2man has a missing dependency: lang/perl5.12
devel/p5-CPAN-Meta has a missing dependency: converters/p5-JSON-PP
devel/p5-Locale-gettext has a missing dependency: lang/perl5.12
devel/p5-Module-Build has a missing dependency: converters/p5-JSON-PP
devel/p5-Parse-CPAN-Meta has a missing dependency: converters/p5-JSON-PP

>>> Missing package dependencies were detected.
>>> Found 2 issue(s) in the package database.

pkg: No activated remote repositories configured

これの対処方がわからない・・・(^^ゞ


pkgng 2014-02-16 (日) 05:59:45

今朝は、こんなコメントが出てからのアップグレードとなりますた。

/!\ WARNING /!\
pkg_install EOL is scheduled for 2014-09-01. Please consider migrating to pkgng
http://blogs.freebsdish.org/portmgr/2014/02/03/time-to-bid-farewell-to-the-old-pkg_-tools/
If you do not want to see this message again set NO_WARNING_PKG_INSTALL_EOL=yes in your make.conf

およよ・・・

Blackcube2で練習

【参考URL】http://april.fool.jp/blogs/2013/03/freebsd-pkg%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0%E6%8D%A8%E3%81%A6%E3%82%8B%E3%81%AE%E3%81%AF%E3%81%84%E3%81%A4%EF%BC%9F%E4%BB%8A%E3%81%A7%E3%81%97%E3%82%87%EF%BC%81/

http://www.freebsd.org/doc/ja/books/handbook/pkgng-intro.html

http://silversack.my.coocan.jp/bsd/pkgsforpkg.htm

# pkg help install
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg please wait
Installing pkg-1.0.2... done
If you are upgrading from the old package format, first run:
 
# pkg2ng
root@blackcube2:/root # pkg2ng
: 
Converting tiff-4.0.3...
Installing tiff-4.0.3... done
pkg: PACKAGESITE in pkg.conf is deprecated. Please create a repository configuration file
root@blackcube2:/root #

http://www.nabe.bne.jp/wiki/pkg%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%AB%E3%82%88%E3%82%8B%E3%83%90%E3%82%A4%E3%83%8A%E3%83%AA%E3%83%91%E3%83%83%E3%82%B1%E3%83%BC%E3%82%B8%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB

root@blackcube2:/usr/local/etc # cp pkg.conf.sample pkg.conf

次のページによると、pkg.confの削除と、パッケージリポジトリの設定が必要であるようです。 https://wiki.freebsd.org/pkgng

# cd /usr/loca/etc
# mv pkg.conf pkg.conf.old
# mkdir pkg
# mkdir repos

以下の内容で、 /usr/loca/etc/pkg/repos/FreeBSD.conf を作成します。

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: yes
}

で、もういっぺん

# pkg2ng

Installing fontconfig-2.10.95,1... done
Converting tiff-4.0.3...
Installing tiff-4.0.3... done
root@blackcube2:/usr/local/etc #

make.confに追加

FreeBSD 10.0より前のシステムであれば、handbookの通りに。

WITH_PKGNG= yes

pkg update -f

root@blackcube2:/usr/local/etc # pkg update -f
Updating repository catalogue
digests.txz                                                                                                         100% 1115KB 371.6KB/s 674.9KB/s   00:03
packagesite.txz                                                                                                     100% 5074KB 634.3KB/s 894.5KB/s   00:08
Incremental update completed, 23316 packages processed:
0 packages updated, 0 removed and 23316 added.
root@blackcube2:/usr/local/etc #
# portupgrade libyaml-0.1.4_2
[Reading data from pkg(8) ... - 269 packages found - done]

# portupgrade -f libyaml-0.1.4_2
[Reading data from pkg(8) ... - 269 packages found - done]
# portaudit -Fda
New database installed.
Database created: Sun Feb 16 05:25:00 JST 2014
Affected package: libyaml-0.1.4_2
Type of problem: libyaml heap overflow resulting in possible code execution.
Reference: http://portaudit.FreeBSD.org/111f1f84-1d14-4ff2-a9ea-cf07119c0d3b.html

1 problem(s) in your installed packages found.

You are advised to update or deinstall the affected package(s) immediately.

portupgrade 出来てない?

http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q12104318732

ports-mgmt/portupgradeは、pkgngに対応してなくて、
ports-mgmt/portupgrade-develは、対応しているみたいです。
http://gihyo.jp/admin/clip/01/fdt/201209/05
 1058  5:37    locate portupgrade
 1059  5:38    cd /usr/ports/ports-mgmt/portupgrade
 1060  5:38    make deinstall
 1061  5:38    portinstall portupgrade-devel
 1062  5:38    cd /usr/ports/ports-mgmt/portupgrade-devel
 1063  5:38    make install

うーん、状況変わらず。

portaudit -Fda

# portaudit -Fda
auditfile.tbz                                 100% of   92 kB   44 kBps
New database installed.
Database created: Sun Feb 16 05:25:00 JST 2014
Affected package: libyaml-0.1.4_2
Type of problem: libyaml heap overflow resulting in possible code execution.
Reference: http://portaudit.FreeBSD.org/111f1f84-1d14-4ff2-a9ea-cf07119c0d3b.html

1 problem(s) in your installed packages found.

You are advised to update or deinstall the affected package(s) immediately.

portupgrade -rf perl

Installing php5-xsl-5.4.25... done
===>  Cleaning for php5-xsl-5.4.25
--->  Cleaning out obsolete shared libraries
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        - www/suphp (port deleted)
        ! security/amavisd-new (amavisd-new-2.8.0_2,1)  (install error)
        * databases/phpmyadmin (phpMyAdmin-suphp-4.0.8)

Total access 4319:本日 2:昨日 0

Counter: 4319, today: 2, yesterday: 0

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS