Wednesday, January 27, 2010

Fedora 12 local update repository

Last night i try to create my local Fedora 12 update repository, rsync do it's job very well, i only need to issue this command

rsync -azuv --progress http://a-fedora-update-repo-server/ therepodir

get all update files for approximately 7.1GB, edit /etc/yum.repos.d/fedora-update.repo or /etc/yum.conf with

[updates]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
baseurl=http://localhost/fedorarepo/updates/$releasever/$basearch/
enabled=1
# disable GPG check
gpgcheck=0


The Fedora projects now using presto plugin, a mechanism which allow yum to download only the different part between current package version and it's new version called delta. After a delta package has been downloaded (.drpm extension) it must be rebuild with it's current package. Using presto of course save our bandwidth. Using presto may be confusing when work with a local repository, i suggest to disable this plugin in /etc/yum.conf.

Setting up apache and call yum check-update and damn, it's works. If you want to check only available update, just get all repodata/ directory from the repo server, put it to your local repo, check update with yum check-update and you can download all available update that yum told you.

Tuesday, January 26, 2010

GStreamer with Camera over IP

I need to write an application which work as GTO Terminal, it's simply to command the TCT, the job sounds "simple" but shit no. It has a IP Camera to display vehicle, help a toll worker to determine vehicle classification. My problem is the Camera seem not worked with GStreamer a multi-platform multimedia framework by the freedesktop.org. GNOME desktop are hardly use it as it's multimedia framework. The Camera sucks because it's seem to be used under Windows. Better than not working heh, a tricky hack is by periodically capture Camera's image then continuously update the image. But I got FPS pain for this hacks.

I'll update this post when some good progress done. that's means

To be continued...

Sunday, January 24, 2010

C gibberish

When reading a question in the Linux Kernel Mailing lists section linux-c-programming, someone ask about the means of this code

char (*pa())[4];

Someone else ask him to use cdcel a small utility that translate C syntax into human readable words. For example consider this code

int (*sched_callback) (pid_t, struct sched_param*);

this means

declare sched_callback as pointer to function (pid_t, pointer to struct sched_param) returning int

Here a short description about cdecl
Cdecl is a program which will turn English-like phrases such as "declare foo as array 5 of pointer to function returning int" into C declarations such as "int (*foo[5])()". It can also translate the C into the pseudo-English. And it handles typecasts, too. Plus C++. And in this version it has command line editing and history with the GNU readline library.

By the way, the answer of his question according to cdecl is

declare pa as function returning pointer to array 4 of char

Give it a try, it's perfect for deep understanding the C language.

http://www.cdecl.org/

Wednesday, January 06, 2010

2010

Okay, happy new year 2010, the best news in this new year is Anty my girlfriend comes to Jakarta, she start from Kendari at 31 December 2009 using Lionair Airplane, i bought her return tickets ;). She arrived at approximately 6.30pm, i was too late to pick her because i must attended a meeting at my office. Go to Rawamangun Bus Shelter at 11pm, there are no Airport Bus left, so i pick a cab to the Airport. Arrived there, pick her, and we were celebrating the 2010 New Year at that cab. We are enjoy our times. Anty back to Kendari at 4 January 2010, i also accompanied her to the Airport. See you later my girl.

Happy New Year 2009, best luck for this year!