Thursday, August 26, 2010

Systemd in Gentoo

A lot of folks are raving about the next generation in init systems (aka systemd), and how it's (almost certainly) going to be the default init system for Fedora 14 (paid article, subscribe to LWN to read! [or wait a week]). It also seems that OpenSuse will be moving to systemd sometime in the near future (don't take my word for this though), and Debian has at least considered it. It is also well-known that Ubuntu will not be using systemd for the foreseeable future.

So where is Gentoo in all this? Our current init system is baselayout-1 in the stable tree, and openrc in the ~arch tree. The maintainer-wanted bug for systemd has been quite active with users posting preliminary ebuilds for it. The bug itself currently has >30 folks CCed (including me), and 86 votes. So users are definitely very interested in seeing systemd in Gentoo. However, it will take a lot of work before systemd can enter portage even as a masked ebuild.

Even after systemd enters portage, it is extremely unlikely that it will become the default init system for reasons that are listed below. Some developers are strongly in favour of moving from baselayout-1 to systemd, while some think it's a pile of crap that Gentoo should stay far away from. Neither of these opinions is shared by the majority of Gentoo devs. (that includes me :-)

In all likelihood, the end result will be that openrc will finally go stable (replacing baselayout-1), and if any developers are willing to spend the massive amount of time and effort required to make systemd usable in Gentoo, systemd will become an optional init system, strongly recommended for desktops/laptops.

Now why can't we throw out baselayout-1 as well as openrc and just use systemd? I was going to make a full list of the reasons, but as I was making it, I realised that I don't know enough details about systemd's requirements, what all it provides, what parts of Baselayout would need to be rewritten, how much porting of the tree (and systemd) would be needed, etc. So instead of hand-waving, I'll just list "needs several volunteer developers" as the blocker for now :)

I'm tempted to list myself as a future volunteer, but I won't do such a thing yet. Rest assured that if I do end up working on this, I'll be sure to blog about it. Although it is probably just a matter of "time" ;)

Tuesday, April 20, 2010

Managing alternate browsers

For a while now, I've battled with the many problems of having too many tabs open in Firefox. One of them is faced when I want to view a link I saw on IRC, IM, Twitter, etc, and Firefox isn't running.

I click on the link; and wait. And wait. And wait. And finally Firefox pops up! But it's unusable because it's too busy loading 3 windows and 200 tabs. I just want to view this one link, I don't want the other 200 links to be opened!

For this use-case, I usually keep alternate browsers; Epiphany and/or Chromium. So I copy the link, open one of the browsers that won't open a bazillion tabs, and paste the link there. This is obviously somewhat annoying to do; and causes frustration when I forget that I don't have Firefox running and accidentally click on a link. *click* [wait] "huh? OH SHI-" *computer slows down to a crawl*

The final straw was when I realised that some clients don't let me right-click -> copy links. So I wrote a small script to make the right decision for me whenever I click on a link so I can stop worrying about behemoth-launching. Now I've set the script as my "default browser" so that all links are sent straight to it, and the proper action is taken.

What it does; is it checks if one of your browsers (listed in $ORDER in the script) is already open, and opens the link in that. For instance; if Firefox is already open, you're probably using it; and you want the link to open in that. If Firefox is not, but Epiphany is already open, best to open it in Epiphany; etc.

If no browsers are open; it tries to open the link in one of the lightweight "alternate" browsers that you have (listed in $SPAWN in the script).

Set the script as your default browser, and it shall feed hungry kittens. It certainly did so for me ;)

Monday, March 22, 2010

Freenode Fails.

So, if you don't know what freenode is, you can stop reading right now; you won't find it interesting at all.

Out of the rest of you, those who use freenode regularly must've been around when for 2-3 days, we all faced massive netsplits due to javascript spam. Funnily enough, the solution for that problem was bloody easy:

iptables -m u32 --u32 0x0>>0x16&0x3c@0xc>>0x1a&0x3c@0x0=0x504f5354 -m recent --set --name lastmeasure --rsource -j DROP

Yes. That's it, and freenode couldn't do it for unspecified reasons. They kept telling us "Oh, we'll be moving to ircd-seven soon, and it'll be fixed then". I bought it. Everyone did. And true, no more spam and netsplits! For now.

But of course, the total failure level didn't improve at all. Now, people who don't auto-identify have a life of pain up their hands. Here's what happens when you identify after you've joined a channel:

* NICK (~HOSTNAME@IP ADDRESS) has quit: Changing host
* NICK (~HOSTNAME@CLOAK) has joined #CHANNEL

Yeah... your ip address gets displayed to everyone in the channel.

No, I lied, it doesn't get displayed to everyone. Everyone except you can see it. So you don't even know your ip address is getting displayed to everyone and quite possibly being logged in the channel. NOW WHOSE HARE-BRAINED IDEA WAS THAT?

