Archive for the 'Software' Category

The state of Linux package managemen sucks.

So here I am, wanting to set up a demo of something I’m working on for the public internets. I figure that since I have this big Cisco IPTV machine which will eventually replace Eron sitting here, I should go ahead and set my demo up on that.

And that is where my woes begin. Desu is running Debian and the project I’m working on is with Rails. Debian uses Apt for package management; Ruby uses Gems. Desu has *only* had Subversion, Apache2, and some webDAV module for Apache installed on it. No MySQL, no Ruby, no Gems, and certainly no ImageMagick.

I spend a few minutes installing Ruby. That’s a big ol’ apt-get install ruby irb rdoc ri because, you know, making a ruby-developers metapackage with the whole kit and kaboodle would be too much to ask from the Ubuntu folks. Instead, they just confuse the living shit out of mister Wow-web-2.0-is-cool-let-me-try-this-Ruby-stuff-out! because he’ll only type apt-get install ruby and then have no idea why IRB is not starting.

Then I go ahead and grab the latest version of Gems from RubyForge. I have no idea if there’s a package for this in the Ubuntu repositories, but I won’t bother with it, especially since Desu has Dapper on it. Since Gems can update itself, that’s not too big of a deal — or is it? Why should I need to install anything from a tarball?

But then, I go on to install my gems.

nevans@desu:~$ sudo gem install -y mysql rmagick rails mongrel

This fails spectacularly. I was missing a Ruby -dev package that I needed. I reran the command; it bombed out again. I tried installing a few MySQL packages until it worked. Then I installed the ImageMagick libraries (and the -dev!) to head off the next failure.

And then it struck me; why the hell do I need to worry about dependencies? I thought package managers were supposed to worry about those for me since it’s like, a computer and I’m a human being whose time is valuable.

Because Apt and Gems are two different package managers, of course! So, guys, where’s my meta-get install gems:rmagick gems:mysql gems:rails gems:mongrel?

On Novell and Feisty

I’d like to take a few minutes to discourse on the recent Novell-Microsoft agreements, the response from the community (and specifically, the response from Mark Shuttleworth), what this could mean to Novell, and some discussion on Ubuntu’s efforts to have an accelerated X server as part of the Feisty Fawn release.

Let us first examine the Novell-Microsoft deal. At the press conference, three agreements between the two companies were heralded - one for joint MS-Novell projected with an aim to increase compatability between SUSE and Windows. One for ‘business cooperation’, which boils down to Microsoft marketing the interoperability solutions that they and Novell come up with when a customer asks for help with Linux integration.

And the last agreement is a patent indemnification agreement that extends only to Novell’s SUSE customers. This detail got a lot of attention during the conference, and then later from the entire FOSS community. And not much of what I have seen has been a positive review of this deal.

To summarize, Microsoft alleges that Linux infringes on its supermassive patent portfolio. Not that Steve Ballmer has cited any lines of code in Linux (be it the kernel of another open-source project that gets wrapped into a distro), nor has he even hinted at which patents are being violated. He has merely decided to allege that everybody using Linux “has an undisclosed balance-sheet liability”.

Novell, being everybody’s favorite knight-in-shining-armor has apparently decided that all of its users need to pay the Microsoft tax. To quote Microsoft’s general counsel:

And you’ll see, as well, an economic commitment from Novell to Microsoft that involves a running royalty, a percentage of revenue on open source software shipped under the agreement.

And by doing this, they are appearing as if they agree that Linux does indeed infringe upon patents held by Microsoft. They do indeed nod their head to Steve’s unfounded claims. But hey - you’re Novell. You didn’t base your entire Linux business around a community of idealogical people who don’t even work for you. You don’t depend on them to improve your product, only paying a small and elite team to put the finishing touches on SUSE and ship it. And you did not just spit in their faces and shake hands with the devil.

Oh, shit, wait. You did!

You did just alienate the open-source community which your business is built upon. You did stand up on the stage and smile as Steve Ballmer - right during the press conference, with your CEO present - informed everybody present that Linux infringes on Microsoft’s intellectual property.

