Posts for October 2008

2008-10-05: podlators 2.2.0

While incorporating some of the podlators fixes into the Perl that will be released with lenny, Niko Tyni found more problems with the current implementation. I'd written the test suite to force the output encoding on the file handle used by Pod::Man and Pod::Text, but pod2man and pod2text weren't doing that, and hence the output wasn't properly encoded.

I'm finding Perl's Unicode support very tricky, particularly if I want to support the PERL_UNICODE option that adds input and output encodings on all file handles. I can't use encode before output because PERL_UNICODE encoding layers will then double-encode. The approach taken in this release is to force the appropriate output encoding on the output file handle (possibly destroying caller state). This works, but it's ugly.

Pod::Text had another problem. Its historic behavior is to copy the input encoding to the output, but doing that with properly-tagged UTF-8 POD input means printing out wide characters in the internal encoding, resulting in Perl warnings. This version now, in the absence of the utf8 option, forces the output encoding to match the input encoding if possible. This seems like the best compromise and matches its historic behavior. pod2text now supports a --utf8 option since it's now useful to force a different output encoding.

I wanted to get something out to stop the bleeding, but there are a few problems with the current approach. As mentioned above, I'm forcing file handle encoding layers, which may destroy encoding layers created by the caller that were intentional. This implementation also depends on PerlIO support, which is an optional Perl feature and not always enabled.

I think the right long-term approach is to probe for PerlIO support, and if present, use it to check the encoding layer on the output file handle. If PerlIO is not set, or if no encoding layer is present, I can safely use encode before output, which doesn't mess with the file handle state and is much cleaner. If PerlIO is present and an output encoding is set, just trust that output encoding (although if the utf8 option is set and the output encoding is something else, it may be a good idea to throw a warning).

I'm not sure when I'll have time to implement this, though, since it will require another reworking of the code and more testing, and I'm behind on a number of other projects.

In any event, the current version will work for most people in most cases. You can get it from the podlators distribution page.

2008-10-05: Updated Debian notes

Some time back, I wrote up our current best practices in the Stanford central UNIX support group for managing Debian servers, and some time before that, I wrote up some notes on useful Debian package build tools. Both of those pages had become hopelessly out of date. Over the past week, I've been revising them, and they should now reflect reality somewhat better.

Notable in the changes to the build tools document is a switch from debarchiver to reprepro. I haven't finished doing that migration for my personal repository, but I'm most of the way through and hope to be able to pull the trigger fairly soon. I like debarchiver and have used it for years, but reprepro supports a pool structure and package migration between distributions, both of which are killer features. We're going to be switching to reprepro for Stanford's internal archives as well, although probably not until sometime in November or December.

I also moved the documentation I had for packaging individual scripts into a separate document and updated it to reflect the fact I use Git now instead of Subversion. Most of the details here are fairly straightforward and obvious, but I find it useful to read through something like this and see how someone else approaches a problem. Maybe someone else will find bits of it useful.

2008-10-05: spin-rss 1.19

I finally found some time to write documentation so that I could release spin-rss, the program used by spin to generate RSS feeds and dynamic thread files. spin is the system that I use to generate all of my web pages, including my journal, and the RSS pages for my journal and for my web site change log are generated by spin-rss.

This program is rather idiosyncratic and I'm not sure how useful it will be to someone other than myself, but then I thought that about spin when I first wrote it. It takes as input an .rss file which contains a block of metadata and then one block per entry. It can transform those entries into either an RSS feed or into a couple of types of thread files (for later processing by spin). It has special code to handle my journal entries and my book reviews so that I can write them in thread and generate nice RSS feeds as well as web pages from them.

You can get the latest version from my web tools distribution page.

2008-10-05: postfaq 1.16

Except for individual scripts, I'm slowly abandoning CVS for either Git or Subversion everywhere I use a revision control system. Today, I converted my FAQs over to Subversion, which meant that the version numbers in the Id strings are no longer particularly significant. I therefore modified postfaq to not include the revision number in a subheader unless it contains a period.

While I was modifying it, I noticed that it could generate invalid Expires headers by translating the name of the month, depending on the locale. That's now fixed as well. I also rewrapped the documentation and improved the REQUIREMENTS section.

You can get the latest version from the postfaq distribution page.

