Monthly Archive for March, 2010

Creating a 32 Bit Chroot with Funtoo Sources (For Wine)

Since I can’t seem to get wine to work properly on the 64 bit build, I decided to break down and stop fighting the system. Just create a damn 32bit chroot so that everything works fine. The following (modified from the official gentoo site) were the steps that I took, and everything seemed to build fine with no problems. I put this is script format so if anyone wants to save 15 minutes of time, then they can just cut/paste this into vim, chmod it, and execute it. If you decide to be lazy like me, make sure that you review what you are stuffing into your make.conf file. It might not be what you wanted.

#!/bin/bash
mkdir /mnt/gentoo32
wget http://distro.ibiblio.org/pub/linux/distributions/funtoo/funtoo/x86/stage3-x86-current.tar.bz2
tar -xvjpf stage3-x86-current.tar.bz2
cp -L /etc/resolv.conf /mnt/gentoo32/etc/resolv.conf
cp -L /etc/passwd /mnt/gentoo32/etc/passwd
rm /mnt/gentoo32/etc/make.conf
echo "CFLAGS=\"-O2 -march=native -msse2 -pipe -fomit-frame-pointer\"" >> /mnt/gentoo32/etc/make.conf
echo "CHOST=\"i686-pc-linux-gnu\"" >> /mnt/gentoo32/etc/make.conf
echo "CXXFLAGS=\"${CFLAGS}\"" >> /mnt/gentoo32/etc/make.conf
echo "MAKEOPTS=\"-j2\"" >> /mnt/gentoo32/etc/make.conf
mount -o bind /dev /mnt/gentoo32/dev
mount -o bind /dev/pts /mnt/gentoo32/dev/pts
mount -o bind /dev/shm /mnt/gentoo32/dev/shm
mount -o bind /proc /mnt/gentoo32/proc
mount -o bind /proc/bus/usb /mnt/gentoo32/proc/bus/usb
mount -o bind /sys /mnt/gentoo32/sys
mkdir -p /mnt/gentoo32/usr/portage/
mount -o bind /usr/portage /mnt/gentoo32/usr/portage/
mount -o bind /tmp /mnt/gentoo32/tmp
emerge --noreplace sys-apps/util-linux
echo
echo /##################################################\
echo
echo NOW RUN THE FOLLOWING:    
echo # linux32 chroot /mnt/gentoo32 /bin/bash  
echo # source /etc/profile 
echo # env-update  
echo # emerge -vauND world
echo
echo \##################################################/

Sync the iPhone 3x in Amarok on Gentoo Linux

This was partially error on my part, and lack of documentation else where. The iPhone 3x (jailbroken or not) can finally sync with Amarok. A few packages are needed, but the process is automated. You no longer need to use ifuse to manually mount and use gtkpod to transfer music. However, I have not found a way to tranfer pictures or video yet, so I don’t recommend completely removing them. The following packages are needed to complete this, and a few things are needed before you install Amarok.

Prerequisite Packages Needed with the Proper USE Flags:

=dev-libs/libusb-0.1.12-r7 debug doc
=dev-libs/libusb-1.0.3 debug doc
=app-pda/libplist-9999
=app-pda/libiphone-9999
=app-pda/ifuse-9999
=app-pda/usbmuxd-9999

After these are installed, you need to remove both media-sound/amarok and media-sound/amarok-utils. Once these are removed, you need to reinstall both of the newest packages with the following USE flags.

Before the installation, you need to remove the Amarok folders in your home directory. You will have to reconfigure your music collection’s location, but this will clear all of the problems that might stop your phone from mounting in Amarok. (I removed all the folders vice each file inside)

Locations of Amarok Configurations:

~/.kde4/share/apps/amarok/
~/.kde4/share/config/amarok

…and here are the new Amarok packages you need.

Amarok and Amarok Utilities with Proper USE Flags:

=media-sound/amarok-2.2.2.90 daap embedded ipod lastfm mp3tunes opengl
=media-sound/amarok-utilites-2.2.2.90 -debug

Once you have done all of this, plug your phone in, and it should mount in Amarok automatically.

Screenshot:

CAC Reader Support in Gentoo

This might not be new, but it was defiantly new to me.  I found a package in portage that grants the ability to install your own CAC card reader, integrate it with Firefox and use your certificates to log into government sites that you have the proper access to.  It’s great for people who don’t want to use a virtual machine alternative solution, and additionally, you don’t have to purchase any additional software like ActivCard Gold.

Simply emerge the following, start the init script, and install the additional certificates into Firefox, and your CAC should work.

app-crypt/ccid
sys-apps/pcsc-lite
app-crypt/coolkey

… and for the init script

# /etc/init.d/pcscd start
# rc-update add pcscd default

Lastly, installing the DoD Certificates:

The Certs:

The easiest way to install the certificates is by visitinghttp://dodpki.c3pki.chamb.disa.mil/rootca.html and clicking on each one.

Alternatively, you can download them and install them by hand.

All of the certificates are located at the following links:

Sadly, there is no quick way to manually add the certs, and I had to load all 45 certs by hand. It shouldn’t take more than 10 minutes, however, you have to load each one, click Okay, and then start the new one, you can’t just load all of them before clicking Okay.

To add the certs manually, simply go to Edit >> Preferences. Once the window appears, go to the Advanced tab, and then the Encryption sub tab. Click on the View Certificates button. Go to the Authorities tab, and click the import button. Navigate to the first certificate, and then add it. Click okay, then repeat the steps starting at the Import button again.

After you have loaded all of the certs, and before you can use your card, you have to point Firefox to the CAC reader. Firefox considers your reader to be a “Security Device.” To add it, simply go to Edit >> Preferences. Once the window appears, go to the Advanced tab, and then the Encryption sub tab. Click on the Security Devices button. You need to select CAC Module and add the path to libcoolkeypk11.so. You can either slocate it on your system, or if you have a 64bit, then point it to /usr/lib64/pkcs11/libcoolkeypk11.so. You should be prompted for your password and after that you are set.

MAKE SURE YOU DO NOT ENTER YOUR PASSWORD WRONG 3 TIMES OR IT WILL LOCK YOUR CARD, AND YOU WILL HAVE TO GET YOUR CARD PROVIDER TO UNLOCK IT!

Updates for Ruby

So, portage must really be behind the updates or someone in charge of ruby is slacking. As of now, portage only recognizes =dev-lang/ruby-1.8.7-p174, which the file doesn’t exist in any repository. What does exist however is =dev-lang/ruby-1.8.7-p249. The downfall is that it relies on =app-admin/eselect-ruby-20091225 which… doesn’t exist. You have to love updates!!

For convenience, I just added both into the /usr/local/portage tree, and digested these. Hopefully in the next day or two this problem will be fixed.

http://www.gentoo-portage.com/dev-lang/ruby

http://www.gentoo-portage.com/app-admin/eselect-ruby

Samba is a Pain!

Well, today on the update of world, I got the great circular error of dependencies on net-fs/samba and net-fs/samba-libs. I am not sure what is going on upstream, but all of the kde 4.4.1 packages are really having problems with particular versions of samba, and the libs were fighting me on the versions as well. The only solution I had was to unmask =net-fs/samba-3.5.0 and pull that one manually (with –oneshot) and then pull =net-fs/samba-libs-3.4.5 (with –oneshot). After that, world updated with no problems. It was simple enough yet it was just a pain in the ass.