STEVE BALLMER: We’re still competitors. I mean, we’ll sit here, and we’ll be friendly, and we’ll be friendly whenever we’re together. But I mean it in absolutely a good way. When it comes down to calling Goldman Sachs, the first thing I’m going to tell them is, let’s get those Linux machines out of there and get some Windows in here. And then the second thing I’m going to say is, if you want to use Linux, let’s make sure that you get a version of Linux that respects our intellectual property, and I will even help you with that because of the commitment we made. But that’s my second, and Ron’s going to start by saying, how about Linux, let’s get those Windows systems out of here.

STEVE BALLMER: Two things. I’ll make it real simple. Number one, we’re going to work together technically to help the Windows world and the Linux world interoperate. Number two, we’ve struck a deal under which we can provide patent agreements to Linux customers in which Microsoft’s intellectual property is respected, and we are appropriately compensated for the use of our intellectual property. And we’ve done both of those things in a way that we think still allows the open source development community to actively pursue what it has been doing on behalf of everybody for the last several years.

. . .

I am quoting the transcript of the Microsoft/Novell joint press conference. The empasis in both quotations is (obviously) mine.

But, you know, I do admit that there is a possibility that some open-source software does infringe on some patents. Patents owned by Microsoft, patents owned by IBM, and patents owned by dozens of other companies. The US’ policies on software patents are, to put it mildly, insane. Regardless of all of that, Microsoft spouting off that Linux infringes upon it’s intellectual property means absolutely nothing to anyone. Without citing specific instances of infringement, you just come off as blowing smoke out of your ass, Steve.

Then, there is also a promise from Microsoft regarding its patents and developers, both affiliated and unaffiliated, with Novell:

The other thing you heard Jeff mention is also very important, we knew we also had to address the needs of developers. So Microsoft today is making two, I think, important commitments, or promises to different groups of developers in the open source community. The first is a promise that we won’t assert our patents against individual, non-commercial, open source developers. Who are these? These are individuals who are creating code, contributing code, they’re not being paid for that code, they’re often working in the evenings or at home. They’re not creating it as part of their job, but they’re acting in an individual non-commercial way. The promise doesn’t run to anybody who employs them, because after all, they’re not acting in the course of their employment. But, it gives those folks a new commitment from Microsoft.

The second thing we did in this area was add a promise that goes to developers, even developers who are getting paid to create code to OpenSUSE.org, code that Novell then takes and incorporates into its distribution, and that is then covered under the patent cooperation agreement between us, because after all Novell is ensuring that our patent rights are respected in an appropriate way, and that gives us the ability to address the needs and interests of those individuals.

Again, emphasis mine. I’m real glad that you’re promising individual developers indemnification. But why not for ones who are doing the work at the request of a corporation? There is no determination made between code done on personal time and code done on company time. It all gets released, reviewed, redistributed, and hacked away at. It all goes back to the community. So why do you feel the need to discriminate?

Thanks, Microsoft, but no thanks. That ‘promise’ is as worthless as the paper its printed on (and funnily enough, it’s not even printed on paper. A promise made in a press conference is not legally binding, so this statement is worthless).

And their pledge to OpenSUSE developers - what does this mean for us?

Well, what if Novell wants to contibute code back into the GNOME tree. Or the Samba tree. Or the kernel itself. How are we to know that their contributions are not ‘tainted’? Is it possible that they might write something as a part of their Windows compatability project with Microsoft that obviously violates a patent? They are licensed to redistribute it. The rest of the world is not. That goes against the spirit of the GPL.

And is Novell trying to allege that the rest of the world has forfit their right to GPLed code?

Section seven of the GNU GPL reads:

If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

That boils down to, in plain English, ‘If the code violates somebody’s patent, then the license no longer applies. Period. No more right to redistribute exists. Have a nice day!’.

Since Novell’s CEO stood on stage and grinned like the asshole he is as Steve Ballmer informed us all that Novell was the only vendor that had a right to redistribute Microsoft’s intellectual property, I would assume that he agrees with Steve. Obviously, he thinks that the community are a bunch of dirty thieves.

