Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Booting with runit

The first tu­to­ri­al com­ing from my cus­tom-dis­tro ex­per­i­ments. Since it's a good idea to start at the be­gin­ning, here is... Boot­ing with runit.

Linux: a not-unix-like OS.

Well, I am still ex­per­i­ment­ing with my con­cep­t-dis­tro.

I am now up to a run­ning PyQt us­ing uClibc, which I thought un­like­ly ;-)

I com­plete­ly re­moved all the sysv init stuff, and re­placed it with runit, which has an in­ter­est­ing ef­fec­t:

It boots to a graph­i­cal lo­gin in about 15 sec­ond­s. In­side qe­mu. In a 900Mhz duron. In­clud­ing ker­nel load­ing.

Of course the trick is that you have the lo­gin while stuff is still load­ing, but I am work­ing on that, too.

Since us­ing runit it's pret­ty sim­ple to get a over­view of where the boot­ing process is (ser­vices have de­pen­den­cies, they sim­ply get start­ed in or­der, and in par­al­lel), I will hack a sys­tem-wide ksplash-­like thing on a side of the xdm (prob­a­bly will end up writ­ing my own what­everd­m).

Think of it as Fe­do­ra's rhg­b, on­ly you can lo­gin in­stead of get­ting bored.

I al­so switched to a root-free sys­tem Ubun­tu style. Not de­cid­ed yet on it, but it's not hard to do (or use).

Next step: hack Knop­pix HW-de­tec­tion script (or rather re­write them in a re­al lan­guage).

I un­der­stand why there are 743 Lin­ux dis­tros. It's quite a lot of fun to hack one to­geth­er.

Oh, and it needs a name. It's not go­ing to be use­ful for any­one, it's just a per­son­al toy, but it needs one.

Come on, Plan­etkde guys, throw me names for a non-u­nix like lin­ux, if you dare ;-)

Source-based distributions, the good side.

I am no fan of source-based dis­tri­bu­tion­s. I think that for most prac­ti­cal pur­pos­es, a dis­tri­bu­tion where in­stalling KDE takes over a day (I own a low­ly Duron as my fast com­put­er) is use­less.

How­ev­er, they are good for one par­tic­u­lar niche.

Cus­tom dis­tri­bu­tion­s. Weird dis­tri­bu­tion­s. Per­son­al dis­tri­bu­tion­s.

I have sev­er­al com­put­er­s. Most of them too slow and small.

As I was con­sid­er­ing re­in­stalling Lin­ux on my Li­bret­to for fun, I looked at what was in­stalled in it, and de­cid­ed that re­al­ly, 90% of it was of no use what­so­ev­er.

The prob­lem was, since it had De­bian in­stalled, it has a rather wide net­work of de­pen­den­cies that sim­ply could not be done with­out.

On a reg­u­lar com­put­er, that's not an is­sue, but in this tiny workhorse, with 16MB of RAM and a 800MB HD, it makes a lot of dif­fer­ence. The small­est I could get De­bian to be, and still have net­work, PCM­CIA and X11, was about 250M­B.

And the per­for­mance was not awe­some, ei­ther (but not ter­ri­ble).

So, what would hap­pen if in­stead of a reg­u­lar dis­tri­bu­tion it had some­thing like this:

  • uClibc in­­stead of glibc

  • runit in­­stead of SYSVinit

  • drop­bear in­­stead of OpenSSH

  • X built as kdrive (former­­ly tinyX)

  • python/qt (or maybe python/fltk) for ba­sic ad­min tools

And so on. Ba­si­cal­ly re­jig­ger the whole soft­ware se­lec­tion slant­ing it to­wards the small side, and drop­ping a bazil­lion non-­fun­da­men­tal de­pen­den­cies along the way.

Well, it can be done. It's just that it's a heck of a lot of work. But here, a source-based dis­tri­bu­tion gives you a head­start.

For ex­am­ple, I de­cid­ed to start from ucrux, a uClibc-based port of Crux. Since the na­tive toolchain in ucrux is uClibc, I don't have to wor­ry much about a whole class of mess that hap­pens when you build uClibc-based bi­na­ries on a glibc-based sys­tem (it's prac­ti­cal­ly cross-­com­pil­ing).