2008-10-05: faq2html 1.28

This is the same change as in the last postfaq release, except for faq2html (used to convert text files into HTML for my web site). When creating a last modified subheading for FAQs, suppress the revision number unless it contains a period. Subversion revision numbers, since they're repository-wide, are not really useful information.

You can get the latest version from my web tools distribution page.

2008-10-05: bundle 2.31

Today seems to be the day for lots of small updates to scripts.

When applying a template to my local system, I found that bundle was trying to run diff without two arguments when reporting an update on a directory mode (with the -c option). There were two problems here: first, directory chmod and chown changes weren't reported specifically as such, unlike with files, and second, directory updates (such as timestamp changes) would result in running diff with bogus arguments. Both problems are fixed in this release.

You can get the latest version from the bundle distribution page.

2008-10-06: Config management and bundle

Today, among all the other things I accomplished, I converted the rest of the system templates for the eyrie.org systems to Git and tweaked my personal configuration management system to make better use of Git's features to push data around. I was feeling on a productive roll, so I also wrote up the system I use.

This system has a long history. The first commit in the underlying repository for my personal workstation is dated September of 1998, and the underlying system was already in use at Stanford before I started working here more than 15 years ago. It survived several major OS changes and several significant reorganizations and only recently has been replaced for day-to-day server management by Puppet. We still use bundle to do some of the initial system configuration inside FAI before the system is put together enough to run Puppet.

Puppet is overkill for a few personal systems, so the system I'm using is based on our previous revision of our server template system, with some modifications to not depend on AFS and to make remote deployment of changes easier and simpler. It's not as fancy as some of the new ideas for managing all of /etc in a VCS, but it's been reliable and capable enough for me that the core of the system remains unchanged after ten years.

2008-10-12: 2008 California Propositions

I finally had a chance to read through all the voter information for the 2008 elections today, and here, for whatever it's worth, is my take on all the ballot measures this year. None of the California senators are standing for election this year and I live in a completely safe Congressional seat, so apart from the Presidential election, the propositions are the only real questions of substance on the ballot.

For those who aren't familiar with the California proposition system and the screwed up way in which fiscal government works in this state, some things to be aware of:

Because of the first point, I default to voting against all ballot propositions unless they're very compelling. They're often written by people who aren't competent to write laws. Because of the second point, I default to voting in favor of all tax increases and against all bond measures to try to generally stop a stupid and broken way of funding state services. I'll make an exception for bond measures designed for things that are truly the sort of infrastructure one should fund with a bond measure. But anything that uses bonds to fund ongoing services is poison; raise taxes instead.

I won't reiterate the proposition text here. Go to the California Voter Information Guide to see the full text and arguments.

Here are the state-wide propositions:

Proposition 1: YES

This is one of the rare bond measures that I'll vote for. I'm still a little torn, since I'd rather see the focus be on mass transit that replaces daily commutes instead of long-distance travel, but I think we need to build high-speed rail very badly and putting more money into rail is worthwhile for a host of reasons.

Proposition 2: YES

I'm unimpressed by fear-mongering that humane cages for chickens will mean we'll get diseases from Mexican eggs and all die of bird flu. This is the kind of thing that's hard to pass any way other than through proposition since the agricultural industry doesn't want to be bothered to rebuild their cages. Tough.

Proposition 3: NO

This is almost a bond measure that I'd vote for, but the people in favor give no real reasons why this funding is needed in this form. Instead, the argument in favor is pure emotional bullshit about how we have to help the children. If you can't be bothered to provide a coherent fiscal argument, I can't be bothered to vote for your proposition.

Proposition 4: NO

We're going to have to keep re-voting on this damned thing until I die, since the anti-abortion fanatics have enough signatures to put it on the ballot every single damn election. The goal of parental notification laws has nothing to do with protecting children and everything to do with outlawing abortion by putting as many restrictions and red tape in front of an abortion as possible. You can't solve family communication problems with laws, or by forcing children to notify possibly abusive parents (and the exception essentially requires that the child charge their parents with child abuse in order to avoid notification).

Proposition 5: YES

Reduces drug sentences, more funding for drug treatment programs, and diverts more drug convictions into treatment programs instead of prisons. Anything that reduces prisons in this state is good as far as I'm concerned. Our criminal justice system is completely out of control, and part of that is the idiotic sentencing for non-violent drug offenses.

