2005-04-29 23:12

Trying CentOS

Well, I got sick of the fedora upgrade treadmill.

Although I have a number of things helping me in the software management front, having to upgrade the OS in all my customers every 18 months or so is just boring.

Since they don't need cutting edge software at all, it just wasn't worth it. Being a cheap guy, switching to Novell or RHEL was not worth it, either.

So, I checked CentOS 4. A nice boring stodgy RHEL repackaging. I have been using it in selected environments (including my home box) for a co0uple of weeks.

It's really not terrible.

Ok, the default kernel it ships is terrible. Almost no peripherals work with it, and hotplug is broken like all hell, but I just got atrpm's FC3 kernel and all is fine.

The other main problems are:

  • There are not enough package sources yet
  • I can't find a decent APT for it. So I am using YUM.

Well, YUM really hurts it.

  • For some reason, I can't remove software when I am offline. It hangs.
  • It's sloooooooow. Damn slow. Incredibly slow. Makes APT look fast slow! After I added a few extra repos, it takes about 3 minutes for "yum search pyxml"

But hey, it's not all that bad if you have the time. And for the real work, my boxes use custom-packaged stuff anyway. I just needed something that wasn't going to bite me later.

And since I am readjusting my life to spend more time at home, I do have the time.

On other news, I had to reinstall PyDS, of course. So, I decided to treat my own box the same way I treat my clients' and forbid myself from installing non-packaged software.

So, I packaged it. Mind you, that's on an argentinian cablemodem, so don't expect any kind of speed. And it won't be there for long.

Any required packages not in that place are available in the distro, or in dag or in karan

2005-04-08 23:59

Sometimes things just click

I have been writing web-based interfaces for applications for about 5 years. Nothing public, nothing very interesting, just tiny front ends for custom tools in clients' installations.

And I have hated every minute of it. PHP hurts, Twisted hurts, mod_python hurts...

For a couple of months I have been using CherryPy and I finally am having fun doing it.

And after I figured out how to do AJAX using it, it's even more fun ( because the apps interaction model is not totally braindead :-)

I don't expect it to be as fun as PyQt/PyKDE, but it's totally not awful. I suppose the same epiphany comes to people when they use rails or some other decent, productive, fun framework.

All in all, I could get used to this.

2005-04-06 23:59

Simple password validation

I am writing a sort of web-based admin tool for a client, and I had this problem: How do you validate a system user from a script?

Well, this is how:

def validPass(name,password):
     p=os.popen('/usr/bin/checkpassword-pam -s login -- /bin/true 3<&0','w')
     s='%s\000%s\000xxx\000'%(name,password)
     p.write(s)
     r=p.close()
     if r==None: #Success
             return True
     else:
             return False

Just get checkpassword-pam from somewhere.

Or, if you use some other sort of authentication scheme, some other checkpassword. They are meant for qmail, but they are very handy :-)

2005-04-04 23:59

Impudent abuse of copy&paste

I often check on the comments for the longer articles I write.

Since most of those are of a technical nature often I find someone posting a question, even years after the article was posted (thank google for that), and I like to answer them.

So, I check on my Linux Booting Process Unveiled article, and I find this:

This article is posted on this site as well, and in its entirety:

http://www.section6.net/help/linuxboot.php posted by Joshua Purcell at 2005-03-14 16:14:41.492867-06

And guess what? It is! Thanks Joshua!

Ok, it's not just a copy. For instance, he removed the joke at the beginning, and managed to misspell inittab in a title (as INNITAB).

I am not against copying content from my site. In fact, it says right here at the right side that you can. As long as you do the following:

  • Keep my name on it
  • If you change contents, clearly say so
  • Link back at me.

These guys at Section 6, specifically TBonius decided to do the following:

  • Replace my name with his alias. They even say all their content is (c) nobody. Well, not quite all, guys!.
  • Edit and not mark it
  • Not link back

I would contact them except that:

  • They provide no easy way to do so
  • This doesn't look like a honest mistake (like some vietnamese site did), because of the editing.

So... whatever dudes. I can write articles like this in a couple of hours, while hangover. Nice that you find it worth stealing (badly) down to the footnotes!. But hey, that's just lame. Or, as you may understand better:

Section6 1z 7h3 5ux0rz!

2005-03-20 23:59

Change of plans

Well, uCrux is not for me.

The main problem is what lead me to it in the first place, uClibc.

Sadly, I cannot recommend it except for embedded devices. It has some problems building or linking specific software, but that's not it. The problem is there is no upgrade route.

Since it promises to break binary compatibility every version, you have to rebuild the world to, for example, see if a bug is fixed in latest snapshot.

So, back to glibc, at least for a while.

And, since I decided to switch to glibc, why not look at Crux's child, Arch? It's downloading now.

2005-03-20 23:59

UNIX stuff that makes no sense ( the rant)

First of all, I love Linux. I have used it exclusively since about 1994 (yeah, the last Windows I actually used for real was WfW 3.11).

Let's see how it makes no sense.

The Bin

Your system has /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin 6 different binary locations.