Qe­mu lets me in­stall ucrux and work on it some­what faster than on the tar­get P75 (if I could make KQE­mu work I'd be hap­pi­est).

Since crux's soft­ware pack­ag­ing mech­a­nism is sim­plic­i­ty it­self (a shell script that in­stalls to a fake root), al­though it's se­vere­ly un­der­pow­ered (no de­pen­den­cies), I can start from ucrux, hack the build of one pack­age at a time, then put ev­ery­thing on a CD very quick­ly.

So, if you want to hack your own dis­tri­bu­tion, Crux (or some oth­er sim­i­lar kit) is quite a nice thing.

For gen­er­al use... well, my re­quire­ments start at ap­t-get or equiv­a­lent ;-)

Now, if on­ly Tiny­CC worked for more pro­gram­s, that P75 would be a pock­et de­vel­op­ment pow­er­house!

Developer-centric and proud of it

Ok, as ev­ery­one and its goat in the free soft­ware/open source/pet-­keep­ing com­mu­ni­ties al­ready has read, Eu­ge­nia [1] has been up to her old an­tic­s.

The lat­est shape of her dis­con­tent is, de­vel­op­ers of GNOME (and late­ly of KDE, too [2]) are de­vel­op­er-­cen­tric in­stead of user-­cen­tric.

Ba­si­cal­ly, the gist is that de­vel­op­ers have a re­spon­s­abil­i­ty to keep in mind their users de­sires, and fol­low their wish­es when de­cid­ing what way their projects should go. That these "peo­ple" are de­vel­op­ing said soft­ware in their free time and giv­ing it away is unim­por­tan­t, she says, the user's voice shall be heard. [3]

Well, I am not a de­vel­op­er nowa­days, at least not of shared soft­ware [4] but I still re­call when I was one. And I am cranky. And I have lit­tle care about what peo­ple think about me. So...

Let me ex­press my feel­ings when I read her ed­i­to­ri­al (and an­oth­er one called the rid­dle of the sphinx, I think [5] ).


I have read, in the ed­i­to­ri­als and (spe­cial­ly) the clue­less talk­back­s, the fol­low­ing:

  • If you are go­ing to do a half-assed job, don't put it on the in­­ter­net

Well, dude, pre­tend it's not there. That works for me when I con­sid­er ja­pa­nese ten­ta­cle porn, it can work for you and a mail clien­t. If you pre­tend it's not there, it won't both­er you. Then those who tol­er­ate half-assed jobs can live a life of jol­ly ful­fill­men­t.

  • The us­er has in­­vest­ed ef­­fort on learn­ing and us­ing the pro­­gram, so the de­vel­op­er owes him some­thing.

I sup­pose the so­lu­tion for that is not al­low­ing peo­ple to use the soft­ware un­less they ac­cept that it is pro­vid­ed as-is... oh, wait­... that's al­ready true. Nev­er mind.

  • That since GNOME (or KDE) claim to pro­­vide use­­ful and user-friend­­ly soft­­ware, by fail­ing to fol­low the user's lead we are en­­gag­ing in some sort of false ad­ver­tis­ing.

Co­ca Co­la promised me "Ev­ery­thing is bet­ter with Co­ca Co­la". Then I tried pour­ing a can in­to my com­put­er, hop­ing it would make it faster, or some­how bet­ter in some way. I have to tell you, those bas­tards won't know what hit'em!

  • Post­ing bug de­scrip­­tions in bugzil­la is too much work.

Well, try fix­ing one some­day, mis­sy! That's WAY hard­er. You are say­ing that us­ing a lit­tle en­er­gy is too much work, to peo­ple who spend hun­dred times more as a con­se­quence.

It's like com­plain­ing that plant­ing seeds is too much work, when you lat­er get a har­vest. Well, if you think, so, drop agri­cul­ture.

  • That the de­vel­op­­ment is some­how skewed to­wards de­vel­op­er­s, not user­s.

