Wow! systemd. Fuck you Debian

DISCLAIMER: Explicit content!

Been using Debian for years, around 12 I think.. With Xfce desktop in the latest ones. I always had minor hardware incompatibilities, but I was happy.

Until the day that I performed that inevitable apt-get ‘dist-upgrade’ …..

  • hibernation stopped working. A previously painful story starting with hibernate script and tuxonice and ending with pm-utils and swsusp kernel hibernation, that had finally stabilized, now ended again in freezed pc after hibernation, double hibernation, worse that the old days.
  • usb automount stopped wroking. Every time now I had to sudo mount the flash disk, just like the early days of linux desktop
  • Logout actions stopped working. Now I had to poweroff ,restart, logoff from terminal, just like the old days.

Then I opened the pandora’s box. I read about the mess in Debian and I realized the big Red hat that has been weared upon all linux users’ heads. Then I subsided and said let’s do it the Red hat debian way and booted with systemd.

Oh, my, every now and then I discover how deep this cesspool goes, undemining linux for good. Peeking:

  • Old pal Crond (hear Vixie groaning) was retired for fucks shake, effectively stopping the system’s heart. Fortunately it was easy to enable it again.
  • The worst of all, what does an init replacement has to do with rsyslog. My flipped, that funny journald parade. Binary fucking logs in linux and optional. What the fuck. WHAT THE FUCK. I can not say anything more.
  • Hibernation almost worked, skipping the old pm-utils scripts that took care of housekeeping. But many times I resumed in black screen. After I removed xscreensaver it worked. OK I didn’t like that too, one less to go.
  • I suppose they will never end it, undermining, deprecating,looting.

You see, right now I can only speak with a general and common sense and I don’t have neither the mood nor the time to look into technical details. Because

  • systemd violates traditional design principles that have been making Unix what is is all these years (modular interchangeable components, keep it simple, insight into the inner workings, developer friendly environment, tools not policy). Well, these principles might apply less to the Desktop users. But linux is not all about Desktop. And I am wondering what will be the final outcome of this new approach in the core os components.
  • It is obvious that some big companies have in their targets to homogenize and eliminate other linux distributions, making strategic moves on the linux ecosystem, engendering clashes between developers, manipulating people that were contributing to abandon their projects and enforcing their software strategy over a rich and pluralistic linux world. Possibly $$ are flowing too.
  • these companies, with i don’t know what under the table ways, have managed to pass their policy in almost all the other linux distributions, despite the big disagreements, with Debian the most notable example.
  • systemd is like a cancer for linux, deviously expanding to more parts of the OS, inserting dependencies, denying well tested pieces of software, throwing in the garbage many contributions, designs, problems that have been solved in specific ways after many years of experience. It tends to make linux more stupid, eliminating parts of it’s history, created though years by many minds. Making it difficult to tailor the system to one’s needs, inserting bloatware and dependencies everywhere.
  • It is very likely that if this continues like this, linux will become a place for less opinions, with possibly bigger user base, but less developer base, more commercial. Since many developers are leaving because of disappointment and the new software is under documented and complex, the Company might at any time change ABIs, introduce couplings, deprecate libraries, interfaces, programs, environments, effectively driving linux (all dists ?) towards it’s own purpose. Many beta testers, less developers, less opinions, one truth.
  • I think that the problem with systemd is not technical at all. It’s totally political and philosophical. Linux has traditionally been polyphonic, open to new ideas, but most importantly public. And it rocks. This is what they want to change. They want consumer ready OSes for a consumerized reality, but not people hacking all around. And in the ere of NSA’s stealthy technologies we should expect everything. Less freedoms in the system, more obstacles in the development.

“No truth has the right to exist if it claims monopoly”

And what’s for sure is that people who see something wrong in systemd and the new ways that Linux is taking, should proceed united and decided to change Linux by protecting it’s ideas and assets.


A Javascript Finite State Machine (FSM)

state machine diagramJS-FSM is a state based FSM for Javascript. It could be used by various use cases, where an application need to keep track of a state and possibly perform actions at each transition.


  • State based FSM description. A state composed of a and an array of state transitions.
  • Transition from events. Multiple events define ORed events.
  • Transition from conditions. A condition is a key: value pair that should match on the condition object. Multiple key, value pairs defined ANDed conditions. Multiple conditions define ORed conditions
  • Each transition can optionally call actions or multiple actions. Actions can optionally have arguments or be members of this.
  • State machine could be mixed (as a mixin) to an existing object or a constructor’s prototype. A method for this is provided.
  • State machine can optionally log if a log method exists on this or is provided.
  • AMD and Node modules are supported.
  • Unit tests with QUnit.

More on the github project page

The implementation is inspired by a post on lamehacks.

Supervised (ana)cron jobs

PUPPET_EAT_MEOh, these remote backup jobs that sometimes fail, because of a temporary network failure, remote site not working etc, causing your weekly backups to be desynchronized. This and other scenarios might suffer because cron (and anacron) does not support successful execution verification, i.e. it does not check the command’s exit code to give another chance in case of failure. But that’s UNIX right ? KISS.
Continue reading

Install vendor’s mysql .. the debian (quick n dirty) way

Why ? It happen that one of my queries involving joining with a derived table was too slow. I am running the latest mysql-server version in debian testing (wheezy), version 5.5.30.
A Simplified example of the slow query

FROM table1
   SELECT d, r
   FROM table 2
) AS derived1

This kind of query, with one more derived tables and 3 more joins on a final result set of about 200.000 rows, took 80 secs. I didn’t like it too much.
Then using EXPLAIN mysql statement it seemed that the 2 derived tables didn’t have ANY indexes, while all the others had.

Damn! Now what ? A search on mysql’s site popped me to a discussion about subquerry materialization in mysql 5.6. In a few words, this a a new amazing feature of mysql 5.6 that between others, creates on the fly temporary tables with indexes for many categories of derived tables.

For your information, the same query on the same result set, after updating to mysql 5.6.11 took about 4 seconds. A x20 speedup, deserves the hustle to do the update.

Continue reading

Auto (un)mounting network shares (cifs/nfs)

frozen-pipe-2Even been in the position of a network share suddenly being dropped (e.g. you restart your switch, unplug your cable or just shutdown a pc) ? Then, did you see your file manager being stuck ? Especially thunar behaves really bad and I think nautilus too. Also did you try to ls on your bash prompt when your working directory is the mounted (now stale share)? If you know what I mean, then continue reading.
Continue reading

TuxOnIce: The Debian way

tuxTuxOnIce, is the one of the three main hibernation methods available to linux (swsusp, uswsusp, tuxonice). See this article for a brief history on linux hibernation and a comparison between the three. Hibernation, saves the computer state to hard disk and the machine is powered off. This can be very useful for various reasons:

  • save desktop setup time the next time you boot your computer, when you are in the middle of complex work
  • faster boot time – resume is usually faster than a normal boot
  • if you are working on laptop, save your work in a battery friendly way and continue later from the point you left it

For some reason the default vanilla kernel hibernation (save-to-disk) does not always work. At least this was my main motivation. One basic thing to notice is that  TuxOnIce (TOI) is not included in the vanilla kernel – for a reason that I am still missing. Another thing that is not obvious by visiting the official TOI website is that the project is alive -maybe with slow pace- and despite the fact that TOI authors do not update the main website with the latest patches. You can see the project status …. at git.

As the title implies the rest of this post is a tutorial to properly setup tuxonice for hibernation support on a Debian system (testing aka. codename “weezy”). Again for some reasons  Debian TOI package is kept in unstable.
Continue reading