Blog inactive  

Posted by Satish Eerpini

This blog is not active anymore , u can reach me at :

Installing ruby-Qt4 on Fedora 9  

Posted by Satish Eerpini in , ,

well it is a lot easier than on Fedora 8( which i could never complete though i posted the method here ), it is just the installation of an RPM , just do this if u want to write any GUIs with Ruby based on Qt4
yum install kdebindings

u are ready to roll !!!

Kernel installer !  

Posted by Satish Eerpini in , ,

i have been learning gui programming with Ruby, .. it is a lot more easier designing GUI's with languages like Ruby or Python , than C . I actually wanted to write a kernel installer , which would work like this , ....

nothing related to the kernel is involved in the functioning of the installer , here is how it would go step by step .... :

  • ask for the kernel archive file .(or may be just ask for the patch file and do the rest as same after applying the patch ).
  • process the available config techniques based on the presence of libraries (like make gconfig, make menuconfig , make xconfig, ... etc)
  • ask the user to choose the config technique
  • give the option for the user to load the .config file from the installed kernel
  • and then compile the kernel , the progress being shown in a display window
  • and then complete the installation and ask the user to reboot to use the new kernel

i just got this idea, .... does a tool like this already exist, ... or would it be worth it , to develop something like this ,....?


removing tabbed display : drupal : user relationships...  

Posted by Satish Eerpini in

so if you have used the user_relationships module in Drupal ( 5.x) , u would know that the My relationships link in the navigation menu , when clicked displays a page with two internal tabs, 'all' and 'pending'. If u didn't like the tabbed display , (i did not like it , so i made this change)u can as well change it to display any one of the options , pending or all , this is what has to be done , u will have to edit the hook file for the user relationships module , so the required file is
"your drupal installation"/modules/user_relationships/
find the following code in the file and make the following changes .

