Sunday, August 14, 2005

Updating FreeBSD Perl Using Packages

I detest having to upgrade core FreeBSD packages like Perl that are relied upon by so many ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r applications. All of my systems are old and dog slow, so I tend to install software on FreeBSD using its native package system. For example, before installing a package, I set this environment variable:

setenv PACKAGESITE ftp://ftp6.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/Latest/

Replace '6' with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 number of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 mirror closest to you.

That command tells pkg_add to not use cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 default RELEASE packages, but to look for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 latest STABLE package. Those packages are built by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 FreeBSD ports cluster and are kept fairly current.

The problem with such a system is that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 packages may get ahead of my upgrade plans. For example, if my system is running Perl 5.8.6_2 and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ports cluster is building packages that look for Perl 5.8.7, I will eventually run into trouble.

That happened this weekend. I installed security/metasploit, which was built as a package for Perl 5.8.7. While Metasploit ran fine, it could not use an SSL module to download updates. Apparently cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way Metasploit invoked Perl with its msfupdate tool checking for Perl 5.8.7 and I have 5.8.6 installed.

I had a second problem with dns/dnswalk. It wouldn't run at all, because cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 package I installed relied on Perl 5.8.7 and again I had 5.8.6 installed.

I decided to bite cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 bullet and update Perl. This is usually a huge pain because all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 applications which rely on Perl have to be updated too.

I found this in /usr/ports/UPDATING:

20050624:
AFFECTS: users of lang/perl5.8
AUTHOR: tobez@FreeBSD.org

lang/perl5.8 has been updated to 5.8.7. You should update everything
depending on perl. The easiest way to do that is to use
perl-after-upgrade script supplied with lang/perl5.8. Please see
its manual page for details.

perl-after-upgrade sounded interesting. I found this online man page by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author (he also has a blog), and this tip by Dru Lavigne. I started following Dru's advice by running 'portupgrade -rR perl' on one system. After a while I got discouraged because it was taking too long. Maybe cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re was an alternative?

I decided I would just force a deinstallation of Perl 5.8.6_2, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n install Perl 5.8.7 from package. I would follow with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 perl-after-upgrade script.

In ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r words:

pkg_deinstall -f perl
setenv PACKAGESITE ftp://ftp6.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/Latest/
pkg_add -r perl
perl-after-upgrade
perl-after-upgrade -f

The relevant items are found when running perl-after-upgrade:

# perl-after-upgrade
atk-1.9.1: 0 moved, 0 modified, 0 adjusted
desktop-file-utils-0.10_2: 0 moved, 0 modified, 0 adjusted
dnswalk-2.0.2: 0 moved, 1 modified, 0 adjusted
...edited...
imake-6.8.2: 0 moved, 0 modified, 0 adjusted
irssi-0.8.9_3: 16 moved, 1 modified, 21 adjusted
libcroco-0.6.0_1: 0 moved, 0 modified, 0 adjusted
...edited...
xpdf-3.00_6: 0 moved, 0 modified, 0 adjusted
-
---
Fixed 2 packages (16 files moved, 2 files modified)
Skipped 113 packages

**** In addition, please pay attention to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 following:
The /usr/local/bin/irssi binary would be modified, make sure it works

--- Repeating summary:
Fixed 2 packages (16 files moved, 2 files modified)
Skipped 113 packages

Notice perl-after-upgrade found two troublesome applications: irssi and dnswalk. Running perl-after-upgrade again with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 -f switch commits cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 changes.

Once I completed this process, I found that irssi worked but dnswalk still gave an error. I found my package database had a stale dependency. I eventually decided to remove dnswalk and its dependencies, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n reinstall cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 package. It worked fine after that. I was also able to get Metasploit to update its modules via SSL.

In any case, I believe I successfully navigated a Perl upgrade without having to compile any source code. If anyone cares to share comments, I would appreciate cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m.

By cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way, I usually upgrade all of my ports using 'portupgrade -varRPP' after setting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 PACKAGESITE variable. The PP switch tells portupgrade to only use packages. Any ports left over that aren't available as a package I have to upgrade without cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 PP switch.

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.