20080622

Vuze-bin Overlay for the Gentoo Community


I thought I'd make my Vuze ebuild available to the rest of the world. Vuze (formerly Azureus before version 3.1.0.0) is the name of a pretty great Java BitTorrent client. This overlay contains ebuilds, launchers, and .desktop entries file for installing vuze-bin-3.1.0.0 and vuze-bin-3.1.1.0 .

Download the overlay here

Don't forget to check the md5sum with 'md5sum vuze_overlay.tar.bz2'. The md5 sum should be 9fc2955cb63a1404f1a35643b38d8085.

To install vuze-bin you have two options,

1) If you are not using layman

mkdir -p /usr/local/portage/vuze_overlay && \
wget -O - http://virtb.visibleassets.com:2080/vuze_overlay.tar.bz2 | \
tar xpvjf - -C /usr/local/portage/vuze_overlay
&& \
ACCEPT_KEYWORDS="~x86" \
PORTDIR_OVERLAY=/usr/local/portage/vuze_overlay \
emerge -av1 vuze-bin
2) If you're using layman (thanks to Donnie Berkholz)
layman -o http://virtb.visibleassets.com:2080/layman.conf -a vuze-bin

Enjoy!

20080611

How-To: The Full Portage Tree on the EEE PC




Gentoo is often considered to be 'bloated' because the Portage tree takes up at least 500 MB on disk. Depending on the filesystem, that could mean that the usage can be sometimes up to 750 MB!

On a UMPC such as the EEE, with only very limited hard-disk space, 750 MB is far over the limit of acceptibility.

My first solution was simply to use a binary Gentoo system. The portage tree was not necessary as long as an internet connection was available and a suitable binary package repository was configured. That has actually been working incredibly well and I have no complaints yet whatsoever. However, I do occasionally like to look into the portage tree for examples on creating ebuilds when I'm doing custom software packaging, so i thought it would be nice to have it wherever I can take my EEE.

Then someone on EEE-User mentioned using SquashFS for the Portage tree. This made absolute sense, because the Portage tree did not need to be updated frequently at all, and could easily be made read only. SquashFS enabled me to have the benefits of a source-based Gentoo distribution on my EEE but compressed the Portage tree from 700 MB to 42 MB !!!

The following 5 steps will demonstrate how easy it is to use Gentoo - even with it's "bloated" Portage tree - on the EEE PC.

Note: I performed these steps on a modified EEE PC with 2GB of physical RAM, which explains how I could mount 768MB of RAM as tmpfs. If you have less than 2GB of physical RAM, then I would suggest making the SquashFS Portage image on a regular desktop computer running Gentoo Linux.

Step 1: Find a portage mirror
You can find all of the Gentoo mirrors on the official Gentoo mirror list. I use


MIRROR="http://gentoo.mirrors.tera-byte.com"


Step 2: Install squashfs-tools


emerge -av1 squashfs-tools


Step 3: Download and Extract the Latest Portage Snapshot

mkdir -p /tmp/tmp2
mount -o size=768m -t tmpfs none /tmp/tmp2
wget -O - "${MIRROR}"/snapshots/portage-latest.tar.bz2 | tar xpvjf - -C /tmp/tmp2

Step 4: Create the SquashFS Image


mksquashfs /tmp/tmp2/portage /tmp/tmp2/portage.sqfs
mv /tmp/tmp2/portage.sqfs /usr

umount /tmp/tmp2
rmdir /tmp/tmp2

Step 5: Create init.d and conf.d entries to simplify or automate mounting

/etc/init.d/portage-squashfs:

#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
need localmount
}

checkopts() {
for var in "${MTPNT}"x "${PSQFS}"x; do
if [ "${var}" = "x" ]; then
eerror "one of the necessary variables was not defined"
return 1
fi
done

if [ "$(grep "squashfs" /proc/filesystems)" = "" ]; then
eerror "SquashFS is not supported by your kernel"
return 1
fi
if [ ! -e "${PSQFS}" ]; then
eerror "${PSQFS}: No such file or directory"
return 1
fi
if [ ! -d "${MTPNT}" ]; then
eerror "${MTPNT}: No such file or directory"
return 1
fi
}

start() {
local mtopts="-t squashfs -o loop,ro"

einfo "mounting ${PSQFS} at ${MTPNT}"
checkopts || ( eend 1; return 1 )
mount ${mtopts} ${PSQFS} ${MTPNT}
eend $?
}

stop() {
einfo "unmounting ${MTPNT}"
umount ${MTPNT}
}

# vim:ts=4


/etc/conf.d/portage-squashfs:

MTPNT=/usr/portage
PSQFS=/usr/portage.sqfs
Lastly, don't forget to make the init script runnable:

chmod +x /etc/init.d/portage-squashfs


Notes:

Extracting the portage tree and creating the SquashFS image in /tmp will work only if you have >= 1GB of RAM, approximately. I was using the EEE PC 8G, which comes with 1GB of RAM and there were no problems at all. Alternatively, if you have >= 800MB on your root device, then you could perform the operation there, but it would be much slower. If another desktop or laptop PC is available, a better alternative is to build the portage.sqfs file on the other machine and then copy it on to your EEE.

Also, it should go without saying that you will need to have root permissions to do this - use 'sudo -s'

You should also be aware, that this will make /usr/portage read-only. Therefore, in /etc/make.conf, set DISTDIR="/tmp/distdir" and PKGDIR="/tmp/binpkgs", or something similar.

20080603

Why Don't Manufacturers Build Mobile Phones to Last?

I bought a Motorola L2 14 months ago from a Fido store in Toronto - I was quite happy with it, considering that all I really ever want in a cellular phone is the ability to talk. The L2, although nothing special by today's standards, was a major step up for me because it had a colour LCD (Wow!!). Aside from that, it was my first major introduction to Google Mobile applications, such as Gmail and Google Maps. I was quite satisfied with the Motorola L2 - until the keys became completely unresponsive! Yes, only 2 months after the warranty had expired, the keys became fully unresponsive! I brought the device back to the nearest Fido outlet and they said it was most likely a short circuit they would not replace the handset, understandably, but also would not repair it. My L2 had not done much more than sit on a desk for the year that I owned it. Usually I used it for little more than a watch! It never got wet or experienced a single fall! Maybe dust was an issue, but it really shouldn't be.




In my opinion, if portable electronics are not built to last, then the manufacturers should be providing either recycling or repair facilities directly to the consumer. There are an estimated 130 million mobile phones disposed of annually in the U.S. alone!
In many cases, a large portion of the mobile phones depicted left were probably fully functional when they were disposed of. In many other cases, a replacement part is all that's necessary to restore the phone to its original fully working state.

I fell back to my previous mobile and it works marvellously!! That was a much more modest device - a DRASTICALLY more modest device than what is common by todays standards. It was a Siemen's A56, with a monochrome display ;-) These sort of devices were built to last !!

Oddly enough, you never see mobiles like this being sold in North America anymore, because the retailers have told us that we need colour LCDs, with games and cameras, and iTunes built-in. But if the phone doesn't work as a phone, what good is the rest?

The Siemen's should be fine for me until the OpenMoko / eo1973 GTA2 is being sold to the general public.