Thursday, July 17, 2008

New portupgrade features: portversion origin and fullname flags, pkgdu

portupgrade's portversion command is handy tool for tracking which third-party packages on your FreeBSD system have newer versions available.

portversion has some new flags and features in version 2.4.6 (committed just yesterday), and a new utility called pkgdu.

First, here's a quick summary of the changes to portversion. (This is just a simplified diff between the previous manpage and the current one):
<    portversion [-hrOqRv] [-l limit_chars] [-L inv_limit_chars]
> portversion [-hFOoQqRrv] [-l limit_chars] [-L inv_limit_chars]

> -F
> --fullname Display a package full name.
>
> -o
> --origin Display package origin instead of package name.
>
> -Q
> --quiet Do not display status chars.
>

Now, for some usage examples. In these examples, I'm using -L = to leave out all lines of output that indicate that the installed version and the version available in the ports tree are equal).

portversion now defaults to not showing the version on the left-hand side.
[royce@heffalump ~]$ portversion -v -L =
lsof < needs updating (port has 4.81A,2)
mytop < needs updating (port has 1.6_4)
net-snmp < needs updating (port has 5.4.1.2)
p5-Pod-Parser < needs updating (port has 1.35_2)
p5-Sub-Uplevel < needs updating (port has 0.1901_1)
p5-Test-ClassAPI < needs updating (port has 1.05)
p5-Test-Harness < needs updating (port has 3.12)
p5-version < needs updating (port has 0.75.01)
rsync < needs updating (port has 3.0.3)
sudo < needs updating (port has 1.6.9.17)
vim < needs updating (port has 7.1.330)

The new default behavior looks cleaner, but if you're used to the old output, it does make it hard to tell just how out of date you are. You can use -F to get the old behavior (with the version number of the currently installed software is displayed):
[royce@heffalump ~]$ portversion -vF -L =
lsof-4.80,2 < needs updating (port has 4.81A,2)
mytop-1.6_3 < needs updating (port has 1.6_4)
net-snmp-5.4.1_5 < needs updating (port has 5.4.1.2)
p5-Pod-Parser-1.35_1 < needs updating (port has 1.35_2)
p5-Sub-Uplevel-0.1901 < needs updating (port has 0.1901_1)
p5-Test-ClassAPI-1.04 < needs updating (port has 1.05)
p5-Test-Harness-3.11 < needs updating (port has 3.12)
p5-version-0.75 < needs updating (port has 0.75.01)
rsync-3.0.2_1 < needs updating (port has 3.0.3)
sudo-1.6.9.15_1 < needs updating (port has 1.6.9.17)
vim-7.1.315 < needs updating (port has 7.1.330)

You can display the ports' origins instead with -o. If you're not sure what a particular port is, you can get a good idea by knowing what subdirectory it's in:
[royce@heffalump ~]$ portversion -o -v -L =
sysutils/lsof < needs updating (port has 4.81A,2)
databases/mytop < needs updating (port has 1.6_4)
net-mgmt/net-snmp < needs updating (port has 5.4.1.2)
textproc/p5-Pod-Parser < needs updating (port has 1.35_2)
devel/p5-Sub-Uplevel < needs updating (port has 0.1901_1)
devel/p5-Test-ClassAPI < needs updating (port has 1.05)
devel/p5-Test-Harness < needs updating (port has 3.12)
devel/p5-version < needs updating (port has 0.75.01)
net/rsync < needs updating (port has 3.0.3)
security/sudo < needs updating (port has 1.6.9.17)
editors/vim < needs updating (port has 7.1.330)

What I'd love to see is an option that leaves the fullname data, but
puts whitespace between ... so that I can still see versions, but
have easy one-click highlighting of the package name:
lsof 4.80,2                 <  needs updating (port has 4.81A,2)
mytop 1.6_3 < needs updating (port has 1.6_4)
net-snmp 5.4.1_5 < needs updating (port has 5.4.1.2)
p5-Pod-Parser 1.35_1 < needs updating (port has 1.35_2)
p5-Sub-Uplevel 0.1901 < needs updating (port has 0.1901_1)
p5-Test-ClassAPI 1.04 < needs updating (port has 1.05)
p5-Test-Harness 3.11 < needs updating (port has 3.12)
p5-version 0.75 < needs updating (port has 0.75.01)
rsync 3.0.2_1 < needs updating (port has 3.0.3)
sudo 1.6.9.15_1 < needs updating (port has 1.6.9.17)
vim 7.1.315 < needs updating (port has 7.1.330)

... or even:
lsof                        <  needs update (inst: 4.80,2     port: 4.81A,2)
mytop < needs update (inst: 1.6_3 port: 1.6_4)
net-snmp < needs update (inst: 5.4.1_5 port: 5.4.1.2)
p5-Pod-Parser < needs update (inst: 1.35_1 port: 1.35_2)
p5-Sub-Uplevel < needs update (inst: 0.1901 port: 0.1901_1)
p5-Test-ClassAPI < needs update (inst: 1.04 port: 1.05)
p5-Test-Harness < needs update (inst: 3.11 port: 3.12)
p5-version < needs update (inst: 0.75 port: 0.75.01)
rsync < needs update (inst: 3.0.2_1 port: 3.0.3)
sudo < needs update (inst: 1.6.9.15_1 port: 1.6.9.17)
vim < needs update (inst: 7.1.315 port: 7.1.330)