Their "solution" for this? "Please use auto-identify, and no, we don't care about the reasons behind you not auto-identifying in the first place."

Oh, but there's more. If you have nick protection turned on, if you don't identify within 30 secs, your nick gets changed to GuestXXXX right? And the nick you were using gets "protected" right? With the move to ircd-seven, someone had to bright idea to make it "protected" against use by ANYONE including YOU. So you're left nickless unless you do a Quick Draw McGraw after logging in.

Dudes. WTF?

And don't give me the bullshit about "It's a free service, you get what you paid for". Other free networks get this right without getting funding from Canonical and hardware from Osuosl.

Wednesday, March 10, 2010

Random observations about Communication

So, this post is not really technical, but I'm posting it to the Gentoo planet anyway because it applies to the social part of Gentoo. I see a lot of people making the same mistakes that I once did, or saw people make while interacting socially within Gentoo. This post is not in response to someone in particular; more like in response to the "feeling" I get.

Communication Problems (technical): when communicating over inefficient media such as email or IRC, keep in mind that the other person has no way of knowing what you meant, or felt, when you said something. Due to this, it is easy to cause insult, and even easier to be misunderstood or misquoted. No one knows your mood when you type on the net.
Solution: Make ample usage of smileys; make it clear what you mean, in as few words as reasonable. When on the receiving end, give the other person the benefit of doubt. It's quite easy to misunderstand what someone said. When in doubt, re-read and re-interpret.

Communication Problems (social): I've personally found that the root cause of 110% of arguments that escalate is a severe and dire lack of proper and clear communication. People are just unable to express what they mean, what they want, and what they are thinking in clear, easy-to-understand terms. Part of the problem is that "clear, easy-to-understand terms" vary among people. The other part is that different people think in different ways, and English is usually not their native language.
Solution: To be able to communicate effectively with someone, you need to understand how they think first. This is obviously too much work to do with everyone you meet, but if you're going to be working with or around someone; take the time out to empathize with their world-view. If you want to convince someone of your opinion, put yourself in their shoes and see it through their eyes.

Communication Problems (length): This is one problem that seems to plague people a lot, and often they don't even know it. Writing 4 paragraphs when 1 would've sufficed is a bigger problem than just writing one cryptic word. A lot of analogies are coming to my mind right now to explain this, but I'm going to go with this: 'tl;dr'.
Solution: When you write something, keep in mind that time is a precious commodity, and by writing a long mail/response, you will waste their time if they choose to read it. And hence, most people will not read it. If you want them to read it; spend some of your time and make it easier to read. Make it short.

Communication Problems (rage): E-mails written and IRC conversations conducted in anger. You read an email, see someone make a commit, or just something they said on IRC; and you go into RAGE mode. It makes you furious. You don't understand how the guy can be so bloody stupid. Maybe it's the last frickin' straw. You flip off and start shouting. The other side may be oblivious to your distress; or worse, they flip off as well. When the dust settles, pandas and kittens make sad faces at your blood pressure and the decisions you made.
Solution I've been on both the rage-side and the rage-causing side, and I can tell you this: It doesn't help anyone. If you get angry at someone on the internet, stop. Stop and get off the computer. Come back later. If you cause someone to get angry, pause. Pause and figure out why. Think to yourself; maybe you're wrong, maybe they misunderstood you, maybe they had a bad day. But first off, calm the other guy down. Stop arguing, and take a walk. Come back later and try to reconcile your differences. Fact: 149% of arguments lead to burnout and heart disease.

Now, I don't expect people to keep all this in mind all the time. Hell, I'm writing this now, but I know I'll never be able to stick to this 100%. The point I'm trying to make is that You're Fallible. Everyone is. Just keep that in mind all the time, and just remember the above things vaguely (you can bookmark it for reference!). I'm sure we can all do better than we're doing right now.

Monday, February 22, 2010

Gentoo Mozilla Team meeting decisions

On Feb 21st, Sunday, the Gentoo Mozilla Team had an informal meeting to discuss some of the recent changes which have a large-ish impact on users. Below is a list of them and the decisions that were taken. After the list is a description of each decision.

SQLite with Firefox: Firefox will use the bundled sqlite by default. Users can select the system-wide sqlite by setting USE=system-sqlite.

Ebuilds for Extensions in-tree: The Gentoo Mozilla team will not ship ebuilds for extensions such as noscript and weave anymore. We will only have ebuilds for extensions which are linux-specific and compiled; such as enigmail.

Firefox and Thunderbird Alphas and Betas: In addition to the overlay, we are going to start placing alphas and betas of Firefox and Thunderbird in the tree with a package.mask and a big fat ewarn during installation. Adventurous users are encouraged try them out but report bugs only in the Gentoo bugzilla. Do not go to upstream unless we ask you.

NOTE: These ebuilds will not have language packs since upstream does not release packs for these.

