ports INDEX file

CyberLeo Kitsana cyberleo at cyberleo.net
Fri Jul 23 19:06:51 UTC 2010

On 07/23/2010 03:56 AM, Fbsd8 wrote:
> Now the Freebsd method of the 22,000 individual ports each with 3 to 5
> files is a method which has out lived its usefulness. TAKE NOTE: NO
> FLAME WAR INTENDED. I just think a option should exist for us who don't
> follow the bleeding edge. Sure to some people that big ports tree is no
> big deal, but I bet they don't do backups. That ports tree directory is
> a large resource hog if you lift the blinders and look at the big picture.

Not really:

# mkisofs -D -R -no-pad -iso-level 4 -V ports-$(date "+%Y%m%d%H%M%S") -o
ports.iso /usr/ports

# mkuzip -s 65536 -o ports.iso.uzip ports.iso

# mdconfig -a -t vnode -u 7 -f ports.iso

# kldload geom_uzip

# mount -t cd9660 /dev/md7.uzip /usr/ports

# du -sh ports ports.iso ports.iso.uzip # As of last update July 4th
834M    ports
565M    ports.iso
 69M    ports.iso.uzip

Needs mkisofs and FreeBSD >= 7, but it reduces the impact of the tree
drastically, and can speed up metadata operations, if your disk happens
to be slower than your CPU, as the whole tree (or at least all the
filesystem metadata) can be feasibly cached compressed in memory. It
also ensures congruent package versions, if you process the tree on one
machine and distribute it to all others. Plus, you can exclude the tree
from backup entirely and just cache the compressed file someplace safe.

I use this same trick with Gentoo's Portage tree, with squashfs, and
observe similar benefits.

Fuzzy love,
Technical Administrator
CyberLeo.Net Webhosting
<CyberLeo at CyberLeo.Net>

Furry Peace! - http://wwww.fur.com/peace/

More information about the freebsd-questions mailing list