As an ArgoUML contributor I'm going to blog my activities here, so that they may draw interest by other developers or help other developers when doing tasks similar to what I've done. AND(!) the grand vision that makes an Argonaut what he is, TO THRIVE IN THE BIG DANGEROUS WORLD, TAKING THE Argo TO A GOOD SHORE ;-))

Monday, September 21, 2009

Customizing Eeebuntu GNU/Linux 3.0 Standard into a development environment

I documented previously the Eeebuntu GNU/Linux 3.0 Standard installation. My intent now is to document the process to make this into a development environment. Since this is an ongoing process, it is possible that I will make new entries that supplement this one, but, for now I hope that this will make the process repeatable and potentially automated.

An important note is that I used the Synaptic Package Manager instead of the command line apt-get package handling utility, so, the commands I'll place bellow maybe won't lead to the result I currently have. This is nevertheless an attempt to automate the process and for this a command line is always better than a list of steps to be performed in some GUI tool.

Install latest Emacs, which is the basis for the majority of text editing and Lisp development.

 sudo apt-get install emacs-snapshot-gtk emacs-snapshot-el

Several version control systems:

 sudo apt-get install git-core git-doc git-gui git-svn subversion

Common Lisp implementations and support for its development:

 sudo apt-get install cl-swank cl-asdf common-lisp-controller sbcl sbcl-doc sbcl-source slime

Standard C++ development support (maybe I should install boost also).

 sudo apt-get install g++ g++-multilib gdb gdb-doc

Python 2.6 development environment (in the future I will probably install the latest Python 3.x also):

 sudo apt-get install idle-python2.6 python2.6-doc python2.6-examples

For future reference I leave here the log of the day when I picked and installed the tools for software development environment.

Commit Log for Fri Sep 18 00:25:50 2009

Installed the following packages: 
blt (2.4z-4.1) 
cl-asdf (1.111-1) 
cl-swank (1:20080223-2) 
common-lisp-controller (6.17) 
emacs-snapshot (1:20090320-1ubuntu1) 
emacs-snapshot-bin-common (1:20090320-1ubuntu1) 
emacs-snapshot-el (1:20090320-1ubuntu1) 
emacs-snapshot-gtk (1:20090320-1ubuntu1) 
g++ (4:4.3.3-1ubuntu1) 
g++-4.3 (4.3.3-5ubuntu4) 
g++-4.3-multilib (4.3.3-5ubuntu4) 
g++-multilib (4:4.3.3-1ubuntu1) 
gcc-4.3-multilib (4.3.3-5ubuntu4) 
gcc-multilib (4:4.3.3-1ubuntu1) 
gdb-doc (6.8-1) 
git-core (1:1.6.0.4-1ubuntu2) 
git-doc (1:1.6.0.4-1ubuntu2) 
git-gui (1:1.6.0.4-1ubuntu2) 
git-svn (1:1.6.0.4-1ubuntu2) 
gitk (1:1.6.0.4-1ubuntu2) 
glibc-doc (2.9-4ubuntu6) 
glibc-source (2.9-4ubuntu6) 
idle-python2.6 (2.6.2-0ubuntu1) 
lib64gcc1 (1:4.3.3-5ubuntu4) 
lib64gomp1 (4.3.3-5ubuntu4) 
lib64stdc++6 (4.3.3-5ubuntu4) 
libapr1 (1.2.12-5ubuntu0.1) 
libaprutil1 (1.2.12+dfsg-8ubuntu0.3) 
libc6-amd64 (2.9-4ubuntu6) 
libc6-dev-amd64 (2.9-4ubuntu6) 
libdigest-sha1-perl (2.11-2build2) 
liberror-perl (0.17-1) 
libpq5 (8.3.7-1) 
libstdc++6-4.3-dev (4.3.3-5ubuntu4) 
libsvn-perl (1.5.4dfsg1-1ubuntu2.1) 
libsvn1 (1.5.4dfsg1-1ubuntu2.1) 
python-tk (2.6.2-0ubuntu1) 
python2.6-doc (2.6.2-0ubuntu1) 
python2.6-examples (2.6.2-0ubuntu1) 
realpath (1.12) 
sbcl (1:1.0.18.0-2) 
sbcl-doc (1:1.0.18.0-2) 
sbcl-source (1:1.0.18.0-2) 
slime (1:20080223-2) 
subversion (1.5.4dfsg1-1ubuntu2.1) 
tcl (8.4.16-2) 
tcl8.4 (8.4.19-2) 
tcl8.5 (8.5.6-3) 
tk (8.4.16-2) 
tk8.4 (8.4.19-2) 
tk8.5 (8.5.6-3)

