optimize Gentoo with tmpfs

Today has been a very rewarding day for finding interesting articles. Apart from the articles that I will mentioned in my next article here is one for my readers who runs the Gentoo operating system. [http://apcmag.com/6636/Gentoo tip for the love of tmpfs](http://apcmag.com/6636/gentoo_tip_for_the_love_of_tmpfs) Basically the idea is to mount a virtual file-system over the directory that stores temporary files used during compilation of new software (/var/tmp/portage). As most you you might know, Gentoo includes a system that automatically compile and install software for you. The great part is that it is very easy to use, the down part however is that it sometimes takes hours to install a certain software. The Hard Drive being the slowest part in the equation has just to be removed. To try it out simply add this line to your /etc/fstab file and mount it as root or reboot.
none /var/tmp/portage tmpfs size=212M,nr_inodes=1M 0 0
You might also want to kill the content for the directory before, as it most probably contains lost of useless data which would then be hidden behind the mount.
rm -fr /var/tmp/portage ; mkdir /var/tmp/portage
Now the guy in the article use a 1412M sized tmpfs virtual partition on a 2G of RAM system. I really wonder how this would work on a 512MB RAM system. It might just swap all the time removing the whole idea. So I'm not sure this tricks helps people who really needs help. (the people with regular hardware) What I really would like to understand is how the tmpfs kernel module know when to delete or not a file from the memory. I'd be afraid that it kills some .o out of the memory before the full compilation comes to an end. Or that it keeps all these temporary files in memory for hours after the compilation is done. I'd like to understand the magic. For more Linux related article, checkout their [Kernel Knowledge page](http://apcmag.com/kernelknowledge/) Update: Then later I found in the comment it is useless to add an extra tmpfs as Gentoo always have one enabled. And I Quote .... "You can always do this by using the existing tmpfs, /dev/shm. /dev/shm will allocate up to 1/2 of your system RAM for tmpfs and it should already exist. To use it change/add the following three lines to your gentoo /etc/make.conf file:"
Good luck in your trials. And please post comments on your experimentations.

Tags , , , , , , ,

Posted in , , | Posted on 23 Aug 2007 02:38by somekool |

How to not being forced to XOrg 7.1 on Gentoo

If you are like me, you like system that works and you care much more about the latest version of KDE than the latest version of XOrg. especially when updating KDE is pain-less and bug-free while XOrg means talking with God, backup-ing your Mother and what not. So I wanted to be able to run
emerge -avUNt world
like everyone else, while staying on XOrg 6.9 Like you might know, the recent portage are not forcing us to do the update. you cannot run 'emerge world' without upgrading. and upgrading is far from being easy. While preventing portage from forcing is not as easy as it sound. It is not that hard. thanks to /etc/portage system. here is how to do it. * first add the following lines in **/etc/portage/package.mask**

### I dont want to update X
### END
* then add the following line in **/etc/portage/package.unmask**
after that you might get 1 or 2 more problem. I remember I also had to modify an ebuild and remove a useless dependency on a package. if it does not work for you. please comment below. I'm gonna help you to go through it and I'll update this post for a more accurate information. have a nice day.

Tags , , , , , , , ,

Posted in , , , | Posted on 17 Nov 2006 07:20by somekool |

Gentoo Binary Packages repository

Like I heard many people saying, I really like [gentoo](http://gentoo.org) very much but sometimes I just one this package real quick. For that, a Binary Packages Repository (BPR) would be quite appreciated. There was the [Chinstrap Project](http://chinstrap.alternating.net/) that unfortunately being abandoned. I think it is very sad such a project is abandoned. There is also [klik](http://klik.atekon.de/) which actually is VERY GOOD, but aimed for (cross-distrib) desktop use, not as a core system solution. I think gentoo needs something on its own to his image. There has been [discussion](http://groups.google.com/group/linux.gentoo.user/browse_thread/thread/24cc78b55f6b97e0/fbe226112b28a5ee?lnk=st&q=gentoo+binary+repository&rnum=1#fbe226112b28a5ee) about it before, and apparently the problem with binary distribution is that it breaks and needs to be reinstalled. My personal problem with Binary package distribution just as Mandrake or SuSE is package availability. some and few packages that I want are not available. and/or you need to manage a list of download sources, which is a pain in the butt. Then it finally comes down to compiling it from source except that it won't be registered in your system database. which I don't like. I want everything and every-file to be registered, removable and manageable. That is why I like gentoo. every single packages are there. even proprietary stuff like [CrossOver](http://www.codeweavers.com/). The Gentoo portage won't be able to download it, because its paid software. but if you download it, put the file in your distfiles directory. it will check the digest and record this package into your system package database. THAT is GOOOOD. What I am thinking is having emerge being modified to upload packages after the compilation is done. so everyone in the world would be uploading package unless already found, in which case it would have got downloaded. So If found, download, if not, compile and upload. In order to keep system stability, I'm not sure how many duplicates of the packages we should need to store. I would be thinking.... http://gentoo.packages.example.com/gentoo/[arch]/[CHOST]/[gcc version]/[glibc version]/[package group]/[package name]/[package version]/file that might become crazy, but it might be what it needs. even USE flags might have to be thrown in there. I'm not sure how would be best to organize the use flags. but one way which would not be human browsable but flexible would be to assign a unique bit-flag to every USE flags. just like filesystem permission, where r-x becomes 5 the total would become a huge number but it would not matter I think. so it might become something like http://gentoo.packages.example.com/gentoo/x86/i686-pc-linux-gnu/gcc4.1.1/glibc2.4/kde-base/kdebase/3.5.5/kdebase-3.5.5.gentoo-bin.tgz that would required a lot of space and bandwidth I would guess, but I think its worth the try. problems can be fix in time. opinion?

Tags , , , ,

Posted in , , | Posted on 11 Oct 2006 19:37by somekool |

Updating E17 on Gentoo

Maybe some of you have tried the excellent [Enlightenment 17](http://enlightenment.org). Although still under heavy development, its definitly worth the look. Luckily for us gentoo user, there is ebuilds already done which makes the compiling task easy. Still, when is time to upgrade, it's a not all automatic. The problem is; all packages keeps de same version (9999 for development). So, if you re-emerge e, it will not re-emerge all the dependencies, because they are already installed and the version number has NOT changed. So You have to check all the dependencies and make sure to re-emerge them all, in order. its a bit of a pain in the butt when you just want to see the latest development the team has made. So I wrote a script to make it even easier. I wrote it few months ago while I was doing it by hand. and Few days ago, I thought I might upgrade E17 again and check it out. so I tried out my script which worked with not too many bug fixes ;) hehe. click more for the script and to send comments
It's not 100% production quality, but it does the job ;) maybe you'll laugh on the incomplete part, maybe not.
$ cat ~/bin/emerge_e17
# krypton ~ # epm -qa | grep 9999 | cut -d \- -f 1 | xargs  echo
# eet embryo engrave e_utils examine edje epsilon epeg engage ewl evas ecore esmart e
# http://www0.get-e.org/EFL_User_Guide/English/_pages/print.html

e17_ignored_libs="imlib2 edb"
e17_libs="eet evas ecore epeg embryo edje epsilon esmart emotion ewl engrave emotion"
e17_apps="entice elicit embrace eclair evfs entropy exhibit eclair ephoto erss evidence"
e17_misc="e_utils examine engage"
e17_proto="etk exhibit entropy"
e_modules="calendar flame monitor mount rain screenshot slideshow snow tclock weather"
default="$e17_libs e engage entice elicit eclair"

function choose_packages() {
        if [ -f /tmp/.e17.package_list ]
                echo `cat /tmp/.e17.package_list`
                echo "what would you like to (re)install ?"
                echo "-1 - The Default ($default)"
                echo "0 - imlib2"
                echo "1 - libraries ($e17_libs)"
                echo "2 - Window Manager (e17)"
                echo "3 - Extra packages ($e17_apps $e17_misc $e17_proto)"
                echo "4 - Extra Modules ($e_modules)"
                echo "5 - Themes (none)"
                read answer
                echo "you choose ($answer) but I'll go anyway with the default because I'm lazy."
                echo "$default" > /tmp/.e17.package_list
                echo `cat /tmp/.e17.package_list`

function compile_app_list() {
        for package in $1
                if [ ! -e /tmp/.e17.$package ]
                        echo "emerging $package...."
                        emerge $package
                        if [ $err_code -eq 0 ]
                                touch /tmp/.e17.$package
                                echo "... emerge returned error code $err_code"
        echo $did_something

function main() {
        rep=`compile_app_list "$list"`
        if [ $rep -eq 0 ]
                echo "All package has already been emerged, you would like to start over ? (y/n)"
                read answer
                if [ "$answer" == "y" ]
                        rm -f /tmp/.e17.*
                        compile_app_list $list



Tags , , , , , , ,

Posted in , , , | Posted on 12 Aug 2006 00:35by somekool |

My new KDE desktop

I changed my KDE desktop feels, I like it so much better :) And feel much more productive since then. it's been about a month now. and I totally love it. I got rid of everything, make it simpler looking and giving me more screen space.
1 - kicker kicker is too large and takes too much of my desktop space for things I don't need that often. making kicker smaller bugs me even more. because than I miss kicker space to put my favorite applets. some applets are annoying in their small version. but some applets are worse when kicker is vertically positioned. solution ? getting rid of it. hard. with so many programs using the systray. I can't really. Hide it ? I always hated auto-hide, but still worth the try. And I made it so its fine. I wanted hidden, easily accessible but not over-annoying like hitting a edge by accident would raise it. The top-right corner of the screen is busy for the close button. so I choose the top-left corner of the screen as a hotcorner to raise the kicker. I moved the systrays icons to the left, because systray icons are really the most important reason why I still need kicker. And I don't want to ride my mouse from the top-left corner to my systray at the other end. so I then reordered all my applets by how often I am accessing them. putting the clock on the full right as I am not clicking on it very often. the K menu that I use maybe once a month. and the Garbage not so far as I am trying it out but so far, not appealing enough. 2 - desktop icons. actually I like them, I press F11 to show my desktop and I use them very often. but recently I've been hitting on a bug that makes my desktop and kwin crash when I use the context menu of a desktop icon. and I don't like when it happens and I can't wait for the bug to be fixed. so I removed desktop icons. its nice to see my desktop backgrounds without a mess of icons on it. 3 - task switcher. I use kompose, with a hotcorner on the bottom-right and F9/F10 hotkeys. its perfect. I'm also ALT-TAB addict but I like using kompose a lot. 4 - flaws ? only one so far, I don't get changes notification from kwin. so I need to close kopete window or else I forget to answer my friends. its a big problem I'm trying to deal with. if you got any idea. I wish kompose could wake me up ;) [4a - changes notification system](http://bugs.kde.org/show_bug.cgi?id=126749) and two more requests: [4b - get the trash applet a better tooltip](http://bugs.kde.org/show_bug.cgi?id=126748) , [4c - titlebar buttons are just a 22 years old technlogy.](http://bugs.kde.org/show_bug.cgi?id=126750) got solutions or comments for me ? my ears are wide open.

Tags , , , , , , , , , , , , , ,

Posted in , , , , | Posted on 04 May 2006 09:39by somekool |

ALSA we love you

Anyone had fun with ALSA before ? Some would say its much better than OSS and much more powerful. Some would simply say the it supports more cards (well of course, development on OSS is kinda stopped for a while already) anyway. Who need this kinda of configuration ? why there is so many options to this config file ? its like your computer could really have 5 different sound card and reroute them in some weird way. well, buy a mixer. got true use for all the power ALSA offer ? please comment below. I'm just to a point where, even though you are a geek programmer, if all you want to do is software or web development. You don't really want to understand the fully underlying sound system of your operating system to chat with your girlfriend. There is advantage Linux has I can't live without but there is huge whack of extra time that you have to spend in order to get things working. And some of you who does not have problem, well either you have not used it long enough or you are just as picky as I can be. anyway, I did not want to troll about anything today. I'm just very tired of rebooting on windows when I have to do my phone calls. And **the good news is**: I found this little hack that I need to get both my soundcard device and my USB microphone as default device.
somekool@krypton ~ $ cat /etc/asound.conf
pcm.!default {
        type asym
        playback.pcm {
                type plug
                slave.pcm "hw:0,0"
        capture.pcm {
                type plug
                slave.pcm "hw:1,0"
somekool@krypton ~ $
that's it. so now I can just use arecord to record my voice without needing any options to specify the proper device.
somekool@krypton ~ $ arecord file.wav
well am I happy ? not really. skype needs OSS or OSS emulation to work. it does not use ALSA directly. but OSS is too old. and I can't really switch my system to it. so I'm not sure if I can get an OSS-emulated device for my USB microphone or If I really need to get arts to see my microphone. arts seems the easiest way to get everything working. but for some reason, it still does not see my microphone. Hey you out there who knows all about it but are just a little to shy to help. show yourself off it will be highly appreciated.

Tags , , , , , , , , , , , , , , ,

Posted in , , , , | Posted on 14 Apr 2006 23:59by somekool |


my last twitter posts

Personal Links




my Xbox 360 gamertag

Copyright © Mathieu Jobin's Life and Thoughts