NSS/NSPR Changes: This involves various cleanups to the ebuild, and moving of the libraries from ${libdir}/{nss/nspr} to ${libdir} and removal of the /etc/env.d/08{nss,nspr} LDPATH entries alongwith corresponding changes in firefox-bin and thunderbird-bin launchers. These changes should be completely transparent to the user.

Revival of #gentoo-moz @ FreeNode: The mozilla team has expanded in recent times, and with that we have decided to revive the ages-old #gentoo-moz irc channel. Users are welcome to idle, discuss, and ask for help on that channel. Come on over!


Why we made these decisions:

SQLite with Firefox: We've done flip-flops on using the system-installed sqlite for for XULRunner and Firefox. Initially, we used the internal one, but folks reported bugs about that (we prefer not to use bundled libraries), so we switched to the system sqlite.

Then with the next version of Firefox, people started reporting major bugs with using the system sqlite and we temporarily disabled it. Once the problems were resolved, we added USE=+sqlite to use the system-installed sqlite by default.

Recently, another issue cropped up: upstream mozilla was getting bug reports that the sqlite db was insecure, and trivial tools like grep could be used to get (private) deleted information from it. They traced that to distros using the system sqlite which didn't have support for SQLITE_SECURE_DELETE. They then made that a mandatory configure check with 3.6 (and we added a dep on the system sqlite for it). Soon, we started getting bug reports from people who did not want that enabled system-wide (since it zeroes out the data when deleting it, which has a performance penalty). Upstream made it clear that they would not make the check optional.

In the end, we decided to make firefox use the internal sqlite by default, and allow the user to select the system installed sqlite via USE=sytem-sqlite if they are ok with secure-delete being on system-wide.

Ebuilds for Extensions in-tree: We found that a number of extensions were being released at a very swift rate which meant two things:

  1. Bumping ebuilds was very tedious, which led to them becoming stale very quickly
  2. Judging whether an ebuild can go stable was not possible, and most often the extension developers just want the users to use the latest release.
This offset the benefit of users being able to install extensions system-wide and have it managed by portage. Users can still manually install and manage system-wide extensions if they so wish. They are also free to copy the old ebuilds to their local overlays and use them if they wish.

Firefox and Thunderbird Alphas and Betas: Mozilla Upstream has been complaining that their betas and release candidates don't get much testing on Linux since all the distros ship only the final releases. This means that bugs are caught very late, and aren't fixed till the next major version. To help with this, we've decided to revise our release strategy and give a bit more visibility to our alphas and betas (which are generally kept in the overlay) by pushing them to the tree under package.mask, and with large ewarns all over the place. Users are strongly advised NOT to report bugs with these directly to upstream. Please use the Gentoo Bugzilla.

NSS/NSPR Changes: the libraries for nss and nspr were installed in a prefix due to collisions with other packages (libssl.a for instance). Recently, Google decided to use portage for cross-compiling and managing ChromeOS. This combined with some bugs reported with NSS/NSPR led to some investigation, and a voluntary review of the ebuilds.

This led to a number of changes which included disabling static libraries for NSS and NSPR, and moving the rest to ${libdir}. Further details on the changes and their "why" are listed on the review bugs linked above.

Sunday, February 21, 2010

The Gift of Attention

I cannot stress this enough. When someone asks you to listen, listen to them. When they ask you to listen to their favourite song, or to a song they think is beautiful, listen to them and listen to it. When they show you something that moves them, look at it and try to see how it moved them. They find it special, and are sharing it with you because they find something in you that is special. Don't squander that special gift away. Spend a little time. You'll understand them better.

Friday, February 19, 2010

Haruki Murakami

When I was a kid, in 2nd grade, my dad was posted in the Himalayas. Families weren't allowed there, so I used to live with my mother at her mother's house. Right above the bed where I used to sleep with my grandmother, was this strange painting of a house. The canvas was a dark cloth, and the painting was made of light-grey outlines of a hill with a house on it. It had a slanting roof and a chimney with a hand coming out of it. I used to stare at this terrifying picture every night while going to sleep. It was much later that I realised it was actually smoke that was coming out of the chimney. Smoke that looked very convincingly like a hand.

Whenever I think of this picture, feelings of horror are mixed with the beautiful memories of living with my grandmother. Listening to the watchman making his rounds around the houses, listening to tales spun by my grandma, peeking outside the vertical-tilting window to see the moonlit houses. That green Russian folktales book I had, and Baba-Yaga. Chasing dust-mites in beams of light, playing with a 1991 calendar; with faint memories of something big going on. The house in the painting itself must have featured in many of my dreams and my nightmares. All these memories mix and mingle to evoke feelings from every corner of my brain. I am left with tears in my eyes, heaviness in my heart, and regret in my mind that all of it is now gone.

