Notes for a first-time porter

Paul Schmehl pauls at
Wed Dec 19 14:43:08 PST 2007

--On Wednesday, December 19, 2007 15:56:49 -0500 "Dan Mahoney, System Admin" 
<danm at> wrote:

> All,
> I am thinking of doing a quick port of the "zsu" zone file serial number
> bumper for FreeBSD.
> However, I have a couple of questions regarding ports that aren't clear to
> me, nor do they seem to be in the porter's handbook.
> 1) What provision is made for when a port's "distsite" is simply "CPAN". Does
> the ports tree have any kinds of smarts regarding CPAN mirrors, locality, etc?
> 2) Is freeBSD's bastardization of CPAN files into packages (i.e. the BSDPAN)
> stuff documented anywhere?
> 3) Unrelated to my port but I'll ask anyway:  I'm vaguely aware that
> SourceForge has a command-line fetching utility for a while (you could only
> use it if you were a supporter tho).  I'm not sure if this is still the case.
> At any rate, is there any special provision for local sourceforge mirrors, as
> above?

The easiest way to learn porting (IMHO) is to grep the ports system.

root at utd59514# grep CPAN www/p5-libwww/*
www/p5-libwww/Makefile:MASTER_SITES=    ${MASTER_SITE_PERL_CPAN}

root at utd59514# grep -r CPAN /usr/ports/Mk/*
/usr/ports/Mk/ Disable AutoInstall from attempting to install from 
CPAN directly in
/usr/ports/Mk/ !defined(IGNORE_MASTER_SITE_PERL_CPAN)
/usr/ports/Mk/      \
/usr/ports/Mk/ \
/usr/ports/Mk/ \
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,lang/perl/CPAN/modules/by-module/&,} \
/usr/ports/Mk/ \
/usr/ports/Mk/ \
/usr/ports/Mk/ \
/usr/ports/Mk/ \
/usr/ports/Mk/ \
/usr/ports/Mk/ \
/usr/ports/Mk/ \
/usr/ports/Mk/ \
/usr/ports/Mk/ \
/usr/ports/Mk/ \
/usr/ports/Mk/        CPAN:PERL_CPAN 
/usr/ports/Mk/                     PERL_CPAN:${PORTNAME:C/-.*//} \

I don't know what you mean by "bastardization", but most, if not all, CPAN 
ports begin with p5- and then the module follows.  For example, Mail::IMAP == 
p5-Mail-Imap.  There may be others, but the only one I know of that doesn't 
follow that convention is www/p5-libwww.

Sourceforge works the same way.

root at utd59514# grep SOURCEFORGE security/barnyard/*
security/barnyard/Makefile:MASTER_SITES=        ${MASTER_SITE_SOURCEFORGE}

Paul Schmehl (pauls at
Senior Information Security Analyst
The University of Texas at Dallas

More information about the freebsd-questions mailing list