Thibauld - Imagination and Execution -

15Feb/100

How to exclude multiple directories while creating an archive with tar

RT @thibauld How to exclude multiple directories while creating an archive with tar

A very quick post again as I've just spent way too much time to find out how to use the --exclude option of tar. All I wanted is tar to omit a few subdirectories while creating an archive of a directory. I was surprised to see how much tar is picky about his --exclude option: if you don't use the exact syntax, it won't work and, unfortunately, the exact syntax is not so easy to figure out from the man page.

So here is the exact syntax you should use if you want to exclude multiples directories with tar:

tar cvfz myproject.tgz --exclude='path/dir_to_exclude1' --exclude='path/dir_to_exclude2' myproject

Hope it will save you some time!

15Feb/100

Moblin and Maemo projects are merging

RT @thibauld Moblin and Maemo projects are merging

Wow, just received this email from the Moblin mailing list. It announces the merge between Moblin (Intel initiated project) and Maemo (Nokia initiated project) :

Hi Everyone

I'm sure you've heard the news: Moblin and maemo are merging! We are taking the best pieces from these two open source projects and are creating the MeeGo software platform. Both teams have worked for a long time to support the needs of the mobile user experience - and MeeGo will make this even better. We want it to be fun, focused, flexible, technically challenging and ultimately, something that can change the world.

We all use mobile devices every day. The power and capability of handhelds has reached astounding levels - netbooks have been a runaway success - and connected TVs, tablets, in-vehicle infotainment, and media phones are fast growing new markets for devices with unheard of performance. Our goal is to develop the best software to go with those devices. The teams behind maemo and Moblin have plenty of experience and even more ideas on how to make things better - and together we will create something special.

So what does this mean for Moblin and its community? It's a huge opportunity. There are some changes (and those are always scary), but I think they are all for the better. Things will quickly shift to the new site, but from a technology point of view, migrations should be smooth. Especially if you are an application developer; everything you have done so far should continue to work - and with Qt and its development environment there are even more and easier options available to develop new and exciting apps for MeeGo.

The MeeGo website is still evolving - you'll run into a few "coming soon" pages as we pull all the content together and get things ready for our first project release in the second quarter. But there's already a lot to see - and a community to join! Please take a look - and come back often as we approach that first release.

We really want to hear from you. Be in on IRC, on our developer mailing list, or through bugzilla. MeeGo is an open project and it will be successful through its developer community. It's my personal goal to make sure that we can all together be successful. And have fun.

I invite you to join us at meego.com.

Imad Sousou

Director of Intel's Open Source Technology Center
(and now also co-chair of the MeeGo steering group)

From a business standpoint, it does make a lot of sense to merge these 2 projects, now let's see if the merge can be handled smoothly technically speaking... might not be as easy as it sounds.

5Feb/100

Configuring iptables to allow internet surfing while blocking all unsolicited incoming connexions

RT @thibauld Configuring iptables to allow internet surfing while blocking all unsolicited incoming connexions

I'm so used to connect to the Internet through network masquerading (NAT) that I was really surprised today when I realised that my laptop was actually receiving a lot of unsollicited connexions attempts from random external machines. Then I remembered that, by default, a freebox gives you a public ip !

It could not have been an issue if I was not doing web development on my laptop using a local (badly configured) webserver which happened to be worldwide accessible... oOops :)

A few iptables commands later, everything was secured :

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -s 127.0.0.1 -j ACCEPT

The above lines configure iptables (the firewall) to drop every incoming connexions except the ones corresponding to a connexion I established with a remote server. Indeed, the server you're connecting to needs to be able to send information back to your machine in order for you to get it (blocking all incoming traffic is the same as unplugging the network connection).

I thought it might be useful to some of you too...