Monthly Archive for February, 2006

How to use RPMs

Some info on using RPMs, from some questions I asked fellow ibiblian Jon Mills:

pardom my enduring systems ignorance — where does one get rpms? i know that projects distribute them themselves… were some or all of the ones you installed provided by red hat?

RPMS are voodoo. No, redhat provided none of the rpms you asked for. It’s difficult to find binary rpms for specific linuxes (except for really popular, non-proprietary ones, or unless the distro provides them). If you can’t find a binary rpm, what you do then is to try and find a source rpm, which always looks like <package-name>.src.rpm. Source rpms let you compile from source, but it compiles it into an rpm, rather than just splattering it all over your filesystem. You run this command:

$ sudo rpmbuild --rebuild --target=`arch` <package-name>.src.rpm

It will try to compile and roll the binary rpm for you. If it fails on a compile dependency, then you try to auto-install that dependency:

$ sudo up2date --install <dependency>

If that doesn’t work, then you do this whole process over, except with the aim of just installing the dependency. So you look for binary or source rpms for the dependency, get it installed, and then go back to where you were.

This usually works pretty well. The only time you run into trouble is when you’re trying to install something which supersedes a package which lies within a huge chain of dependencies, such that removing it or upgrading it breaks dozens of other packages. This is called dependency hell, or RPM HELL. Upgrading PHP is a good example, because it has hooks into apache, mysql, and a ton of libraries–you can never just upgrade PHP.

for something like subversion, where it has several binaries and also some apache modules– does the rpm intelligently find the apache install and put the modules somewhere appropriate? do rpms ever actually modify config files for you?

The intelligence is in the rpm spec file, which must be written for each specific distro. That’s how the rpm knows how to find things. If all the spec files are well-written, then everything knows where everything else lives, and all is well.

rpms can modify config files, using shell scripts that get executed after the install. The shell script would be included inside the rpm, and called from the spec file. A good example is that when you install a linux kernel using rpm, it adds an entry for that kernel in /etc/lilo.conf or /boot/grub.conf.

Effortlessy switching between php4 and php5 for web development

I want to test my software on both php4 and php5 quickly and easily. Here’s the solution I came up with.

First, take out everything regarding php out of your main apache config. LoadModule phpX_module ..., AddModule mod_phpX.c, and anything else.

Next, make three files in the same directory as your apache config (/etc/httpd/ on OS X):

php4.conf

LoadModule php4_module        /usr/local/php/libphp4.so
AddModule mod_php4.c
Include /etc/httpd/php_stuff.conf

php5.conf

LoadModule php5_module        libexec/httpd/libphp5.so
AddModule mod_php5.c
Include /etc/httpd/php_stuff.conf

php_stuff.conf

AddType application/x-httpd-php .php

<IfModule mod_dir.c>
  DirectoryIndex index.html index.php
</IfModule>

Now add this line to the bottom of your httpd.conf:

Include /etc/httpd/php.conf

Now make the following two shell scripts and put them somewhere like ~/bin:

p4

cp /etc/httpd/php4.conf /etc/httpd/php.conf
apachectl graceful

p5

cp /etc/httpd/php5.conf /etc/httpd/php.conf
apachectl graceful

Ta da! Now to switch between php4 and php5, you can just do sudo p4 and sudo p5.

It would be nice to even tie this into an applescript with some sort of dock or even menu bar presence… if anyone has any tips on how this might be done let me know.

claimID Public Beta

For the past several months my friend and collegue Fred Stutzman has been working on creating a new web service, claimID. On Friday, the public beta will begin. You can sign up for an invitation on the front page.

Programmer needed in Austin

My friend Zane is hiring a programmer in Austin.

Lyceum Public Beta

In preparation for the formal announcment and code release at the end of this month, the Lyceum team is running a public test intallation of the code. Check it out:

Lyceum Public Beta