Finally, here's the new pkgdu command, which shows disk space used by the
port and pretty much speaks for itself:
[royce@heffalump ~]$ pkgdu | sort -n | tail -20
970 ruby18-bdb-0.6.4
1151 perltidy-20071205
1332 gmake-3.81_3
1512 p5-Perl-Critic-1.08.5
1740 p5-DBI-1.60.4
1853 pcre-7.7
2235 bash-3.2.39_1
2255 autoconf-2.61_2
2385 joe-3.5_1,1
2492 libtool-1.5.26
3147 libiconv-1.11_1
3453 mysql-client-5.0.51a
7548 net-snmp-5.4.1_5
8946 ruby-1.8.6.111_4,1
9322 db41-4.1.25_4
9561 aspell-0.60.6_2
10182 gettext-0.17_1
12822 coreutils-6.9_3
28953 perl-5.8.8_1
30434 vim-7.1.315

Monday, June 16, 2008

Talk amongst yourselves

The idea of personalized, centralized comments from everywhere that I post is intriguing. So here's some Disqus. Discuss.

Monday, May 26, 2008

Waking up to the Information Age: Clay Shirky



Good Lord, but Clay Shirky has The Right IdeaTM. Via Roblef.

Thursday, April 10, 2008

Spotted: JJJ QQ

No photo, but I spotted a clever one headed down O'Malley this morning:


JJJ QQ


Pronounce it as "Js Qs", and it's a rebus for the French "j'excuse" - "excuse me."

Brilliant!

Friday, April 04, 2008

Dr. Seuss Speaks from the Grave

Stop Making Movies About My Books (from The Onion)

I couldn't have said it better myself. I remember when I saw that the Grinch -- who eventually learned that Christmas was about something other than buying a bunch of junk -- had been conscripted into hawking burgers and toys, I stood agape.

"Maybe Christmas," he thought, "doesn't come from a store.
"Maybe Christmas...perhaps...means a little bit more!"

Tuesday, March 11, 2008

Prince, "Kiss", and "Help Me" - 104.9 The Fly, Anchorage, Alaska?

I was driving home last night and the radio scan picked up 104.9 (Anchorage, Alaska), which I don't remember happening before.

At first, the station appeared to simply be playing Prince's version of "Kiss" ... but suddenly, the "All I want is your extra time and your ...", the kissing sound is jammed by the wrenching sound of a needle being dragged across a record, followed immediately by someone saying "Help me" in a falsetto reminiscent of Michael Winslow's amazing sound-effects rendition of Purple Haze that he occasionally punctuated with a reference to The Fly ("'Scuse me while I kiss this fly"). Winslow would mime dragging the fly towards his mouth to kiss it, saying "Help me! Help me!" as it grew closer to his mouth.

This sequence has been repeating for the last hour. It's started to grow on me.

It may be an attempt to draw attention to a new radio station. Some years ago, 102.1 did something similar. There was an automated voice that was counting down ("T minus 747 hours, 38 minutes, 20 seconds and counting") interleaved with an occasional non sequitur like "It's my party and I'll cry if I want to" in a clearly automatic text-to-speech voice.

According to the FCC's FM Query interface, new applications for 104.9 are either ORGANIZATION FOR NORTHERN DEVELOPMENT D/B/A OUT NORTH or ANCHORAGE CHRISTIAN LIFE.

Er ... either way, I look forward to what they'll do next ... I think.

Update: Credits to Bryan for thinking up "104.9 The Fly". :-)

Update 2: Further analysis reveals that the Anchorage Christian Life application was dismissed, while the Out North application was recently granted.

Update 3: Bryan found this reference on the Out North site:
In February 2008 VSA arts of Alaska @ Out North received word that we were approved by the FCC for a license to operate a Low Power FM station. We will now be able to produce and broadcast local arts programming, as well as offer progressive culture and audio art from around the world. Along with our own programming Out North will be opening up the airtime to other Westside organizations and for community services needs.


Update 4 (2008-03-23): They've been live for a week or so now; they are KMVV - "Movin' 104.9" - operating under the MOViN brand name.

Friday, March 07, 2008

Don't change your password while running freebsd-update

I found out the hard way today that freebsd-update doesn't like it when you change certain files while it's running. In retrospect, this makes sense; initially, I was a bit startled.

$ sudo sh freebsd-update.sh -f freebsd-update.conf -r 6.3-RELEASE upgrade
Looking up update.FreeBSD.org mirrors... 1 mirrors found.
Fetching metadata signature for 5.5-RELEASE from update1.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 2 metadata patches.. done.
Applying metadata patches... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
src/base src/bin src/contrib src/crypto src/etc src/games src/gnu
src/include src/krb5 src/lib src/libexec src/release src/rescue src/sbin
src/secure src/share src/sys src/tools src/ubin src/usbin world/base
world/compat20 world/compat21 world/dict world/doc world/manpages

The following components of FreeBSD do not seem to be installed:
world/catpages world/compat1x world/compat22 world/compat3x
world/compat4x world/games world/info world/proflibs

Does this look reasonable (y/n)? y

Fetching metadata signature for 6.3-RELEASE from update1.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.
Fetching files from 5.5-RELEASE for merging... done.
Preparing to download files...
File changed while FreeBSD Update running: /etc/master.passwd
$

Whoops. Had to start all over again.