$items[] = array(
'path' => "relationships/list",
'title' => t('All'),
'access' => $view_access,
'weight' => -10,
if (true || ($approval_required && $edit_access)) {
$items[] = array(
'path' => "relationships/requests",
'title' => t('Pending'),
'access' => $edit_access,
'callback' => 'theme',
'weight' => -9,
'callback arguments' => array('user_relationships_pending_requests_page', $user->uid)

change it to the following ,...

$items[] = array(
'path' => "relationships/list",
'title' => t('All'),
'access' => $view_access,
'weight' => -10,
if (true || ($approval_required && $edit_access)) {
$items[] = array(
'path' => "relationships/requests",
'title' => t('Pending'),
'access' => $edit_access,
'callback' => 'theme',
'weight' => -9,
'callback arguments' => array('user_relationships_pending_requests_page', $user->uid)

we are just changing the menu hooking behaviour, ... this is just a choice of look , a small tweak , nothing more,...... u can just ignore this if u like the tabbed display .

Fedora 9 install media in India.  

Posted by Satish Eerpini in ,

This is an excellent initiative by one of the members of the Fedora Ambassadors Project , Susmit. He created a list and we( members from india) have been adding to it. It is a list of volunteers , who could copy Fedora install media for people who would require them. This is not limited to the present release and will continue for all the future releases i guess , ... here is the link , ....

Installing qt4-ruby bindings !!  

Posted by Satish Eerpini in ,

i installed the qt4-ruby bindings just now. It is a little confusing ( for me atleast), so i describe here the process to install the bindings, (for linux, i am using Fedora 8).....
-> install qt4 on your system
->get the qt4-ruby bindings from the RUBYFORGE site or from the following link, the following link might contain an old version , so go to the rubyforge site for the latest stuff, ....
->install cmake on the system if it is already not present
on a Fedora system u can do this by just using 'yum install cmake'
->then extract the archive and change to that directory ,
->then run 'cmake .'
this will automatically configure and create makefiles .
->then run 'make'
this should automatically install the bindings, just write a sample ruby program to check if it works !

installing RadRails on Eclipse ...........  

Posted by Satish Eerpini in , ,

I could not find a proper answer when i wanted to install RadRails on eclipse . This is how it is done , .... in the Eclipse menu go to
Help-->Software Updates --> Find and Install....
then in the pop - up window which appears ,..
Search for new features to install
and then click next and then u will have to add 2 new remote sites, .. the details for the sites are the ones which were very difficult to obtain , they are
site 1 :
Name :RadRails
site 2 :
Name :RDT
then click on finish , u are almost done with the installation , u have to just follow the instructions from here on to finish the installation .

my friend's reply to the previous post, ......  

Posted by Satish Eerpini in

can understand ur feelings .... this sometimes happen to me also .. its called the controversy of the way we live life !! ...

Every day we look at the sky dreaming of what would happen but not quite sure of what is our desire ...then comes the pigeon ... disturbing our peer sense of onlooking insight into our future .. but then again .. thats how lief goes ... like a rail ... chuk chuk ... thoy thoy ... its fast .. and sometimes u don't even catch the glimpses of what is going on ... so ...

whaT my intension behind the mail is ... pigeons may come on the platform .. but what makes u outstanding is when u kill the pigeon on the spot and roast it and eat it up ,... and say ... blurp !! ... i am satisfied now .. i can continue my ruby !! ... and then catch up with ruby in rails ....
let go pal .. this is life ...
u've done ur part ... its up to others to decide ur credentiability .. but never loose hope in urself !! . and always stay on focus ...
thats the way the great karthik lives ,.... and thats why he is called the magestic and magnificent !! ..

Regards ,
*******... the magesty himself

Hi ...
How are you?? I am fine thankyou...Do not bother mailing back :).. I am doing great and am currently on the platform... Long to go before I get on the rails.. Well, I am a star waiting to be adorned by Ruby and PERL.. I have to make a rail journey once my platform work is done with.

There seems to be one thing that bothers me... Piegons!!! They are on the platform as well.. But, why rails for them?? They have the sky... While they'll be airborne once they are done, I'll be on rails.. Believe it or not, I am not even going to get sailing!!!

Rail gadi.. Rail gadi... Chuk chukk.. chuk chuk chuk...

A very bored Programmer

ruby and the little book of ruby !  

Posted by Satish Eerpini in , ,

the little book of ruby is one of the best things i have ever seen , it describes all that is to ruby , the most part of the language in a very short and sweet way . This book is all u need if u want a brief introduction on Ruby . But the Ruby cookbook provides lot more information . It provides some very neat questions, indeed some of the best questions i have ever seen . My journey into ruby has just started today , so have to see how all this finally turns up ! up and running ,,,,,,  

Posted by Satish Eerpini in ,

the latest kernel release is , and i have already compiled it and no problems at all. All i had to do was copy the config file from the 2.6.25 version and compile the new versiion .


Posted by Satish Eerpini in , ,

The random number generator function in the C lib is quite predictable. My friends at LUG@VITU, wrote this function which generates a random number by utilizing the noise level from the devices from a file in /proc . I have made small changes to the make file to create a library when compiled and thus the lib can be directly installed . I have also added make install support to the code .The code is available at :

endswith v1.2  

Posted by Satish Eerpini in , ,

the next version of the endswith program which i had started a few weeks ago , is out, this release contains a library function implementation of the endsWith program called iendswith() , a header file has been included in the source code, including this header file and after compiling the library , the function iendwith can be used in regular C programs , ........
unlike the actuall endwith binary, iendswith only returns the number of matches for the given pattern in the given directory ..... i am presently working on a library function implementation which could return the matching file names in the form of a string stype structure, .... but that needs some work,... the included library function is just a rework of the original program. More changes have actually gone into the Makefile , just running make compiles only the binary as usual . Running 'make library' compiles the library function and creates the endswith.a library .
A test driver function has also been included to check the functionality of the library , running 'make test' will compile this function and the created binary test_iendswith can be used then to test the functioning. Documentation is one thing that is still to be added and of course , providing an install option also is a good thing for the next version . The source code can be found at

my new theme on Fedora 8 , : awesome !!  

Posted by Satish Eerpini in

here is a screenshot of my Fedora 8 desktop with the new theme , it is just great ...... i am lovin it !!

worries with the main logic of endswith !  

Posted by Satish Eerpini in , ,

reference :
i have been having enough problems getting the main logic of the endswith function right, .... the code for the main loop in the program which does the string matching is as follows :
for(i=0;i dir_recd_len;i++){
continue ;
* the first error lay here , i forgot to give the
* brackets at (85,19) and (85,45), that gave negative values
* during iterations , which was disastrous
* could not use exit(0) or break here
* because , exit would take it completely
* out of the loops ,and i was not sure
* of using break , has to be changed soon
goto out;
* final check if the file name in the directory had
* the given ending
if(flag==1 ){

while the problem is that, the program works very well when the string pattern to be matched is a part of the existing file name , but when the string pattern is a super-set of the existing file names , it also displays the file names which are a subset of the given string pattern .The first time i discovered this problem was when i ran the following command , where i had the files mplayer and gmplayer in my root directory :
endswith /root gmplayer
it gives both mplayer and gmplayer as the output , where as only gmplayer should be displayed .Have not been quite successful in figuring out the error !

exams time again !!  

Posted by Satish Eerpini in

to say the least , the next two weeks is going to be the most boring time of my life, ... it is sem end exams coming up , so have to do some serious studying !!! miss u guys !! :-( .........

2.6.25 up and running !!!  

Posted by Satish Eerpini in ,

well i have compiled the latest kernel (2.6.25) , without any problems on Fedora 8. ... it appears to e a notch faster than the previous stable release, ....... but i have realized one thing, on Fedora, just compiling and installing the kernel image also automatically generates the 'initrd image, . While it does not on other distros, most of which i have used !!!

endsWith() function in C  

Posted by Satish Eerpini in ,

well this function already exists in Java , so i just wanted to write a similar thing in C , it was pretty simple work , the source code can be downloaded from ,
and a lot of things are yet to be added , which can be found in the TO-DO file .

ubuntu root login  

Posted by Satish Eerpini in , ,

by default ubuntu does not come with the privileges to login as root in GDM , ... here is what can be done , there are two steps , first to enable root login and the second to know the root password :
1) go to the following in the panel menu:
Login Window
There in the Security tab , check the option , Allow local System Administratotr Login .
2) go to the following in the panel menu :
User and Groups
then select root, and click on Properties, then select Generate Random Password and note down the password displayed in the Password set to field. This is the required root password , change it if u want to from the terminal . Now logout and login back as the root user . Logging in as the root user provides a lot of functionality, but it may get very messy at times, if u don respect it .

Helper Functions Library in C  

Posted by Satish Eerpini in , ,

A small project has been planned at the LUG@VITU , it consists of coding a simple C library having helper functions which are not available in the standard C library .More details about the project and how to contribute to it can be found here :

kernel up and running .  

Posted by Satish Eerpini in ,

i had absolutely nor problems with compiling the latest kernel and installing it on my laptop running Ubuntu 7.10 . The only cliche was that when i copied the config file from my installed kernel for the compilation , my sound drivers were not enabled by default , so had to check them out manually, then i just used the make-kpkg provided with ubuntu , to make the kernel headers and image debian files , which i installed and then booted. The only thing left to be configure is the WI-FI card, ipw3945 card.

mplayer resolution problem : 2nd method .  

Posted by Satish Eerpini in ,

i have already talked about both the problem and the first solution , which can set it right when used it from the command prompt , but here is another method if u are opening mplayer from gnome , ... click on the video to be opened and select 'open with other application ' , there select 'use custom command ' , then enter 'mplayer -zoom 200' , this will open mplayer properly , the next time u need not enter the whole thing, ....... selecting only mplayer also works, because mplayer automatically generates an alias withing the filesystem .
But there is a problem , now suppose if u plug in a removable media , u will have to enter the whole command with the zoom option again , because it is a different filesystem . I am not yet confirmed on this point , have to do a little more testing . But i have not encountered the problem on the same machine when i compiled and installed MPlayer-1.0rc2 . Have to test the whole thing a litlle more to confirm the bugs .

mplayer resolution problem  

Posted by Satish Eerpini in ,

i was facing this problem when installed MPlayer-1.0rc1 on ubuntu 7.10, the problem was that the video would come up only in the center of the screen even in the full screen mode ,i had installed the player from source . Now there are two solutions for this, the first one works perfectly , but the second one is a little problematic .They are :
1. Create an alias to the mplayer command and place it in the bash configuration file, so the line to be placed in the file is:
alias mplayer='mplayer -zoom 200'
and place this in the file ~/.bashrc . This works fine if u are running mplayer from the command line , i will post the next method a little later .....

A series on kernel configuration and compilation.  

Posted by Satish Eerpini in , ,

Here is a series of posts on the very basics of how one can configure a kernel and then compile it and install it. If anything appears to be wrong or something more has to be added please feel free to add or comment ....

retrieving deleted files from ext3 partitions : ext3grep  

Posted by Satish Eerpini in , , ,

ext3grep seems to be one awesome of a creation . It was a result of, what drives most work in this world, ' a personal itch ' . The description and details given by the creator Carlo Wood are too great for me to provide a new definition over here , so take a look at the HOWTO here,,
the page has a really good explanation of how ext3 works and how actually ext3grep retrieves the files . You can have a look at the various releases of the utility //
and one can download the latest release from
i bet it is one thing every linux user should have at hand , because as Carlo says , it happens to everyone sooner or later . The utility still need s a lot of testing and improving i guess, so joining the mailing lists would be a great idea .

Saturday Roundup - LUG  

Posted by Satish Eerpini in ,

The first planned saturday round-up at the LUG , VITU , took place yesterday in the evening . It was a pretty private one , but the discussions that went on were great . Lot of plans were proposed for improving the website and for involving more people . A lot of techincal and interesting discussions also went on . A review on the discussions can be found at : .

The __LINE__ macro  

Posted by Satish Eerpini in

i never actually knew that there was a macro provided by ANSI C which contains the current line number of execution , it is the __LINE__ macro here is a sample program to show its usage and after that follows the ouput :

int main (){
int a;
printf("\nHello testing the use of the __LINE__macro \n");
printf("The current line number is 5 \n and the value of __LINE__ is :%d \n",a);
return 0 ;


Hello testing the use of the __LINE__macro
The current line number is 5
and the value of __LINE__ is :5

the preprocessor directives such as #include do not come under program lines so i have not included them here ....

Yum rollback : more issues  

Posted by Satish Eerpini in , ,

the discussions i have been involved in on the YUM mailing lists are still going on , and a very recent and important issue has cropped , consider if i have mysql installed in my system and i am upgrading to a higher version , now if i want to rollback then i would have to rollback to the previous version of the database server but not affect the databases and the data , so that would be a tough asking .
well a solution proposed for this was that if rollback was developed as a plugin or something for YUM , then it would during package installation warn the user that he is making changes that cannot be rolled back or may be the rollback utility will create a list of applications that cannot be rolled back and thus be excluded during rollback .
the final suggestion was that it was not a very good idea to actually implement the rollback utility as a part of yum or as an external module, that was quite disheartening , but looking at the issues there seems no other go , or is there one ??

Yum rollback : Inconsistencies and new ideas !!  

Posted by Satish Eerpini in , ,

The posting of this idea for Gsoc has indeed brought out a lot of defects and inconsistencies in the idea and the proposed implementation , I have been having a good set of discussions with the GSoc mentors , my application doesn't seem to be going anywhere but the idea has been getting a lot of shaping and chiseling, ...... to say in short , there are a lot of shortcomings which were not identified before, and the main drawback was that i had not discussed these ideas with people from the YUM mailing lists, the recent discussions i had on the mailing lists show the following shortcomings, which seem to be very obvious now :

1) the utility would be very slow if it used YUM again for the rollback process also
2) i was suggested to use conventional backup and recovery methods, and try improving the backup storage methods and improve the speed eventually .
3) the system would be left very inconsistent , if the rollback process anywhere involved the use of commands such as 'rpm -e' or 'rpm -e --nodeps, and the second command is even more dangerous .
4) important : the yum log file does not take notice of downgraded changes , which are sometimes done with YUM
5) all the changes done to the system by RPM scripts may not be undone .

one of the changes to the implementation i had proposed was the usage of the systems file database , and the yum repository databases, but now even that seems to be a bad innovations , ..... one things strikes my mind again and again " Ideas are not important , implementation is ", that was actually said by Saifi .

YUM Rollback: Applied for Google SOC  

Posted by Satish Eerpini in , ,

So finally just a few hours before the closing date for the applications for GSoc , i have submitted my project Application for YUM Rollback Utility to The Fedora and Jboss project, truly speaking i am not actually very sure whether the applications are still accepted or if the time is already up. But people wish me all the best :-) !!

Linux ::: the next big thing ????  

Posted by Satish Eerpini

i recently was involved in the discussion , where we were talking about how Linux was going to be the next big thing, i didn't say that , someone else did , but i totally disagree, is Linux truly the next big thing ??
well , tell u what , i thing it has already begun , and other things are going down , and u know who i am talking about , BIG DADDY, ..... its time things changed for the good,....... but i think people don get along with Linux , because it is going to be the next big thing or it already is , ... but because, it is a passion , it is a culture, which many love and even I do !!!

An app for desgin planning !!  

Posted by Satish Eerpini in , , ,

this actually has been rolling in my mind for a long time now , how would it be to design an app, which would make it a click's work to plan for the design and coding of a project or a software application, which would produce text like what i have posted below for the 'diff'ing and'patch'ing application , and along with that also the deadlines, and sort of provide the functionality for adding new goals and decisions dynamically, ?
that would be great , i guess, a lot more thinking and discussion has to go in there, but it would be awesome and highly customizable !!!

small gui based app for "diff"ing and "patch"ing  

Posted by Satish Eerpini in ,

i have decided to write a small GUI based app for taking out the diff of two files and applying patches to files, well i don have any idea how the actual programs work , but i have decided to write new algos for them , and a little innovation with the GUI , ... the plan goes as follows, :

------> creation of own diff and patch algorithms
|___--> better diff algo proposal
# char wise diff if line length > 256 (set arbitrarily)
------> designing the GUI through manual programming ( no GLADE )
|___--> components of the GUI
# textarea for displaying the diff output
# input and output file selector
# file selector for patch operations
# selector between methods patch/diff
------> writing the appropriate configure scripts for the gui code, as
the autoscan may not always generate the appropriate scripts

well actually , i was inspired by meld, but actually wanted to try my hand at making one, because it would help my endeavor for Gtk and also brush up my C , so as i always say , lets get coding !!!

installing 2.6.24 kernel and wifi drivers on Ubuntu  

Posted by Satish Eerpini in , ,

some platform details first :

laptop : HP compaq nx 7400
Linux Distro : Ubuntu Gutsy Gibson (7.10)
Linux Kernel : 2.6.24
Wifi Card : Intel Pro wireless 3945 card

I compiled the kernel and created a kernel debian package using 'make-kpkg' , the list of commands i used are the following :

cd [kernel source directory]
make gconfig
make-kpkg --initrd binary

after the execution of the above commands is done , the debian packages for the kernel image, the headers, the documentation and the source are created in the parent directory of the linux kernel source directory . And after that it is simple installation to get the kernel working, ... but when i tried to compile and install the ipw3945 drivers from the source code, i had some really tough time, ......
later found out from a little googling that the wifi drivers to be used with the kernels version >=2.6.22 are the iwl3945 driver packages and not the ipw3945, ....... th iwl3945 drivers can be configured to be compiled into the kernel , check somewhere in the device drivers-->wireless-->iwlwifi section when you do a make gconfig, ......
but i had missed that out , now i had two options , recompile the kernel with the drivers supported or compile and install the drivers from the source code , well for the inherent lazyness i chose the second option , .... the set of wireless drivers included in the linux kernel are there for download at the following url , just download them and do a make and a make install, ....

now my wifi card works well, .... and to say the least ubuntu is awesome, i am gonna try out kernel version today , quite excited i am as always !!!

GUI programming with GTk+  

Posted by Satish Eerpini in ,

it was a long time ago that i had tried a simple hello world program from 'Beggining' Linux programming and failed badly , going by the difficulty i had in figuring out the flags to be given to gcc and and the directories and libs i had to explicitly include, but i hvae atlast found some success, well it is not a achievement as all i did was follow the same book and do what it said , but i feel relieved , it has been my dream to develop a GUI based software for managing 'small business' . Which can be easily configured and used for any sort of 'small ' range business, as all of them have the same basic backdrop. So finally i have started working with GtkObjects and GtkWidgets, so it should not be long before i am grinding out some really good stuff !!!
Everytime we compile a program using the Gtk+ packages, we have to include some metadata about the include directories containing the headers, the directories to find the libraries in and all such stuff, it is quite difficult to figure these out individually, and that was the problem i faced initially. The book gives a solution , it uses the command 'pkg-config -cflags -libs gtk+-2.0' to give the details of the cflags and the libraries ! So for compiling a program named 'helloworld.c' i would give the following command according to the book, :
# gcc helloworld.c -o helloworld `pkg-config -cflags -libs gtk+-2.0`
note the reverse quotes they substitute the ouput of pkg-config command , but THAT DOES NOT WORK, the man page for pkg-config shows that the options to be given to it are ' --cflags --libs' , i am not sure whether this has changed since the time the book was written , but what is given in the book doesn't work with me , so the correct thing would now be :
# gcc helloworld.c -o helloworld `pkg-config --cflags --libs gtk+-2.0`
that compiles and gives the output !!
pkg-config is a utility for displaying the meta-data for packages which are installed on the system , check out the man pages for more detailed info !!

done with initial goals : yumrollback !!  

Posted by Satish Eerpini in , ,

well i should say the past week has been tough , preparing for the exams and also working on this, . . and the good news is that i have almost achieved the initial goals for which this idea was proposed on the forums at , some of them are as simple as just uninstalling all the packages that were installed after a particular date using YUM . Well here goes a short summary of some of the work i have put in , the code consists of a set of perl scripts that parse the log file created by yum and then decide which are the packages that are to installed or uninstalled , all these perl scripts are managed by a single 'bash' shell script and this executes the rpm -e and the other commands used for manipulating the packages , and the main puprose for this idea was initially proposed was to undo the changes done through yum and i have achieved that , but at present the scirpts look kind of crude and lack a lot of valuable documentation i should be able to give a lot of modifications and may be implement t completely in C before i add any further functionalities, i need to take out some time for that though . And ya there is one more improvement , i have got the 'yumrollback' project approved on and one i am thorough with manipulating code using CVS, once i do this i willl putting up the present scripts up on the repository , so a lot of work ahead !!

its exam time !!  

Posted by Satish Eerpini in

well again back with the sick exams , and i am doing what i generally do the best during exams , ...... no guys its not preparing , it is sleeping , sleeping and sleeping all day , hey but i do give out time for filling up my stomach , ........
well the last useful thing i remember doing was writing a perl script to categorize the list of packages in /var/log/yum.log into installed and erased lists , and print them out to temporary files, well that was pretty cool stuff, but since then i have been sleeping !!!!

installing the linux kernel - simple steps  

Posted by Satish Eerpini in ,

here are a few simple steps for compiling the linux kernel and installing it !!
first download the source code of the kernel version you want to install from and extract the archive into the directory /usr/src/ , now after u have finished this run the following commands :
# cd /usr/src/[kernel source directory]
where kernel source directory is the one created on extracting the archive , ... now the next command is

# cp /boot/config-$(uname -r) ./config
this copies the configuration options for your current kernel to the one you are going to compile and install now , after this to make any further changes to the options execute the following command ,:
# make menuconfig
note : there are other options that can be used for configuring the kernel such as " make gconfig " which gives a GUI based configuration window, but they require extra library support , for example to use make gconfig u need to have installed the 'gnome software development ' libraries on your system , so it is better to use "make menuconfig " which almost always works !!!
after doing that u get a list of options , select or unselect the options which u want in your kernel or u don't want in your new kernel , after doing this save and exit , now u are done with configuring the kernel , next run the following command at the prompt :
# make
this compiles the source code and creates a compressed kernel image , once this is finished and u get back to the prompt , run the following command ,
# make modules_install
this installs the kernel modules that were created in the earlier step ,and then
# make install
this will install the kernel and add appropriate options to the GRUB configuration file , all you need to do after this is to reboot and boot into the new kernel !!!!

2.6.23 up and running !!  

Posted by Satish Eerpini in ,

just finished with installing the kernel 2.6.23 wifi drivers ( ipw3945) , well the actual kernel compilation took me some time , getting my wifi card working took me longer !! . The one reason i very musch wanted to install this kernel was the fact the native kernel provided with CenOS 5.1 does not have NTFS support and i was having a tough time installing the fuse kernel modules on that kernel , so decided to better shift to a kernel with native support , ..........
but then after doing that , i had to download the latest source for the ipw3945 driver and install it , now my wireless-tools package was a little old for the driver version , so had to upgrade that too from a Fedora 8 package , ....... now finally everything is going fine , tell u what , even the power manager which gave me a lot of problems in the 2.6.18 kernel is working great now !!!!

yum : rollback facility  

Posted by Satish Eerpini in ,

well actually this concept was first proposed to me by one of my seniors in the following post ,
in short yum is a software manager used in RPM based systems , if u are new to this world u can get more on yum at :
what we propose to do here is provide a functionality which rollbacks all the software modifications done by yum to a particular date following are two basic ideas for doing exactly that the first one was what i thought of and the second one a little more innovative was the one suggested by my friend :
1 . parse the contents of the yum.log created by yum and issue a recursive command "rpm -e [package name] --nodeps " , where the user enters a date to rollback to and the [package name] stands for all packages that were installed after that date , this will recursively remove all the files after that date without checking for dependencies , and i planned to do this all in a C program .
2. this is as far as i know a far better method, my firend Kalyan , suggested that, we could run a cron job every day which would store the output of " yum list grep installed " in a file in a standard directory created by the utility , and when the user entered a date for rollback , we would take a ' diff ' of the present output of " yum list grep installed " and the contents stored in the file for the rollback date ,and thus would use the same rpm -e command for the differing files .
isn't that great stuff ??
lets get onto coding that !!!

obj-m := $(TARGET)  

Posted by Satish Eerpini in ,

now was wondering what was that supposed to mean , when i first saw the makefile for the sample driver module i had written , and now after having some personal time with the kernel documentation , i have found out that this stands for object module goals , i had suspected this already ..... so that gives me the reason why my module was compiled by make even though i didn't give the goal for the specific target object !!!

coding style !  

Posted by Satish Eerpini in ,

ever taken time to go through the kernel documentation , well i have not till now , ..... and there i found this file which read as 'Coding Style ' and believe it is nothing like what i have read before , .... if u have kernel source code go into the source directory and look for a file 'coding style' in the Documentation directory or else here goes the file or rather a part of it ......... _______________________________________________________________________________________
Linux kernel coding style

This is a short document describing the preferred coding style for the
linux kernel. Coding style is very personal, and I won't _force_ my
views on anybody, but this is what goes for anything that I have to be
able to maintain, and I'd prefer it for most other things too. Please
at least consider the points made here.

First off, I'd suggest printing out a copy of the GNU coding standards,
and NOT read it. Burn them, it's a great symbolic gesture.

Anyway, here goes:

Chapter 1: Indentation

Tabs are 8 characters, and thus indentations are also 8 characters.
There are heretic movements that try to make indentations 4 (or even 2!)
characters deep, and that is akin to trying to define the value of PI to
be 3.

Rationale: The whole idea behind indentation is to clearly define where
a block of control starts and ends. Especially when you've been looking
at your screen for 20 straight hours, you'll find it a lot easier to see
how the indentation works if you have large indentations.

Now, some people will claim that having 8-character indentations makes
the code move too far to the right, and makes it hard to read on a
80-character terminal screen. The answer to that is that if you need
more than 3 levels of indentation, you're screwed anyway, and should fix
your program.

In short, 8-char indents make things easier to read, and have the added
benefit of warning you when you're nesting your functions too deep.
Heed that warning.

its too lengthy to be in full at this place , so get some time and read it from the kernel documentation !!!

hope u have a good time with that , ... more later.............

more on kbuild !!  

Posted by Satish Eerpini in ,

this seems to be getting more and more interesting , ... there is a hell lot of information on 'kbuild' and using the same for developing the modules form outside the kernel ,..... if u have kernel source code then the following is a good place to search ::

/[path to kernel source directory]/Documentation/kbuild/

check out all the text files in there !!

kbuild , that was the actual solution !  

Posted by Satish Eerpini in ,

the content i posted just before , that is on compiling kernel modules , i have tried going through the contents of the makefile and found the following solution , the technique used was something called kbuild, it provides a standard method for building external modules from the kernel environment ,.................
for the sample.c driver i wrote the contents of the corresponding makefile were :
default :
make -C /usr/src/kernels/$(shell uname -r)-i686/ SUBDIRS=$(PWD) modules
obj-m :=sample.o

clean :
-rm *.o *.ko *.mod.c


according to the kernel module programming guide this is a method provided by the 2.6x versions called
kbuild a little more intorduction at the following link

my ordeal with module.h - SOLUTIONS !!  

Posted by Satish Eerpini in ,

so here we go on with our story , the other day when i was working on CentOS i opened Kdevelop ( an IDE for programming ) , and started a new project under the 'C --> Kernel module ' and it gave me a sample kernel module , very similar to the one i had earlier written , i just executed the program ( in other words compiled it ) , it finished succesfully , i was confused at first , ...... then i looked at what was going on behind the curtains of Kdevelop , i jumped into the directory Kdevelop had created for the kernel module , btw make is a wondeerful utility which comes very handy when managing large projects ,...... and checked the 'Makefile '( the configuration file used by make ) that had been used to Kdevelop for compiling and installing the module , the makefile was using the includes from the kernel source directory and was starting a submake in that directory which was in turn compiling my module , ........ i will post the details of the 'Makefile' and some stuff on GNU 'make' soon , but i am finally happy i am able to compile my modules !!!!!

my ordeal with module.h !!  

Posted by Satish Eerpini in , ,

i have had a tough time compiling kernel modules and then inserting them , and the reason , for me the very troublesome /linux/module.h , the most important of header files required when you are writing a kernel module , you can't write a kernel module without including this file , .......
my problem started here when i was writing a kernel module , a very basic hello world module , on Fedora 8 , when i tried compiling it , it showed a lot of errors ( obviously though ..) , later i realised that there was no file /usr/include/linux/module.h , and after some research found out that the kernel headers RPM provided with Fedora 8 doesn't have this file , so even on installing the kernel headers the file was missing , and then with some help from the posts on the Twincling Discussion list ( twincling is an open-source community based in hyderabad ) , i downloaded the kernel source RPMs and recompiled the kernel using the Kernel-spec files for generating the Kernel installation and header RPMs again , but even after installing the self-compiled RPMs there was no use , .. . the file was still missing !!!
and in all this frustration i had already started to dislike Fedora due to the reason that it crashed so often , and i finally shifted to Debian Etch 4.0 , it was a relief i should say , and good news i could now find the module.h file in its place also , but still even with the headers present the module was not getting compiled , it still showed a lot of errors and most amazing one m or rather a part of it was :
" cannot determine processor type " .......
i will be posting the error list and other technical things on the forum soon , .....
Debian was good , but it was rather tough shifting from RPMs to the debian format and i was starting to miss 'ntsysv' badly, so i switched to CentOS 5.1 , it is great , almost similar to Fedora Core 6, ...... and as i had expected there was no /usr/include/linux/module.h so i gave up on module programming , ....... but this was not be the end , read on the " my ordeal with module.h : - SOLUTIONS ! " for the solution i found !!

lays, coke and debian - part 1 !!!  

Posted by Satish Eerpini in ,

finally i have installed debian , and if it doesn't sound routine i should
say i have mixed feelings about the whole thing, first of all i was very
happy that all my multimedia needs were satisfied with the installation
DVD itself , but there are many other issues, my external storage device
suddenly shows up problems , i will post a detailed review of my
installation a litlle later !!!!

a modification to 'make' ??  

Posted by Satish Eerpini in ,

i was thinking about the way make works , when i had this thought ,.....
could i make an entry in the makefile , which would indicate the directory
containing the project source code and running make from anywhere
with that file as the make file would compile and install binaries from
the project directory , so that user who downloads the source code of an
utility may not have to always go and run make from that particular
directory ,..... especially for a novice user ?
what say ? but i am not sure if such a functionality of 'make' already
exists or not !!!!

i have had enough of Fedora !!!  

Posted by Satish Eerpini in ,

i can't write a kernel module, there is no module.h, and later i found out that the kernel
headers rpm which comes with fedora doesn't have this header , ............. i was still hopeful , tried compiling the kernel back from the source rpm, but what i ended up finally with were nothing but the same old rpms provided in the Installation DVD, .........
the other day i decided to get 'into' GNOME, my gnome headers won't work , ........
and had enough of crashes , god knows when my nautilus is gonna crash , the day before i was in the middle of a seminar and my desktop was gone, ..........
i have decided to move on to something sturdier and faster , .... ordered Debian etch , .... but have yet to test it, ...... curse the Courier fellows my DVD's are yet to reach me :-) .........

i was recently coding a sample Qt based widget in C++ whic contained a button and gave an output to the terminal when ever it was clicked ,. .... and had to work with the header which had to be compiled using the MOC ( meta object compiler ) , which i suppose is for working out with the SLOTs and SIGNALs . .......
i then implemented the whole thing with make, that was pretty cool , and in a short time i was using make to do the installation too after my compilation ,..... ( though i wud suggest u first go through some shell scripting before doing this .. if u don wanna confuse yourself wih all the weird '['s and '@'s ...)................

now that is what is called 'making ' made easy !!!

finally on the blog, ....  

Posted by Satish Eerpini

Finally , i am blogging, after all the turmoil and thinking ,found some time with my very slow internet connetion ( never properly connected though), to create a blog , ....
so all of u people reading this, can expect some fine articles here, and may be some tech news, but only if my internet connection doesn't trouble me more .........

About Me

My photo

I am a Linux geek currently pursuing my bachelor's degree in computer science and engineering.