You know? The community? The one that built SUSE for him? The one that continues to maintain it and improve it? Yeah, guys, our ‘boss’ thinks we’re thieves. But it’s all okay now - Microsoft blesses work done on SUSE.

The final nail in Novell’s coffin here is GPL v3. The FSF’s lawyer has gone on record as saying that the GPLv3 will explicityly forbid Novell’s behavior. Only offering these patents to Novell and its customers directly goes against the Free Software Foundation’s idea that all software must be completely Free to everybody, not just a subset of people who happen to get their copies of software from one vendor.

Lots of applications in every Linux distro are GPL’d. Many of these GPL’d programs are the fairly-standard UNIX userspace utilities (ls, cd, grep, awk, vim, emacs, chmod, etc) that are maintained by the FSF’s GNU project. Bash is a GNU-maintained program. Glibc, which is critical to any Linux distro functioning, is a FSF project. The same goes for GCC and the rest of the build utilities that you normally see. Then you have GNOME, GPG, and GIMP three more very high-profile applications that every Linux distro ships, which are GNU projects.

If the FSF decides to migrate all of its code over to GPLv3 (and they have been very careful to get the copyrights assigned to the FSF, so they can migrate the project to GPLv3), and GPLv3 forbids Novell from distributing code that is not completely free for everyone, then what happens to SUSE?

Can Novell afford to stay on GPLv2 code if all of GNU is suddenly one day GPLv3? Can they maintain it all for security and bug fixes, and add new features that their customers want? I most seriously doubt their abilities to do that and remain competetive. So where will that leave them?

But enough of Novell’s deal. The next topic that interests me is Mark Shuttleworth’s e-mail to the OpenSUSE developers. Mark, of course, if the individual behind Ubuntu.

I have little interest in debating whether or not his message was appropriate. He was polite, but some may see the message to be in bad taste. Whatever. More importantly, the response to this message is interesting.

The first follow-up to the OpenSUSE response message is really what got me interest in the next issue at hand here: Ubuntu deciding that shipping closed-source kernel modules in Feisty as installed-by-default is wrongheaded.

I believe the novell / microsoft treatise trumps any proprietary driver
debacle. Thanks anyway,

Everyone rational

The problem here is that it doesn’t excuse Ubuntu’s behavor. Sure, it’s a much larger issue. But the two have no effect on each other.

I started reading more into the binary driver issue. Ubuntu is doing it for some very solid reasons - mainly, to increase how pretty the desktop looks. Pretty is a selling point. That’s one of OS X’s big things - it looks nice. It has cool effects. It’s pretty. To make it pretty, they need 3D acceleration working. And sadly, nVidia and ATI flat-out refuse to public specs for their chipsets so the open-source drivers can implement whatever they need to support 3D stuff.

However, Ubuntu should not be making this move. Leaders in the open-source community have been applying to hardware vendors to get specs or open-source drivers released. OpenBSD has shown some success with wifi adapter manufacturers. But for Ubuntu, which really rose out of nowhere and became the shining star of the FOSS community so quickly, to be installing these drivers by default, it really undermines the rest of the community. It takes away credibility.

Ubuntu’s ’solution’ to the problem of users no longer being aware of closed-source drivers is to give them a pop-up box telling them that their kernel is tainted and that they should get hardware from a more cooperative vendor in the future. The details on this are give in the binary driver education specification.

One of the use cases on that spec is regarding Harriet, the everyday computer user that Ubuntu is targetting to close out its bug number one:

Harriet had Ubuntu installed on her computer a couple of days ago, by a nephew who has now gone on a camping holiday. Harriet does not know what a “driver” is.

The biggest question here: Why should Ubuntu be bothering people with politics? It’s okay for folks like me. We accept a higher TCO (if you will) for running our alternative OSes. But if Ubuntu is targetting everyday users, it will *not* be acceptable to those users for their software to lecture them on issues plauging the FOSS community. At best, that is an annoyance. At worst, it will confuse Joe User and turn him off of Ubuntu.