Well, to that I have many an­swer­s. Let me share a few.

  1. So? You say that as if it's a bad thing.

  2. Well, that's good for the de­vel­op­er­s.

  3. What mag­ic po­­tion did I have to drink to be­­come a de­vel­op­er? De­vel­op­ers are just users who are way too in­­­volved in the pro­jec­t.

  4. As a lawyer once said, since phoeni­­cians in­­ven­t­ed mon­ey, the ques­­tion "what can I do for you?" has a sin­­gle an­swer. Well, think about it.

  5. No, it is­n't.

Fi­nal­ly, let me tell you the de­press­ing part. In a com­men­t, Eu­ge­nia said she dropped GNOME for Win­dow­Mak­er. Let me show you what she said:

RE: So Eu­ge­nia re­fus­es to use GNOME? By Eu­ge­nia (IP: ---.os­news.­com) - Post­ed on 2005-03-10 20:32:31

I moved back to Win­dow­Mak­er, yes. At least I don't ex­pect any­thing more from it, be­cause it is not a prom­i­nent en­vi­ron­ment and I know it's a much small­er project with few­er re­spon­si­bil­i­ties.

Talk about throw­ing the ba­by away with the bath wa­ter. She is sim­ply say­ing that she choses to use worse soft­ware (ac­cord­ing to her need­s), be­cause... well, I have no idea why.

Be­cause she has low-e­nough ex­pec­ta­tions about Win­dow­Mak­er that she won't be dis­ap­point­ed? That road leads to dat­ing ex-­con­vict­s, you know.

In the end, well, I have no idea what peo­ple think. I sim­ply don't un­der­stand the world. I mean, I in­tense­ly dis­like GNOME, and even a few peo­ple in­volved in it, but it's just code. And code that is worth mil­lions of dol­lars. And it's there, dudes! It's like find­ing a stack of bul­lion in your doorstep, and not on­ly that, but on ev­ery doorstep [6].

Why don't peo­ple sim­ply look up and thank the in­vis­i­ble dwarves who must have toiled in dark­ness for years in or­der to rip it off the earth? [7]

No, what we get in­stead is a bunch of jew­el­ers ask­ing for fin­er crafts­man­ship in the good­s, or else they are just gonna buy some bul­lion from some­one else.

You know what? De­vel­op­er-­cen­tric is good. In an ab­so­lute, ob­jec­tive, mea­sur­able way. Be­cause it's de­vel­op­er-­cen­tric you get de­vel­op­er­s. de­vel­op­ers make code. Code brings user­s.

If all you at­tract are users be­cause be­ing a de­vel­op­er is a pain the but­t, you have no de­vel­op­er­s, thus no code, thus no user­s.

What do you think is bet­ter for users in the long ter­m?

So, say it loud, I'm de­vel­op­er-­cen­tric and I'm proud. At least this old hack is.

[1] of OS­NEWS.­COM fame. You de­cide if that's a good or bad thing.

[2] A new post in her site. I sup­pose she has to feed the hit-­mon­ster.

[3] That be­ing pub­lished in a big site that lacks thread­ed replies in 2005, and a wom­an who, when she gets a com­plain about it, said she was do­ing it in her spare time, so stop both­er­ing her. No, I don't get it ei­ther.

[4] Is­n't that much nicer-­sound­ing than open source and much less an­noy­ing and pompous than free soft­ware?

[5] Which is, I think, #4 in the list of "ten ti­tles you should nev­er use in an opin­ion piece". #1 is What I did last sum­mer, but I di­gress...

[6] And by some eco­nom­ic mir­a­cle, it has­n't caused yet a glob­al de­pres­sion in the val­ue of bul­lion.

[7] Well, at least we work in com­fort­able chairs.

Data-aware widgets in PyQt

Here's the chal­lenge: a nicer ver­sion of Qt's data-aware wid­get­s, us­ing PyQt.

Did I suc­ceed? Prob­a­bly not, but it was in­ter­est­ing to do. Maybe it will be in­ter­est­ing to read about ;-)

Contents © 2000-2022 Roberto Alsina