How to rebuild all programs?

Hi everyone, have updated from 9.2 to 10.0 using a standard way: freebsd-update. After updating I see:

Code:
root@test:~ # pkg version -v
dialog4ports-0.1.5_2               =   up-to-date with port
libffi-3.0.13_1                    =   up-to-date with port
libyaml-0.1.4_2                    =   up-to-date with port
pkg-1.2.5                          =   up-to-date with port
portmaster-3.17.3                  =   up-to-date with port
portupgrade-2.4.12,2               =   up-to-date with port
ruby-1.9.3.484,1                   =   up-to-date with port
ruby19-bdb-0.6.6_3                 =   up-to-date with port

But where are Apache, Nginx, PHP and other programs? :) Please tell me what should I do to return all programs back?

Thanks in advance!
 
pkg2ng must be run to convert the old package database into the new format used by FreeBSD 10 (see http://www.freebsd.org/releases/10.0R/relnotes.html#ports) . However, it might overwrite the present database, losing track of the few programs listed above.

I would delete these packages with pkg delete -ay, then run pkg2ng. The next step is to rebuild all ports. That is required after the change from 9.2 to 10.0.

Here is a modified version of the portmaster procedure to allow for the new package tools:
Code:
           1. portmaster --list-origins > ~/installed-port-list
           2. Update your ports tree
           3. portmaster -ty --clean-distfiles
           4. portmaster --check-port-dbdir
           5. portmaster -Faf
           6. pkg delete -ay
              (or 'pkg_delete -a' for the old package tools)
           7. rm -rf /usr/local/lib/compat/pkg
           8. Back up any files in /usr/local you wish to save,
              such as configuration files in /usr/local/etc
           9. Manually check /usr/local and /var/db/pkg
              to make sure that they are really empty
           10. Reinstall ports-mgmt/pkg and ports-mgmt/portmaster
               (or just ports-mgmt/portmaster for the old package tools)
           11. portmaster `cat ~/installed-port-list`

After all that, check to see that the short list of programs in the first post is installed, and reinstall them if needed.
 
Thank you for the instructions! Yesterday I tried to do that in my test environment in the same order except portmaster. I didn't suffer the absence of packages because migrating the database was my first job. But I'm most familiar with ports-mgmt/portupgrade and I attempted to use it for rebuilding ports. Something is wrong, because I get continuous:

Code:
[Updating the portsdb <format:bdb_btree> in [file]/usr/ports[/file] ... - 24576 port entries found  error] Remove and try again.

Is ports-mgmt/portupgrade unable to work with PKGNG?
 
Thank you very much, @wblock@!
Your instructions are so precious because the all-questions-answering (and thus my favorite) official handbook is not completely updated yet. This is reasonable, because the topic is almost too new.
I've been using FreeBSD in my production environments for over a decade and using the old pkg_... and portupgrade -fa is a habit for me. I'm not sure that you can easily find another OS that allows such long-term habits establishment in its users ;) . Well, it's time to clean-up our ports and packages! I'm sure I have at least 10 "leaves" in my systems. And let's start establishing our new habits with PKGNG.
 
Last edited by a moderator:
The problem lies in a broken version of freebsd-update(8) which got fixed in FreeBSD 9.0-RC1. To fix your version simply run the following command:
# sed -i '' -e 's/=_/=%@_/' /usr/sbin/freebsd-update

Matias Colli
UNIX Administrator
 
Back
Top