However, the binary driver notification seems to show a disturbing trend in Ubuntu - yelling at you for not being ethical. ‘Ethica’ being defined by Ubuntu, of course. For example, scolding the user when Ubuntu notices an AIM, MSN, or Yahoo IM connection is suggested.

I don’t know what Ubuntu is thinking. Spending time writing code to chastise users for using IM protocols that are ‘closed’, yelling at users because Skype has a number of shady business practicies, and otherwise dictating morality is like taking a giant leap backwards. It will not make you any friends and it does not help close out bug number one.

But it’s all okay because Ubuntu does not actually forbid you from installing software like Skype — today. It just ‘recommends’ what I should be doing. But my operating system should not be recommending what I should think is ethical and unethical, especially if this operating system wants to surplant Windows.

Of course, this is just my two cents. Take it as you will.

Politics? In MY kernels?

My friends, I need to share Microsoft’s latest stroke of genius with you.

Inside Microsoft’s new Driver Quality Rating system.

Oh fucking hell. As if Windows didn’t suck enough as it stood, Microsoft is now introducing political bullshit into the fucking kernel by allowing users to ‘rate’ device drivers and revoking a driver’s certifications based on this. Why? Why? WHY?

I just hope that the certification revocation is not done by an automagic system. Otherwise, a few assholes mog together a huge botnet, submit crap crash reports to Microsoft, and get the iPod’s driver revoked. Boom, an instant million Windows lusers whining in my ear about ‘it just breaking’.

And this time, it did ‘just break’. ARGH.

This makes me glad I dropped that Windows shit years ago.

I’ve finally gotten around to fixing the RIGHT JOIN bug in my SQL paper. I also added a brief note on INSERTs with SELECTs in them. Revisiting a classic…FOR THE SYNDICATE!

Calgary, Alberta (Yasashiisyndicate.org) - Syndicate member Nicholas Evans has updated and re-released his world-reknown ‘Introduction To SQL‘ tutorial under the Yasashii Syndicate’s flag this morning. This paper provides complete beginners a guide to writing queries for relational databases (MySQL is used throughout the paper). It was originally released in Q3 of last year.

MySQL
MySQL is the world’s most popular open-source RDBMS. Maintained by MySQL AB, a Swedish-based company, MySQL is available both under the GNU General Public License, but also offer it under a more flexible license if people are willing to pay. It is used widely throughout the world, with most hosting providers offering MySQL over Oracle or PostgreSQL.

About The Yasashii Syndicate
The Yasashii Syndicate, otherwise known as the Gentle Syndicate, is an organization dedicated to its execution of The Sekrit Plan. The Sekrit Plan’s goals, to outsiders, seem strange and mysterious. To syndicate members, however, The Sekrit Plan makes perfect fucking sense.

For more information about the Yasashii Syndicate, please see yasashiisyndicate.org/about.

Introduction To SQL

REXML, The Ruby XML Parser

Recently, I had a rather frustrating experience with REXML, the XML parser that Ruby >=1.8.4 (and probably older versions, too) ship with. My problem was the extravagently shitty documentation its maintainers provide. This ‘documentation’ is a big tutorial which is unclear on many things.

So, in an effort to help the next hapless programmer who is desperately Googling for some REXML help that isn’t retarded, I will provide you with the following.

# Load REXML
require 'rexml/document'

# Parse our XML
document = REXML::Document.new(some_xml_string)

# Iterate through the root of the document.
# NOTE - I AM NOT USING 'EACH' - SEE BELOW
document.elements[1].each_element do |element|
  # We can access the children of our element
  # with The elements[] array. Same goes for
  # attributes - user attributes[].

  puts element.elements['author']
end

The ‘each’ thing is what got me - each_element loops through and gives you something usable, while each goes through and returns REXML objects with the XML still in them. For example, each would give me ‘ . . . ‘. From there, you cannot use the elements or attributes arrays to get to the children.

« Previous PageNext Page »