And somehow, everytime I finish a short story by Haruki Murakami; all these feelings rush up to me. Whether the story had a happy ending, or challenged my stomach; the nostalgia, the beauty, the love, all rushes up to me. Each story reminds me of my love for thunderstorms. For stormy nights, that are spent alone. Loneliness that I cannot bear, but the feeling of which I love.

I remember so much that I just want to lose myself in my memories.

That is Haruki Murakami for me.

Wednesday, February 17, 2010

A New Haven for Journalists

I'd always imagined that change in human society is conservative by default. That radical change can only happen under radical circumstances. Unfortunately, I've also seen that one should never underestimate human idiocy (see republican senators in the US).

In the middle of enormously counter-productive responses to the Financial Crisis that overwhelmed economies all over the world, we have Iceland. Iceland was probably the worst-hit in the chaos. Bankruptcy for the citizens, rioting in the streets; a little better than the worst that can happen.

These extreme circumstances, along with the role WikiLeaks played in uncovering the reasons for the hard fall the Iceland economy took have now led to the government proposing legislation which will make it a safe haven for free speech and journalism. Go ahead and read the articles linked in this blog post.

I'm no journalist, but I know the importance of keeping whistle-blowers safe.

EDIT: Pointed out by sid0; FAQ about the legislation. A must-read.

Tuesday, February 9, 2010

Infibeam Rocks.

Some of you who follow me on twitter might remember something I tweeted about on Feb 6th:

Crap. Bought the wrong book on Infibeam and there's no way to cancel after making payment. Worse, I already have this book x-( #fail

This is essentially what happens when you buy stuff on the Internet at 5am after not sleeping all night preparing for an exam. I selected the (wrong) book, paid for it using Paypal, and soon afterwards, realised that I wanted the second part of this book (Foundation Analysis). Checked their FAQ to find to my dismay that they don't support cancellation of orders after payment has been made.

Needless to say, I'm a student, and students are poor(er). So I was sitting around semi-depressed wondering how to sell the book off at a minimal cost loss after I get it. On a whim, I decided to tweet about it (I generally don't tweet much; mostly passive reading).

After giving my exam, I noticed two missed calls on my phone from a strange number. I decided to wait for them (whoever they were) to call me again. A couple of hours later, I get another phone call; but this time it gets cut before I can pick it up. A few minutes later I get the following email:

Dear Nirbheek Chauhan ,

Order Id : [REMOVED]

Title : [REMOVED BOOK TITLE]

We have received your request for cancellation of above order through twitter.com. So we are offering you your ordered amount as prepaid credit to your Infibeam account which can be used for next purchase.

Please allow us for the same. So we can credit your account accordingly.

We also tried to reach you through given no. [REMOVED MOBILE NO.], but could not get response.

Thank you for shopping with us! You can contact us anytime using http://www.infibeam.com/ContactUs.action


Sincerely,

Infibeam.com Customer Service
Fresh Way to Buy, Sell and Rent

My reaction -- :O :D :O :D

Yesterday evening, they cancelled my order and refunded the amount I had paid as prepaid-credit which I can now use to buy the other book that I wanted to buy!

I don't know about you, but I'm very impressed by their customer service. The fact that they took the initiative to monitor twitter for tweets mentioning "Infibeam" for any problems that users face is a strong indication that they aren't just some random E-Store. They have definitely made permanent customer out of me!

On a related note, I've found that their book prices are usually less than or equal to those on flipkart.com . Another reason to use them ;)

Friday, January 22, 2010

What The Bloody--

So I drive back home, open reddit, and what do I see?

US Supreme Court ruling comes down - Corporations are people with free speech and have the protected right to bribe politicians

The story currently has 5,200 upvotes, and 2,744 comments.

MSNBC says:

In a landmark ruling, the U.S. Supreme Court on Thursday struck down laws that banned corporations from using their own money to support or oppose candidates for public office.

Nice, let's go have some cake.

Folks, this is another example of a place where the concept of "Free Speech" is not applicable.

"Free Speech"

No, it does not mean you can say whatever you want, whenever you want, to whoever you want. Nor does it mean that everyone has to allow you to do any of that.

Free speech means that your (democratic, republic, or whatever) government should not restrict your right to criticize them, organisations, people, practices, or society in general.

Things not covered in Free Speech (open for debate):
  • Slander
  • What rules you impose in your house
  • What companies impose on employees
  • What comments you allow on your blog
  • etc.
So, the next time someone posts something about Free Speech on their blog, but has moderation and/or deletes posts; think twice before calling them a hypocrite.

No, I'm not going to link to the place where I saw this happen; I don't have an axe to grind.

EDIT: I just noticed I had comments which I hadn't moderated yet (moderation for posts older than X days); sorry about that folks. I seem to not get mail for that thing. Relevant Lesson: Don't attribute to malice which can be attributed to stupidity.