What sense does it make to split bin and sbin? It only makes it harder for regular users to use tools the can need, like netstat and ifconfig.

As for /bin and /usr/bin, it makes little more sense, if at all. Sure, put a basic, functional system outside /usr, because /usr can be a network FS. Well, who does that?

I mean, I have seen all-local and all-network systems, but I have never seen a /-local, /usr-remote system in ten years.

And I suppose someone does it, but that doesn't mean it makes sense. If you want a real, functional, unbreakable system you can use in case of network failure: use a separate partition. Or use a Live CD. Or use a floppy. All of those are more resilient than your /.

As for /usr and /usr/local... that's just a throwback to when people were scared of installing software. People should install packaged software anyway.

The Libs

/lib /usr/lib and /usr/local/lib. Just as much sense as the above.

The variable

/usr and /var. Here's what I think I heard: /usr is for unchanging application data (bins, libs, docs, etc.) /var is for mutable data (logs, spools, caches).

That way, you put /var in a separate partition and if apps run amok, your / doesn't fill.

Well... ok, I suppose. Except that the right way to handle that is to make sure your apps don't freaking run amok!

Say, logs? Rotate them by size, not by date!

Spools? Use disk quotas, and maximum sizes!

Caches? They should be space-limited.

And all services should be kind enough to figure out when your disk is about to burst and do something graceful with it.

Finally: if your /var fills, all your services will crash just as hard as if / filled. So what's the point? That you can log into the crashed box and fix it? You can do that with a full /, too.

The root of all evil

We live with the concept of a single almighty admin. Why?

If every service application had a single point of configuration and monitoring (ie: /etc/app and /var/service/app (in runit ;-) and /var/log/app, it would be trivial, using ACLs, to allow partial management of the system.

Sure, there would be a real root for stuff like password management and such, but that's not so bad.

Why has no one bothered doing this?

Permission to barf

The Unix permission system is at the same time harder and less powerful than ACLs. That only on the last two years it has become practical to use ACLs on Linux, and that still you can't count on them in every distro is... ugly.

I could go on, but... I think you get the idea. Coming some day: a proposal to fix the mess.

2005-03-19 23:59

Booting with runit

The first tutorial coming from my custom-distro experiments. Since it's a good idea to start at the beginning, here is... Booting with runit.

2005-03-17 23:59

Linux: a not-unix-like OS.

Well, I am still experimenting with my concept-distro.

I am now up to a running PyQt using uClibc, which I thought unlikely ;-)

I completely removed all the sysv init stuff, and replaced it with runit, which has an interesting effect:

It boots to a graphical login in about 15 seconds. Inside qemu. In a 900Mhz duron. Including kernel loading.

Of course the trick is that you have the login while stuff is still loading, but I am working on that, too.

Since using runit it's pretty simple to get a overview of where the booting process is (services have dependencies, they simply get started in order, and in parallel), I will hack a system-wide ksplash-like thing on a side of the xdm (probably will end up writing my own whateverdm).

Think of it as Fedora's rhgb, only you can login instead of getting bored.

I also switched to a root-free system Ubuntu style. Not decided yet on it, but it's not hard to do (or use).

Next step: hack Knoppix HW-detection script (or rather rewrite them in a real language).

I understand why there are 743 Linux distros. It's quite a lot of fun to hack one together.

Oh, and it needs a name. It's not going to be useful for anyone, it's just a personal toy, but it needs one.

Come on, Planetkde guys, throw me names for a non-unix like linux, if you dare ;-)

2005-03-15 23:59

Source-based distributions, the good side.

I am no fan of source-based distributions. I think that for most practical purposes, a distribution where installing KDE takes over a day (I own a lowly Duron as my fast computer) is useless.

However, they are good for one particular niche.

Custom distributions. Weird distributions. Personal distributions.

I have several computers. Most of them too slow and small.

As I was considering reinstalling Linux on my Libretto for fun, I looked at what was installed in it, and decided that really, 90% of it was of no use whatsoever.

The problem was, since it had Debian installed, it has a rather wide network of dependencies that simply could not be done without.

On a regular computer, that's not an issue, but in this tiny workhorse, with 16MB of RAM and a 800MB HD, it makes a lot of difference. The smallest I could get Debian to be, and still have network, PCMCIA and X11, was about 250MB.

And the performance was not awesome, either (but not terrible).

So, what would happen if instead of a regular distribution it had something like this:

  • uClibc instead of glibc
  • runit instead of SYSVinit
  • dropbear instead of OpenSSH
  • X built as kdrive (formerly tinyX)
  • python/qt (or maybe python/fltk) for basic admin tools

And so on. Basically rejigger the whole software selection slanting it towards the small side, and dropping a bazillion non-fundamental dependencies 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 distribution gives you a headstart.

For example, I decided to start from ucrux, a uClibc-based port of Crux. Since the native toolchain in ucrux is uClibc, I don't have to worry much about a whole class of mess that happens when you build uClibc-based binaries on a glibc-based system (it's practically cross-compiling).