I have also some more software that currently is installed in my$HOME:

Installing Eeebuntu GNU/Linux 3.0 Standard on my Asus Eee PC 901

I bought an Asus Eee PC 901 with an Asus customized xandros GNU/Linux distribution back in December 2008. I meant to switch to a more “normal” Debian based GNU/Linux distribution right from the start, but, my initial strategy was to use only the Asus Eee PC 901 to make the switch and I started having difficulties, so, this effort stalled for a couple of months. Now, I successfully made the switch to Eeebuntu GNU/Linux 3.0 Standard (which is based on Ubuntu GNU/Linux 9.04 Jaunty Jackalope, being Ubuntu GNU/Linux based on Debian GNU/Linux), and what follows is the successful recipe I used.

  1. I bought a 4GB Kingston DataTraveler USB stick to place there the Eeebuntu GNU/Linux 3.0 Standard for installation.
  2. In an old Compaq Presario 2500 laptop I used KNOPPIX 6.0 / ADRIANE 1.1 - Live CD (another Debian based GNU/Linux distribution) to:
      p
    1. rewrite the partition table of the USB stick as a single primary partition, using the bundled gParted;
    2. format the USB stick as a FAT16 partition by issuing the command
      sudo mkfs.vfat -F 16 /dev/sda1
      (note that my USB stick was identified as sda, in another situation it may be different).
  3. In the same notebook, using UNetbootin in Windows, I created a boot-able USB stick from the Eeebuntu GNU/Linux 3.0 Standard ISO image.
  4. Finally, start-up the Eee PC 901, pressing Esc key to get into the boot device selection menu and choose the USB stick as the boot device. (Note that I changed the BIOS settings, disabling the fast boot and changing the boot priority order, although in retrospect I suspect this wasn't needed.)
  5. Select the default option in the UNetbootin boot menu (still before Linux image in the USB stick starts or wait some seconds.
  6. After the Eeebuntu GNU/Linux 3.0 Standard ISO image starts, double click the Install shortcut in the desktop.
  7. The installation procedure is very simple, and I only made some complex decisions in the manual partitioning, having the following:
    • /dev/sda – this is the master SDD disk with 3.75 GB of memory and it is faster than the secondary SDD disk. I partitioned it in two as follows:
      • /dev/sda1 – with a size of 2.88 GB contains all top folders (/ mount point), except linux-swap, /usr and /home;
      • /dev/sda2 – ~ 900 MB for linux-swap.
    • /dev/sdb – this is the slave SDD disk with 15 GB of memory. I partitioned it in two as follows:
      • /dev/sdb1 – with a size of 6.22 GB, contains /usr;
      • /dev/sdb2 – with a size of 8.81 GB, contains /home.
    I used ext4 file system for all the partitions (except linux-swap).

In retrospect I think that I would be able to do all the steps in the original Eee PC 901 with xandros, but, originally, in December 2008 I had an 8 GB USB stick for which a FAT16 file system isn't possible. Also, the xandros with which the Asus Eee PC 901 comes is based in an old Debian distribution and I wasn't able to execute UNetbootin in it.

I already made some customizations, like removing some programs and installing additional ones (I'm writing this in emacs-snapshot-gtk) and development libraries, but, I'll document this in a different post.

Friday, September 04, 2009

bash hints – for loops

Today I had to process some files in a similar way in a bash shell. After trying using pipes, I reverted to for loops. First iterating for all files in a directory and extracting its contents (they were *.tar.bz2):

(...)/pcl-book/c23-spam/sa-pub-corpus> ls 
20030228_easy_ham_2.tar.bz2  20030228_hard_ham.tar.bz2  20030228_spam.tar.bz2 
20030228_easy_ham.tar.bz2    20030228_spam_2.tar.bz2
(...)/pcl-book/c23-spam/sa-pub-corpus> for f in *; do tar -xjf $f; done

Then, I discovered that the archives contained a file which I didn't wanted, so, I removed the files (the files were named “cmds”):

(...)/pcl-book/c23-spam/sa-pub-corpus> ls 
20030228_easy_ham_2.tar.bz2  20030228_hard_ham.tar.bz2  20030228_spam.tar.bz2  easy_ham_2/  spam/ 
20030228_easy_ham.tar.bz2    20030228_spam_2.tar.bz2    easy_ham/              hard_ham/    spam_2/
(...)/pcl-book/c23-spam/sa-pub-corpus> for f in `ls --ignore=2003*`; do `rm $f\cmds`; done

Reader Shared items

Followers