Proposition 6: NO

Our state budget is a complete disaster in large part because there are so many stupid restrictions on the budget from propositions like this that it's practically impossible to balance the budget and you want to add more mandatory spending amounts for prisons? Are you out of your minds? Fiscally, this is the worst proposition on the ballot.

Proposition 7: NO

Remember what I said above about well-meaning nonsense put on the ballot by people who shouldn't write laws? This is one of those. I'm all in favor of renewable energy too, but not a renewable energy bill that's opposed by the Sierra Club, the Union of Concerned Scientists, and the Environmental Defense Fund. The idea is great; the implementation is complete crap.

Proposition 8: NO

The Bigotry Amendment. I hope no one reading this would actually vote to deny marriage rights to anyone, and if you would, I don't want to know you.

Proposition 9: NO

This is another one of those stupid "get tough on crime" propositions, this one based around old-fashioned revenge. It basically lets the victims of a crime get heavily involved in the punishment of the offender, get more powers to prevent bail or parole, and generally increase sentences. Given that the sentences are way too long already and the prison system is fundamentally broken, this is a horrible idea.

Proposition 10: NO

Pushing clean-air vehicles is a great idea that's exactly the sort of thing that shouldn't be done with a bond measure. Make it an increase the vehicle registration fees and I'd vote for it in a second, but this proposition has the standard "won't raise taxes" semi-lies and will just make the budget even worse. And unlike the rail bonds, it's not for building infrastructure; it's for doing things that, in a well-designed program, would be ongoing costs.

Proposition 11: YES

I'm skeptical that this redistricting board will be better, but gerrymandering is a serious problem and it seems at least distantly possible this will help. It's supported by the League of Women Voters, which is the main thing that's tipping me towards supporting it.

Proposition 12: NO

I'm sure this will pass easily, and it's not really problematic in the way that most bond measures are. The basic idea is that the state uses bonds to provide low-interest loans to veterans to buy houses, basically reducing their interest rate by backing their mortgages with the state's credit rating. If it works properly, all the money gets paid back. However, given the current mortgage crisis, I'm skeptical. I also don't really like the California state government providing special services to veterans; the US federal government was responsible for the war and should be coughing up the money and credit rating to support veterans after it. But it won't bother me a lot if it passes.

Santa Clara County measures:

Measure A: YES

Bonds to rebuild local hospitals and medical centers for earthquake readiness, supported by property tax levies. Exactly the sort of thing that bonds should be used to do.

District measures:

Measure B: YES

Sales tax increase to expand BART to San Jose. I'm almost at the point of voting against this, since it seems like we keep voting for things like this and BART keeps not getting extended. But I have a very hard time voting against any sort of mass transit improvement, particularly when it's funded by taxes instead of by bonds.

Measure C: ABSTAIN

This is ridiculous bullshit. It's a non-binding advisory vote on the VTA transportation plan, which is huge and which I certainly haven't read and which I doubt the vast majority of voters would have read. The general voting population is in no way qualified to judge this plan. This is required by some idiotic "oversight" provision that's toothless. I refuse to vote either way, since a vote would imply that I have enough information to have an informed judgement.

Measure D: YES

This would replace the requirement to have a non-binding advisory vote like Measure C with review by an advisory board. The latter is probably equally toothless, but at least isn't quite so completely stupid.

The rest are the standard variety of local offices. I will mention in passing my personal practice for voting for judges: if you think that we need less harsh sentencing and more intelligence in figuring out how to deal with crime, you can do worse than voting against all district attorneys and prosecutors who run for judge and vote in favor of defense attorneys and public defenders who do.

2008-10-14: Rock footprint

Soon, I will be returning to the coast to take hopefully much better pictures of my favorite spots, now that I know what I'm doing.

Rock footprint

I'm way behind in both posting photographs here, writing up comments about them, and mailing them out to people. Of course, at the moment, I'm way behind on just about everything one could name except work (and not behind there mostly just because I put lots of time in today).

I think all my packages are now in shape for Debian's lenny release, though. I'm going to request an unblock of two new Shibboleth package uploads, and then that will hopefully do it and anything else can be dealt with after the release.

Last modified and spun 2017-02-20