Qemu lets me install ucrux and work on it somewhat faster than on the target P75 (if I could make KQEmu work I'd be happiest).

Since crux's software packaging mechanism is simplicity itself (a shell script that installs to a fake root), although it's severely underpowered (no dependencies), I can start from ucrux, hack the build of one package at a time, then put everything on a CD very quickly.

So, if you want to hack your own distribution, Crux (or some other similar kit) is quite a nice thing.

For general use... well, my requirements start at apt-get or equivalent ;-)

Now, if only TinyCC worked for more programs, that P75 would be a pocket development powerhouse!

2005-03-12 23:59

Developer-centric and proud of it

Ok, as everyone and its goat in the free software/open source/pet-keeping communities already has read, Eugenia [1] has been up to her old antics.

The latest shape of her discontent is, developers of GNOME (and lately of KDE, too [2]) are developer-centric instead of user-centric.

Basically, the gist is that developers have a responsability to keep in mind their users desires, and follow their wishes when deciding what way their projects should go. That these "people" are developing said software in their free time and giving it away is unimportant, she says, the user's voice shall be heard. [3]

Well, I am not a developer nowadays, at least not of shared software [4] but I still recall when I was one. And I am cranky. And I have little care about what people think about me. So...

Let me express my feelings when I read her editorial (and another one called the riddle of the sphinx, I think [5] ).

Ptui!

I have read, in the editorials and (specially) the clueless talkbacks, the following:

  • If you are going to do a half-assed job, don't put it on the internet

Well, dude, pretend it's not there. That works for me when I consider japanese tentacle porn, it can work for you and a mail client. If you pretend it's not there, it won't bother you. Then those who tolerate half-assed jobs can live a life of jolly fulfillment.

  • The user has invested effort on learning and using the program, so the developer owes him something.

I suppose the solution for that is not allowing people to use the software unless they accept that it is provided as-is... oh, wait... that's already true. Never mind.

  • That since GNOME (or KDE) claim to provide useful and user-friendly software, by failing to follow the user's lead we are engaging in some sort of false advertising.

Coca Cola promised me "Everything is better with Coca Cola". Then I tried pouring a can into my computer, hoping it would make it faster, or somehow better in some way. I have to tell you, those bastards won't know what hit'em!

  • Posting bug descriptions in bugzilla is too much work.

Well, try fixing one someday, missy! That's WAY harder. You are saying that using a little energy is too much work, to people who spend hundred times more as a consequence.

It's like complaining that planting seeds is too much work, when you later get a harvest. Well, if you think, so, drop agriculture.

  • That the development is somehow skewed towards developers, not users.

Well, to that I have many answers. Let me share a few.

  1. So? You say that as if it's a bad thing.
  2. Well, that's good for the developers.
  3. What magic potion did I have to drink to become a developer? Developers are just users who are way too involved in the project.
  4. As a lawyer once said, since phoenicians invented money, the question "what can I do for you?" has a single answer. Well, think about it.
  5. No, it isn't.

Finally, let me tell you the depressing part. In a comment, Eugenia said she dropped GNOME for WindowMaker. Let me show you what she said:

RE: So Eugenia refuses to use GNOME? By Eugenia (IP: ---.osnews.com) - Posted on 2005-03-10 20:32:31

I moved back to WindowMaker, yes. At least I don't expect anything more from it, because it is not a prominent environment and I know it's a much smaller project with fewer responsibilities.

Talk about throwing the baby away with the bath water. She is simply saying that she choses to use worse software (according to her needs), because... well, I have no idea why.

Because she has low-enough expectations about WindowMaker that she won't be disappointed? That road leads to dating ex-convicts, you know.

In the end, well, I have no idea what people think. I simply don't understand the world. I mean, I intensely dislike GNOME, and even a few people involved in it, but it's just code. And code that is worth millions of dollars. And it's there, dudes! It's like finding a stack of bullion in your doorstep, and not only that, but on every doorstep [6].

Why don't people simply look up and thank the invisible dwarves who must have toiled in darkness for years in order to rip it off the earth? [7]

No, what we get instead is a bunch of jewelers asking for finer craftsmanship in the goods, or else they are just gonna buy some bullion from someone else.

You know what? Developer-centric is good. In an absolute, objective, measurable way. Because it's developer-centric you get developers. developers make code. Code brings users.

If all you attract are users because being a developer is a pain the butt, you have no developers, thus no code, thus no users.

What do you think is better for users in the long term?

So, say it loud, I'm developer-centric and I'm proud. At least this old hack is.

[1] of OSNEWS.COM fame. You decide if that's a good or bad thing.

[2] A new post in her site. I suppose she has to feed the hit-monster.

[3] That being published in a big site that lacks threaded replies in 2005, and a woman who, when she gets a complain about it, said she was doing it in her spare time, so stop bothering her. No, I don't get it either.

[4] Isn't that much nicer-sounding than open source and much less annoying and pompous than free software?

[5] Which is, I think, #4 in the list of "ten titles you should never use in an opinion piece". #1 is What I did last summer, but I digress...

[6] And by some economic miracle, it hasn't caused yet a global depression in the value of bullion.

[7] Well, at least we work in comfortable chairs.

Contents © 2000-2019 Roberto Alsina