The front page explains everything. Basically, sign up for a blog (or several), write posts, adjust settings, comment on other people’s blogs, and then send bug reports to lyceum-bugs AT lists DOT ibiblio DOT org.

Photos from my Uncle’s Wedding in Toronto

I was the best man for my uncle’s wedding. His “bachelor party” consisted of me, my two sisters, and his sister (my mom) getting a few drinks at the bar down the street. It was loads of fun. He refused to let us get him drunk however. Me and Julie had to drink all the extra shots and beer. Oh well.

The first 4 are: my sister Natalie, two photos of my mom, and me, at the bachelor party. Then it’s Natalie with my uncle’s new wife’s dog, Blueberry (cutest dog in the world. also, blind. going on walks is interesting.) Then me and my uncle, in the Roots store, where he just bought me a canadian Roots t-shirt to commemorate the whole affair.






Betty Friedan, 1921-2006

Betty Friedan

The problem that has no name–which is simply the fact that American women are kept from growing to their full human capacities–is taking a far greater toll on the physical and mental health of our country than any known disease.

-Betty Friedan, feminism pioneer

RSS and the NY Times

Just yesterday me and a friend were talking about how the NY Times’ RSS feeds are a weak, hacked-together, last-minute solution… it only shows something like 6 articles at a time, and a very very small (one line) excerpt of the article. Why not include the entire article, and also advertisements, right in the feed? Anyway, that is a philisophical debate for another day.

But what’s funny is I just came accross this blog post from Dave Winer that suggests that the NY Times’ adoptation of RSS was what contributed to it becoming popular in the first place. Excerpt:

The event that made the difference, that in hindsight was the tipping point for RSS, was the adoption of the format by the New York Times in 2002. The publishing industry, unlike the tech industry, didn’t feel threatened, apparently, by a thriving standard, so after the Times went first, they all just followed, compatibly, without reinventing, without gratuitous incompatiblity, without excuses, they just did it.

He concludes:

But we don’t need the tech industry, and it’s about time their attitude reflected that. They didn’t bring us the web, that came from a researcher in academia. And they didn’t bring us RSS, that came from the publishing industry.

Douglas Rushkoff: Suicide Bombs as Viral Media

Douglas Rushkoff wrote a very interesting essay back in August of 2005, discussing how suidicide bombing is a media virus. The media virus concept is something he discussed in a book of the same name in 1994. It offers a very interesting model of how ideas/trends/behaviors spread through a culture through media.

The essay is a quick read. Here’s an excerpt:

Media viruses … depend on our newly complexified mediaspace to exist. Like biological viruses, they have two main components: a sticky outer shell, and genetic code inside. … The virus replicates if its code can successfully interpolate itself into the confused command structure of our cell’s own code. If the virus succeeds in doing this, it turns the cell into a virus factory — the cell commits suicide in the viruses[sic] name. Early Madonna successfully challenged our faulty, confused, and unarticulated notions about female sexuality. The Rodney King tape successfully challenged the unarticulated rage at the way white cops treat black inner-city men. The viral code replicates as long as we’re unable to talk about the underlying social agenda it provokes.

Suicide bombing is a media virus with very real effects. The sticky outer shell is the event itself — a suicide bombing gets covered on the news. It’s huge news, especially if it occurs in a white western nation. Currently, it’s the fastest spreading kind of news story there is.

The code, like that of any successful media virus, challenges the unarticulated confusion over the relationship of the west to oil, Arabs, Islam, and post-colonialism. Actually, the virus fuels itself on rage going back as far as the Crusades, or certainly since the imposition of CIA-sponsored dictatorships.

When issues remain closeted, culture-wide cognitive dissonance only increases. This makes everyone susceptible to the contagion of a virus whose code can nest within this highly charged gap. For a select few cells within the cultural organism, this means becoming a suicide bomber oneself. For others, it means seeing suicide bombers around every corner — as the accidental death of a Brazilian man in London, thought to be a suicide bomber, confirms.




Close
Powered by ShareThis