Search Results: "reg"

25 February 2008

Pierre Habouzit: Dear John

wrt your issue yes it's true that for short series of patches, it's often asked to rebase it on a clean state if it doesn't merges fully, though if you're doing a complicated work, meaning dozens of patches e.g., it's usually two things: When this happens, upstreams are usually okay with merging from a public repository that you would set-up. Though, it's usually a tiny more work for the upstreams to work with a new remote repository, and those are only used for these cases. Also note that upstream could really fake the same work branching off from the point you branched off, and using git-am from that point instead of git am -3 on the top of the current devel branch (which is similar to a rebase, hence creates new sha's). IOW, it's not really a git deficiency (even if git-format-patch could maybe annotate _more_ where it comes from, and git-am grok that to re-create a topic branch from that) as git has the features, just that it probably doesn't make it easy enough, and that people usually don't care enough for very short series.

24 February 2008

Alexis Sukrieh: A Debian Marketing Team ? That sounds good.

Sam suggested in his lat blog entry to create a team whose role would be to handle the promotional stuff. I find that idea pretty good, having a central point where to take decisions regarding how Debian should communicate with the outside world makes sense. I totally support that idea.

Mike Hommey: Crazy ideas

I often have a bunch of somewhat crazy ideas, and I don’t have any time available to test or implement them, which is sad. So just in case these crazy ideas would scratch someone’s itch, I’m going to throw them in the wild. I’ve been using git for a few months, now, and used it not only for source code management, but for efficient storage, too. *VERY* efficient. I’ll have to write about that some day. Anyways, while installing pristine-tar, today, I just thought it would be neat to have an equivalent pristine-deb, to store deb files efficiently. I’m pretty sure someone else thought about this possibility, but it’s still better that such ideas come to the ears (eyes, actually) of someone that could implement them. Such a pristine-deb tool could be used to… store packages from snapshot.debian.net. That would reduce the amount of space required for the archive dramatically, IMHO. I’m pretty sure old packages are not requested that much, so they could be generated on-the-fly from a CGI script placed as a GET action, so that urls wouldn’t change. The same could probably be applied to archive.debian.org. It could even save enough space that archive.debian.org could host snapshot.debian.net. But that depends on the average package content and its average evolution, which I have absolutely no idea about. Update: It would also be interesting to have the .diff.gz files in there, too ; it would obviously allow to have an easy view of the contents, such as copyright files, changelogs, and other bits of information available on packages.debian.org. Update 2: Actually, pristine-deb would as easy as storing 2 pristine-tars (one for control.tar.gz and one for data.tar.gz), and a debian-binary file. The .deb can be aggregated with
ar -rc file.deb debian-binary control.tar.gz data.tar.gz

21 February 2008

MJ Ray: The Myth Of Deregulation

Russ Nelson: The Influence of Government writes:
"Larry Lessig proposes to lessen the influence of money on legislators. Unfortunately for him, he is trying to hide a symptom without curing the disease. The disease is that governments regulate businesses. The symptom is that businesses then have a profit motive in regulating governments. If you want a government which is free of corruption, you have to eliminate the motive for corrupting them."
which looks like utter bovine excrement to me. Corporations - and the overpowering profit motive of some corporations - are artificial things, created purely by regulations. If you free corporations from all regulations, you destroy them. If you only free them from taxes, you remove some of the few restraints on their bad behaviour in pursuit of profit. See Joel Bakan: The Corporation for a better approach. In summary:- Some of those may seem surprising, but if you read the book, you'll see why those conclusions make sense.

David Welton: Android - commercial meets open source

One of the interesting things about Google's Android project is the mix of cultures. There are a number of people like me, firmly grounded in the open source world, who are happy to get something that 1) works, 2) looks to have legs in terms of popularity, and 3) will be open source. Think of a lot of your favorite open source projects when they first launched. "Polished" isn't a word you would probably use to describe them, although it usually happens in later releases (Ubuntu looks better and better, for example). There are also a lot of people who come from a 'commercial' background, who expect to see everything ready and waiting on a plate for them, which isn't a mistaken expectation if you're used to using products from big companies who are staking their reputations on them. They want nice, thorough docs for everything, almost all bugs worked out, and lots of easy to use tools. Android lies in a middle ground somewhere between these two camps, which I think at times makes people uneasy. It's not open source yet. You can't hack it as much as you may want. You can't rebuild it from the ground up. You don't get access to the communication between the developers working on it, and cannot participate in that development. However, there is a promise to open source it that would reflect very, very poorly on Google were it not met and is therefore pretty credible. The developers and many people involved with it certainly seem to "get" open source, and are taking good steps to create a community around Android (a few even hang out in the #android IRC channel on Freenode) that will most likely not take too long to start assimilating interested outsiders once the code is open. In terms of quality, it wasn't bad when it came out, but it was very definitely an "early look", put out there to solicit feedback and change according to it, something that's part and parcel of a release early, release often open source model. On the other side, Android looks to be a big effort from a big company to get into a big market in a big way - it's not a "under the radar" type of strategy that the open source world is often constrained to follow for lack of monetary and marketing resources to do it any other way. This has attracted a number of developers who either don't see or don't really get some of the "open source" aspects of what we have so far: it's still changing! The docs aren't complete! The emulator is still ugly in places! And from their point of view, it must seem odd to getting something that's obviously not a finished product, without crystal clear direction and goals and a roadmap, and without actual hardware only available in the distant (well, in internet terms! - 8 months or so) future. That kind of thing probably isn't done very often in their world, or where it's done, is certainly kept quieter and perhaps restricted to registered developers. They came over to have a look at something that was ready to go, and it isn't, yet. This has caused some disappointment for people who expected to see something ready to go out of the box. Perhaps Google needed to manage their initial communications slightly better in order to manage the second group's expectations more carefully. In terms of us open source folks, I think that what we want is more access, as soon as Google is willing to hand it out. More source code access, but also access to the development process and people. "Real" open source isn't just about the code, it's about being more or less equal participants in a community. Luckily, I think the people at Google get this, which is one of the reasons I'm enthusiastic about Android, even if I wish we didn't have to wait so long for the source code.

MJ Ray: Local Strategic Partnerships and Strategic Economic Partnerships

Are any worker cooperatives reading this involved in any Local Strategic Partnerships or Strategic Economic Partnerships? If so, please contact me (use the contact form on the page for this post and mark it "not for publication"). I've some questions about it from a Regional Cooperative Council. Any other comments about LSPs and SEPs can be fed back if you want to send them to me. As an example, our local LSP is http://www.northsomersetpartnership.co.uk/

John Goerzen: Death sure is cost-effective, isn't it?

I just read Death Be Not Proud (But It Is Cost-Effective) by Chez Pazienza. In his story, Chez talks about his stay in the hospital to have a marble-sized brain tumor removed. Across the room during his stay in neuro ICU, he saw a person far worse off than himself: staples all around his head, barely able to stay conscious, unable to speak. After a few days of this, Chez asked the nurse what had happened to the other person.

It was the same thing.

The difference? Chez had good insurance, and the other person didn't. So Chez got the modern surgery with the latest technology, and the other guy got the Neolithic version. The other patient's family came to visit, clearly heartbroken at his condition, not knowing whether he'd ever be the same. And knowing that even if he'd survive, he'd have years of physical therapy ahead of him.

Then there was the story of the girl whose insurance company denied a liver transplant, calling it "experimental", sending her to her death. He says:

Regardless of what Fox business-creature Neil Cavuto may have to say on the subject, healthcare and profit are two thoroughly antithetical concepts. Giving CEOs the authority to stand on the edge of the arena and issue a final thumbs-up or down while we lay incapacitated or dying is like charging a lion with protecting the Christians.


I entirely agree.

20 February 2008

Steve Kemp: I got the poison

I've two video-related queries, which I'd be greatful if people could help me out with:
Mass Video Uploading
Is there any tool, or service, which will allow me to upload a random movie to multiple video-download sites? Specifically I'm curious to learn whether there is a facility to transcode as necessary a given input file and then upload to youtube, google video, and other sites as a one-step operation.
Mass Video Searching
Relating to that is there a service which will allow me to search for vidoes with given titles/tags/keywords across multiple video-hosting networks?
Regarding the searching I see that YouTube has support for "OpenSearch", but Google's video hosting has neither that nor a sitemap.xml file: Irony Is ...

Jeff Bailey: Met with the surgeon.

Angie, Leif and I met with one the two surgeons who will be doing the work. I s'pose it's good and bad that the co-director of the UCSF Spine Centre, Dr. Mummaneni is personally taking on the case. Good that I'll have the best possible care; Bad that I'm apparently interesting enough to warrant it.

Meeting with him was matter of fact. He talked about how he'll approach the surgery (from the back, since the placement of my aortic arch and innominant vein would make coming through the front problematic). It looks like I'll have rods and screws from T1-T6, with a cage replacing the vertebra at least at T3 and possibly at T4. People don't usually do that much movement in their thoracic back so, ongoing, his opinion was that I largely won't notice it.

In hospital-time will depend on whether or not the surgery can be done in one shot. Because of the trickiness of the area, it may not be possible to get it entirely from the back, and he'll do two surgeries rather than one if that can avoid me winding up in a wheelchair. Ideally, there's one surgery, and a week later I'm home and able to take care of myself. The way they take the tumor out in a couple pieces is known as "en bloc spondylectomy", but may not be possible with the way the spinal nerve is being pinched. He described the surgery itself, and the simple version is "remove one or two vertebra, replace them with cages, stabilize the surrounding area". Yay to the Black and Decker surgical division.

He'll be assisted by Dr. Chau for spinal cord monitoring and the rest of the surgery.

The last thing they did as I left the hospital last Saturday was a full body CT scan with contrast, and the radiologists have declared that that they see no additional tumors in the body. I'll visit with an oncologist to do some final tests, but consistently the answer is coming back that this isn't cancer, it's more likely an isolated mutation. Dr. Mummaneni doesn't feel that this is a side effect of sitting at a computer since I was 3 years old, any of the car accidents, or being hit across the back with a flute case in grade 9.

I did ask if I'll set off metal detectors at airports after this, and apparently the titanium used doesn't do that.

So, erm. What are the risks? Honestly, pretty consistently less than doing nothing. Having this thing would eventually result in paralysis anyway, and aside from the usually OMG-they're-cutting-me-open-anything-could-happen type of things that don't keep me from biking to work on a regular basis, all the other options are "And life improves from here". Informed consent means that I have statistics in my head that I'd rather not dwell on and a laundry list of things to panic about when I wake up in the middle of the night but those really are just nerves acting up and stress wanting to come out. Nothing wrong with any of that.

Surgery is booked for March 3rd. We'd hoped to go to Vancouver for Leif's birthday around then, but I've been asked not to fly. Rapid pressure changes apparently will aggravate what's there now.

I feel good about this. I'm back to pretty much 100% after the hospital time last week, and noticed that after the embolism that I'm moving a bit freer than I was before. That's enough to start the optimism going already. We've also twiddled my medicine for every 8 hours rather than 6, which will help me sleep better, and reduced it, which will help me feel better.

Having time-frames and knowing that I'm in good hands is a lovely place to be after all that.

19 February 2008

Jonathan McDowell: Epic IPv6/DG834G fail

Since I've moved to Castlerock I've started using my DG834G to provide my ADSL again, as it was quick to setup and easily found in all the boxes. Up until now I've just been using it with the normal Netgear firmware, but I'm getting to the point where enough of the rest of the house is sorted that I want to think about the network layout. Part of that is enabling IPv6 (I'm with an Entanet reseller these days, and Enta claim to do IPv6), part of it is not bridging the wireless and wired networks (I'd like to be able to trust the wired one a bit more) and part of it is just being able to run useful bits on the router itself. Anyway. I had built up an OpenWRT SVN image last month and tonight I decided was the time to try it, having been putting it off for ages. Epic fail. Managed to get the backup of the Netgear image done fine, eventually got the new image on there, waited and waited and no joy. Wouldn't even ping on the LAN side. Further investigation showed that it would ping for a few seconds when first power cycled and then die. So I had to find my serial console level shifter so I could have a look. All signs point to it failing when loading the wireless or ADSL firmware blobs. Bah. I spent a while trying to get the old firmware back on it; ADAM2 seems really unhappy if it receives unexpected traffic (like, say, DNS requests because my network thinks the router is the DNS server/gateway) while you're ftping an MTD image. I got there, but decided I'd try out my WGT634U setup again, which is what I used in Norwich. Found the frog, fired up the router, changed my old Black Cat details to the new Enta ones and crossed my fingers. At first all appeared well (well, except for no IPv6 PPP; must email Enta to see if they need to tweak settings at their end for my username), but after a while it became apparent that the ADSL connection was flakey; it was resyncing every couple of minutes. Bum. It might just be the frog; I do have another one somewhere, but I ended up just falling back to the DG834G with the stock Netgear firmware ie exactly where I started this evening. I've pulled latest OpenWRT SVN and I see a few kernel/VLYNQ patches regarding AR7, so I shall try another build and see what happens. Epic fail. I shouldn't play with networking on a school night.

Lior Kaplan: The 2nd Debian Openoffice.org bug triage


In 24 hours 21% of the triage is already done due to an amazing responsiveness from Debian’s openoffice.org users. From the total of 285 bugs targeted by the triage, 35 were closed and 27 were reproduced. Another 20 bugs are in my processing queue. With today’s result the total bug count for openoffice.org in Debian crossed the 300 outstanding bugs mark. I hope to lower it to the area of 200 by the end of this triage. I must say most users were very happy to see their bugs’ get some attention, and some were really happy to see their bug was already fixed. I got a few mails with very warm words about the triage, openoffice.org in debian and the project in general. Getting this feedback from users is one of the things that motivates me to keep and contribute to Debian in general, and to do bug triages in particular. One issue I noticed is that some of our users don’t know how to close bug reports. While it’s more important they’ll know how to report bugs than how to close them, it’s a good idea to refer them to “Closing bug reports” on Developers’ information regarding the bug processing system.

Filip Van Raemdonck: Two no more

Mid august, “responsability” will get a new meaning: my wife is into the 15th week of our third pregnancy.
We actually already should've become parents last november, but almost halfway through the first pregnancy the child had stopped growing and was diagnosed with trisomy 13, because of a hereditary Robertsonian translocation that Veerle turned out to be having. Short of waiting for the pregnancy to spontaneously abort, the only way to deliver the child was induced labour. We already knew from the karyogram that had uncovered the trisomy syndrome that it was a boy, though it was impossible to see that. The little fellow was about two thirds the length he should've been, and weighed about one third the normal weight.

We visited a fertility clinic a few weeks afterwards, but were told that the actual chance of us getting a healthy baby was a lot higher when we would naturally conceive than through in vitro fertilization. The only advantage of the latter method would be near elimination of the 50% chance to a failed pregnancy of natural conception. (For clarification: due to the translocation, there's a two-in-four chance that a conceived child carries an incorrect number of chromosomes; such embryos have a near-zero chance of making it through the pregnancy)

By the end of summer, Veerle was pregnant again. This time however it lasted for only seven weeks, after which the foetus died. Examination of a tissue sample again uncovered trisomy 13 syndrome. And it was again a boy.

Now it's the third pregnancy, and almost three weeks ago a chorionic villus sampling was performed to determine if this time the child would be healthy. Although a FISH (“fluorescent in situ hybridization”) test performed in the first two days showed no sign of problems, it was only after the liberating phonecall that came in yesterday that we could take a deep breath and smile. The baby has inherited the Robertsonian translocation though, but that doesn't lessen our joy.

As a side effect of the karyogram, we also know the gender weeks before ultrasound might reveal it. However, I haven't secured the necessary permit to disclose this information. I'll tell everyone in half a year from now...

Thijs Kinkhorst: Electronic Waste Registration

This January I've put some research (together with Dick) into the security of electronic waste registration techniques. About 25% of Dutch municipalities employ some kind of tariff differentiation ("diftar"): a household pays per quantity of waste. A traditional way of implementing this is to use coloured, taxed garbage bags, but more modern municipalities employ bins with RFID tags or underground containers which can be opened with (again) RFID cards. These underground containers then communicate their records of disposals to the central office. We visited a number of municipalities around the country, scanned ID cards and containers and even tooka ride on a garbage truck. Some highlights of our findings: We saw many different systems with each having their own flaws. It would be better if municipalities joined forces and designed one or two good systems instead of a dozen half-baked ones. These public systems funded with public money should then have a similarly public security evaluation.

John Goerzen: Registrar Dynadot Conspires to Help Take Down Wikileaks?

Yesterday, Wired ran a story on the Cayman Islands bank that got Wikileaks.org blocked. This story said, in part:

When the bank's lawyers indicated they would be filing a suit, she asked them to tell her where so that Wikileaks could find an attorney in the appropriate jurisdiction to represent it. She says the lawyers refused to tell her. Two and a half weeks later, the bank filed a restraining order against Dynadot and Wikileaks in San Francisco. Wikileaks received notice only a few hours before the case went to a judge who accepted the agreement between Dynadot and the bank.


(emphasis mine)

Now, Dynadot and this Cayman Islands bank apparently had an agreement to block wikileaks.org already. Not only did Dynadot effectively take wikileaks.org down, but also they "lock(ed) the wikileaks.org domain name to prevent transfer of the domain name to a different domain registrar." The U.S. Disctrict Court for Northern California issued this injunction without ever giving Wikileaks a chance to respond. The bank only filed the request against Dynadot. Apparently Wikileaks received notification that this was going to happen only 6 hours before the hearing (an incredibly short time in legal terms), nowhere near enough time to prepare a case.

Now, the reason I post this is because I have looked at Dynadot as a registrar before. They have good prices and a whois privacy service that makes sense: where you remain the owner of record, making it easier if you need to transfer the domain or prove your ownership of it.

But before signing up, I read their AUP carefully. Among many alarming things, I noticed this paragraph:

You further agree that Dynadot, in its sole discretion and without liability to You for any resulting loss or damages, may take immediate corrective action, including, but not limited to, removal of all or a portion of Your domain services and/or deletion, suspension, cancellation, termination, or other interruption of domain services or Your customer account with Dynadot, at any time during the term of this Agreement, in the event of notice of any possible violation of this Agreement by You or Your end users, or if such service or account is used in association with morally objectionable activities, or for any reason whatsoever. In such cases, any and all fees paid to Dynadot will be non-refundable and ineligible for account credit.


So, I thought I would write to them about it. Here is an excerpt from their response:

We always conduct an investigation before taking action against a domain. We will give you a chance to respond to the complaints.


From Wired's story, it doesn't look like that really happened. The US Government has already issued advisories about Cayman Islands banks, and it is unclear (to me at least) what law Wikileaks broke, or how Dynadot could find their actions of exposing fraud "morally objectionable". What's more, collaborating with the bank to get a takedown order written, but not talking to Wikileaks, seems to go against their statements to me (assuming again that the Wired story is accurate).
Here is my entire mail. You may also find archive.org's copy of the AUP from last July to be helpful. (I wrote the email in November, and they've added some sections since then, so the section numbers don't necessarily match up)

Subject: Re: SITE: Questions about your AUP
From: Dynadot Info <info@dynadot.com>
Date: Sat, 3 Nov 2007 13:42 -0800
To: jgoerzen@complete.org

Hello,
Thank you for your email. Responses are below.
Best Regards,
Dynadot Staff
--------------------------------------------------
DYNADOT... $8.99 domain names... $1/mo. web hosting
http://www.dynadot.com
Hi,
I currently have several domains being hosted with Gandi.  I have long been looking for someone that can provide a level of privacy for my whois data in a sane way.  I think Dynadot is the first I've seen that looks like it can do that and still be affordable.
In preparation to transfer over a first test domain, I read your AUP and frankly am quite troubled by what I saw.  I hope that you can allay my fears.
In section 4 of part 2, the last paragraph states that Dynadot "for any reason whatsoever" may delete, cancel, or terminate my domain services or customer account.  It also lists "notice of possible violation" as a justification for that.  That makes me even more nervous -- any random person could send you an email claiming something nefarious is happing with my domain name, and I'm agreeing to just let you delete it because of that?

We always conduct an investigation before taking action against a domain. We will give you a chance to respond to the complaints. 
A very similar clause appears in section 7 of part 1 ("cancellation of services").  It goes on to cast a very broad net around objectionable material and says that Dynadot decides what's objectionable.  Now, if you go to my website at www.complete.org or blog at changelog.complete.org, you'll see I'm an upstanding netizen.  But the AUP says that things that "are designed to or effectively... embarrass" third parties could get my domain cancelled.  So if I post a review of Vista that says I think Microsoft did a poor job of engineering, would my account be yanked if one of their engineers complained?  What if I (legally!) linked to a Comedy Central sketch using real TV footage to mock George W. Bush or Hillary Clinton?

The cases you described above would never happen with us. Complaining about Microsoft or making fun of George Bush are protected free speech. The service agreement is designed to give us some flexibility in dealing with customers that break the law. 
I'm particularly concerned about this because apparently DynaDot felt it worthwhile to try to take down the website of someone that found a security hole: http://www.jhuskisson.com/friends/dynadot-fights-back-bans-nick-from-everything
While I wouldn't condone step-by-step cracking instructions in most cases, this is concerning to me.

He was posting a step by step guide to hacking our website, which is illegal. The hack did not work, but we noticed an upsurge in strange activity in our logs, so we requested the hacking guide be taken down. 
Finally, item (i) under the Domain Privacy Service section says that you could immediately reveal all my information upon the receipt of merely a *claim* (not even a court order), even if it's invalid.  But I thought that NOT doing this was what you were saying made your service better, over at http://www.dynadot.com/resource/article/qa.html?aid=0

Once again we need to build some flexibility into our service agreement to deal with people who use their domains for criminal activity. Otherwise we could be liable for the damages that they cause to others. So far, we have never dropped anyones privacy except in the few cases we were forced to by a FBI subpoena.
I know this is a long message, and I appreciate your time.  I really do want to use your service, but -- no offense intended -- I want to make sure I'm not dealing with scammers first, and from reading the AUP, I'm not so sure!

No offence taken. I will email our counsel to see if we can tighten up the agreement a bit. 
-- John Goerzen

18 February 2008

MJ Ray: Finance & Business / Phone spammers: Home Energy Saver

I just had a call from a foreign-sounding call center worker saying she was from "Home Energy Saver" and offering advice on getting grants for loft and cavity wall insulation.

At first, I thought she was from the Energy Saving Trust, but when she said they were "calling all home-owners in the county of Bristol" (we're not and surely the EST would know that) and said we hadn't had any grants in the last 10 years (we've had two in the last 18 months), then I smelt a rat.  I asked for their telephone number and their company registration number and she would give neither.  I pointed out that the number she'd called was listed on TPS and she said they're allowed to call TPS numbers.  Like hell.  I hung up.  1471 said "we do not have the caller's number" - typical for overseas call centres.

Anyone else had a call from these phone-spammers?  Who are they really?

15 February 2008

Kartik Mistry: Kartik Mistry


* Ah, with my corrupt tooth, we have good news regarding tooth too! Kavin is getting his first tooth! Yay. Hope, I will able to take picture of it.

Joerg Jaspert: PostgreSQL Continuous Archiving and Point-In-Time Recovery (PITR)

A nice feature from PostgreSQL are “write ahead log” (WAL) files. Quoting from the PostgreSQL website they describe every change made to the database’s data files. […] if the system crashes, the database can be restored to consistency by “replaying” the log entries made since the last checkpoint. This basically enables online backup of your database cluster. And as you end up having the complete log of all actions within your database(s) you are also able to go back in time to any point you like. I won’t write a complete howto about it, as the PostgreSQL docs are pretty good, just some notes how I did my setup, as a kind of reminder for me when I have to do it again.
There must be a place to store WAL files which ends up not being on the same machine, otherwise it doesn’t make much sense. For me that means scp to a different host, but an NFS mount or some storage array or drbd device might also be an option. Much of the following is for the scp method, but easily adaptable to other storage methods. I need a target user on the host I copy files to, and as I did the setup for the pentabarf database running on host skinner, I helpfully named it pentabarf-backup. The copy process can’t be interactive so the postgres user on the database host needs to have a passwordless SSH key to login to the pentabarf-backup user on the backup host. To limit my bad feeling about “passwordless key to login” I restrict the key by adding
from="skinner.debconf.org,72.32.250.224,72.32.79.241",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty 
in front of it while copying it to the pentabarf-backup users .ssh/authorized_keys file. I need a few directories, namely pentabarf-WAL-skinner, pentabarf-tarballs and pg_xlog-skinner for the stuff to backup, created in the home of the pentabarf-backup user. Next step is to tell PostgreSQL our wish to have online backups. Add the following statements to your postgresql.conf, adapting the values to your needs:
archive_command = 'ssh backup test ! -f pentabarf-WAL-skinner/%f && rsync -az %p backup:pentabarf-WAL-skinner/%f'
checkpoint_timeout = 1h
archive_timeout = 12h
The above tells PostGreSQL that i want it to archive the files using ssh to my backup host and transfer files with rsync (via ssh), but only if they do not exist yet. It also tells it to archive the files at least once every 12 hours. The effect is that WAL files get copied over when they are “full” or after 12 hours passed, whatever happens first. Don’t set it too low, as the file will always have the full, fixed size and you waste space transferring mostly-empty files. In case you are concerned with the possibly slow speed of a network link, the PostgreSQL site has the following to say about this: The speed of the archiving command is not important, so long as it can keep up with the average rate at which your server generates WAL data. Normal operation continues even if the archiving process falls a little behind. I haven’t had a problem with the speed yet. A 16MB file every (at least) 12 hours isn’t that bad. Now that we have done all the setup and are able to transfer WAL files, we need a base backup to start with. Issue a SELECT pg_start_backup(‘BASE_BACKUP’); as a database superuser and then backup the database cluster by backing up the whole clusters data/ directory (and every other location if you use tablespaces). When you are done issue SELECT pg_stop_backup(); and you are done with your base backup. You might want to exclude pg_xlog/ to save space, you don’t need it.
As I’m lazy I use a script (written by Peter ‘weasel’ Palfrader), you can get it here, but whatever you take is fine. If you use the script just make sure to adapt the variables in the script to values that fit your system. From now on you should do such base backups in regular intervals, I run them once a week, as recovery does need the last base backup plus all WAL files from then on. Doing regular base backups limits the amount of WAL files you need to keep around / you need to replay.
Reading the above you might find that there is a window of up to 12 hours from which I do not have backups. True, and to make this window way smaller, I am using another script (also written by weasel), get it here, together with an init script. This synchronizes the pg_xlog/ directory to my backup host every 5 minutes, so in case of a server crash I can replay everything up to the last 5 minutes. Recovery using WAL files This is pretty simple, and also good documented at the PostgreSQL site again. For my scenario it basically boils down to
  1. Stop postgres
  2. Move away the cluster.
    mv /var/lib/postgresql/8.2 /var/lib/postgresql/8.2_old
  3. Restore the backup dump, be careful to have the file rights correct. For the above described setup that means copy and untar the latest tarballs created weekly.
  4. Recreate pg_xlog:
      mkdir /var/lib/postgresql/8.2/main/pg_xlog
      chown postgres:postgres /var/lib/postgresql/8.2/main/pg_xlog
      chmod 40700 /var/lib/postgresql/8.2/main/pg_xlog
      mkdir /var/lib/postgresql/8.2/main/pg_xlog/archive_status
      chown postgres:postgres /var/lib/postgresql/8.2/main/pg_xlog/archive_status
      chmod 40700 /var/lib/postgresql/8.2/main/pg_xlog/archive_status
     
  5. Copy possibly unarchived WAL files from /var/lib/postgresql/8.2_old/main/pg_xlog into the newly created pg_xlog.
  6. Copy all the WAL segment files that are needed over from the backup host. That should be all the files on the backup host, directory pentabarf-WAL-skinner/. You should be able to limit it by taking all those files >= the latest *.backup file.
  7. Create a recovery command file recovery.conf in the cluster data directory. You may also want to temporarily modify pg_hba.conf to prevent ordinary users from connecting until you are sure the recovery has worked. The content of recovery.conf is
          restore_command = 'cp /tmp/pg-WAL/%f "%p"'
         
    Make sure that the file location you specify is the location you put the WAL segment files into in the prior step.
  8. Start the server, it will go into recover mode and proceed to read through all the archived WAL files it needs.
  9. Look at the database and decide if you like what you see.
Of course the procedure can be slightly adapted, so you end up with a database state from 2 weeks ago. Or 3 days. Or whatever you may need (and have WAL files for). There are many possibilities, and there is a lot of text on the PostgreSQL page that I don’t want to duplicate here, so please read it. Also, I’m not using this as the sole and only way to backup my database(s), they are all still dumped into SQL files every day. This is just additional.

Stefano Zacchiroli: XQuery and XSLT 2.0 with Debian

XQuery 1.0 and XSLT 2.0: news and how to use them in Debian (long post about the second generation of the XSL family and how to use the related languages in Debian)
The 2nd generation of the XSL family At the beginning of 2007, W3C released a family of interrelated specification: XPath 2.0, XSLT 2.0, XQuery (1.0). The 3 specifications are based on the very same underlying data model which (finally!) supports typed values and exploits them to some extent, for example permitting some form of static type checking in XPath and XQuery. Types usually come from XML Schema, with both built-in and user-defined types supported. A brief overview of the 3 specifications and what they change in the state of the art follows. XPath 2.0 XPath 2.0 basically consists in XPath 1.0 + 3 new macro features. The first one is a revamp of those language features which are dealing with types, in order to better integrate them with the new typed data model. XPath now has operators to check whether a value belongs to a given type (so yes, type information are kept at run time), and to cast them from one type to another. The basic new type constructor is now the sequence, which replaces the old node-set solving many annoying issues, such as the impossibility of having a node ordering other than document order. The second feature is the improvement of standard library of functions which was ridiculously small in XPath 1.0; it is much better now. Additionally, 2nd generation languages (XSLT 2.0 and XQuery) now support the ability to define functions which will then be visible to inner (XPath) expressions, pushing yet forward the possibilities of plain old XPath. Functions can now also declare types in their signatures (for their arguments and return value) and untyped arguments will be automatically casted to them upon invocation. Hence, even if you are not using an implementation which assigns types to your XML trees, once you "enter" the typed world calling a typed function (almost all standard library functions are decently typed) you will be able to stay there avoiding annoying casts everywhere. Finally XPath 2.0 has turned into a powerful purely functional language and is now powered by constructs like conditionals, for-each loops, existential/universal quantifiers, and existentially-quantified comparison operators for sequences. Here is a complex expression to hwet your appetite (or scare you away ...), comments come as (: smiley faces :)
for $book in /bookshelf//books
return
  if ((every $author in $book/authors/author
       satisfies $author/nativeLang eq "it_IT")
      and $book/lang eq "it_IT")
  then $book
  else ()
(: think about the trouble of writing this in XSLT/XPath 1.0 ... :)

XSLT 2.0 XSLT 2.0 is what I would call a "bug fix release" of XSLT 1.0 + the routinary reworking of the language to deal with typed values, which is not sensibly different than what has been done for XPath 2.0. The fixed "bugs" are several, starting from the annoying issue of result tree fragments. They are basically tree snippets that in XSLT 1.0 you were able to generate for future use. Unfortunately they were not thaaat reusable, given that you were not even able to navigate them with XPath operators! Now the specification is much more clear and distinguishes final result trees from ordinary variables, which can now contain sequences of (navigable) tree nodes. Another important "bug" fixed is the new ability to output multiple documents with a single XSLT stylesheet: it marks the end of stupid extra post processing to be added in pipeline to a XSLT processor. Other minor "bugs" fixed are a limited amount of backtracking capabilities among imported templates, regular expression support directly in the language, and powerful grouping constructs on the lines of SQL's GROUP BY (but much more powerful). Here is a template snippet exploiting the latter feature:
<xsl:for-each-group select="*" group-starting-with="h1">
  <div>
    <xsl:apply-templates select="current-group()" />
  </div>
<xsl:for-each-group>

XQuery XQuery is the end of the chains imposed by XML-based syntaxes. Why the heck one has to use an XML syntax (as in the above snippet) only because she is manipulating XML tress is one of the mysteries of XML technologies which have always been floating around in my head. XQuery is the (supposedly) SQL equivalent for databases of XML documents, but is actually much more than that. I depict it in my head as the XML manipulation language with a syntax I can finally stand. Technically it is XPath 2.0 (say 80% of the whole language) + some extra ingredients (say 20%); so remember that every XPath 2.0 expression is also a XQuery expression. The main extra ingredient is the so called FLWOR expression (to be read: "flower expression", which in addition to the "smiley faces" used for comments gives a "back to 1968"-flavour to the language .... erm FLWOR/flower/flavour, no pun intended). A FLWOR expression is very similar to SQL's SELECT-FROM-WHERE: it lets you generate a tuple stream by iterating on sequences (F: for clauses), binding expression values to names (L: let clauses), filter out tuples which do not satisfy a required condition (W: where clause), order the survived tuples (O: order by clause), and finally return a sequence built using the residual tuple stream (R: return clause). The other interesting extra ingredient is the ability to build the XML snippets you want to manipulate. Within XQuery you do that using plain XML syntax (the only place where a sane-minded programmer actually wants to see it!) which also supports a classical interpolation mechanism to embed expressions which will be evaluated inside XML snippets, and also the other way around. A canonical XQuery example is:
for $t in doc("books.xml")//title,
    $e in doc("reviews.xml")//entry
where $t = $e/title
return <review>  $t, $e/remarks  </review>
(: braces denote the escaping context where XQuery expressions will
   be evaluated inside snippets; plain XML syntax is used for the
   other way around :)

But remember: XQuery for XML is much more than SQL for RDBMS, thanks to the implicit templating mechanism implemented by interpolation, and thanks to several language features fostering modularity (user-defined functions, library modules, XPath 2.0 standard library, ...) you can basically do with it any kind of XML manipulation you can imagine. I don't think I will ever write myself any other single line of XML output in DOM or XSLT ...
Cool, how can I use it in Debian? ... if only this stuff were decently supported in the open source world. Last time I checked, the author of most parts of the GNOME toolchain for dealing with XML (libxml2, libxslt, ...) was not intentioned to implement XSLT 2.0, not even mentioning XQuery. This comes as no surprise, the whole GNOME XML toolkit is written in C, and XSLT 2.0 / XQuery have reached a level of complexity and formal specification which usually entails a higher level approach. So on the GNOME side we are stuck. The other open source implementations of XSLT 2.0 / XQuery I'm aware of are Saxon and Galax. Saxon is an XSLT 2.0 and XQuery implementation written in Java, which is unfortunate per se. Additionally, it is also unfortunate that it is only partially open source. Indeed, Saxon is split into SaxonB (for "basic") which is open source under the Mozilla Public License and SaxonSA which is commercial. While SaxonSA is a fully conformant, XML Schema-aware processor, with support for static typing, SaxonB is a basic-conformant processor with no type-aware features and actually much less optimized than SaxonSA. This is annoying. (Much more annoying is the fact that SaxonSA's author is the only editor of the XSLT 2.0 specification and that instead of his mail address the specification includes an URL pointing to the website selling SaxonSA ...) Galax is an open source (IBM CPL / Lucent license) OCaml implementation of XQuery which is not fully conformant to the specification (though it gets quite close) which is type-aware and implements static typing. The only XQuery / XSLT 2.0 implementation available in Debian at the time of writing is SaxonB. The binary package is libsaxonb-java, kudos to Michael Koch and the Debian Java Maintainers for having packaged it (and to have stood some annoying pings of mine :-) bug #408842). To execute XQuery code you just have to aptitude install libsaxonb-java, prepare a query.xq file containing your query, and then execute something like:
CLASSPATH=/usr/share/java/saxonb.jar \
java net.sf.saxon.Query query.xq

note that the information in README.Debian are still referring to old Saxon versions, see bug #465894 which proposes a more up to date README.Debian. Similarly, to perform a XSLT 2.0 transformation you have to do something like:
CLASSPATH=/usr/share/java/saxonb.jar \
java net.sf.saxon.Transform -ext:off -s:input.xml -xsl:style.xsl -o:output.xml

Do not remove the -ext:off flag when processing untrusted stylesheets!, see bug #465885 for the reason. I've written some handier (1-liner) shell script helpers which remove the need of invoking java manually. They are attached to bug #465894 and I've proposed their addition to the saxonb package. Using them the above invocations become:
saxonb-xquery query.xq
saxonb-xslt -ext:off -s:input.xml -xsl:style.xsl -o:output.xml

Galax in Debian ... well, since long time I've been planning to package it (the ITP has been filed some months ago: bug #447984) and the authors sent me a newer version than what is available online to gather feedback before the long overdue final release. Unfortunately I've been lagging behind in finishing the packaging (which is tricky due to the need of binding libraries to several different languages: OCaml is native, but there is also Java for example). Hopefully this post will give me some renewed motivation for finishing the work ...
References
  • Debian package w3-recs, ships the whole list of W3C Recommendations for offline consultation; it includes all the specifications we have discussed in this post
  • Saxon: home page of Saxon, a XSLT 2.0 / XQuery processor written in Java
  • Galax: home page of Galax, a XQuery processor written in OCaml
  • Debian package libsaxonb-java, ships SaxonB as a Debian package

Acknowledgements Thanks to godog for his helpful comments.
Update: the helpers I've proposed have been accepted into the official package, I've also made available their manpages. Also the pending changes to README.Debian has been accepted. Kudos again to Michael Koch for his quick feedback on my patches!

MJ Ray: ISPs should not be forced to disconnect filesharers

Requiring Internet Service Providers to bar users for illegal downloading is stupid because:- 1. ISPs can't tell what we're sending over the network and aren't in a position to verify whether we have permission to send it. However, cutting off small businesses and home offices could kill some businesses. I own a share of my ISP (one of 6000 or so equal shares) and would vote against opening it up to that liability. I'm not surprised that ISPA has already said ISPs want to pass any liability back to the accusers. 2. government sometimes doesn't understand what can be downloaded legally. There's a famous case where a Trading Standards Officer complained to a Mozilla Foundation worker about their free Firefox browser because
"it makes it virtually impossible for us, from a practical point of view, to enforce UK anti-piracy legislation"
Source: Times Online 3. there is permission for "fair dealing" in copyrighted material for various purposes, including current affairs reporting and education, unless someone changed the law since I last looked! However, some organisations, including the BBC's 100-million-pound iPlayer, try to deny viewers those permissions, so it is easier to start from illegal copies than it is to deal with iPlayer (only works on some computers, installs bandwidth-using code into the system startup and so on). Finally, where did the 6 million illegal downloaders figure come from, ultimately? The film and music dominant producers? The Recording Industry Association of America has already spoken out against legally-required filtering, in http://www.news.com/8301-10784_3-9861460-7.html?part=rss&subj=news&tag=2547-1_3-0-5 Our software is available for free download and free sharing. The music and movie industries need to adapt, not be propped up by making ISPs pay through this sort of bad law. This isn't so much ISP disconnect as BPI logical disconnect!

MJ Ray: The Phone Coop: Annual Meeting

agmphoto Saturday 2 February 2008 was the annual meeting of the Phone Coop (agent link). I travelled to Chipping Norton for it and took a few abbreviated notes, which I've expanded slightly here. Ask questions if you want, but it's already fading in my memory:- Local Loop Unbundling workshop: 20 years of calls for it. 1999 ofcom announced 01 eu announced. 05 threat to breakup BT. 06 openreach split. By 2007-04 there were 2million unbundled. Distribution points and cabinets. Exchange may make even cheaper faster video. TPC LLU should launch this summer. Should take minutes to transfer. Equivalence problems - want evidence of when BT is preferred. Alarm lines: coop unable to take some. Broadband workshop: at year 2000 launch was a .5M service for GBP 40pcm. Now charge represents use. The coop has 4 ADSL specialists and it accounts for 15pc of income. Bought in three parts: tails are the links to the customers, bandwidth is then 155 or 622M fused 60m base plus extra. Home contention is 50:1, business is 20:1. Available in bundles. My.phone.coop offers a usage view with only a day's delay - might be a first for retail broadband. Ambassadors workshop: Harness cooperative difference. Customers can help to get more customers. Possibly give half our local adverts to our phone agency. Interaction with agent scheme unknown yet. Someone asked about running cinema ads. AGM: intros apologies evaluations mugs window stickers 1b 565m mins. Directors report record sales and growth. Profit again. Service progress: 2nd of 19 in Which surveys. Sven is new manager. Midcounties. Sustainability fund. Finances. Highest dividend. Sales mix changed kind rental growth. Costs down 200k. 9k postage saving. Record balance sheet. Recruiting membership manager and secretary. Currently 6735 members. Negotiating .5k sales acquisition - no info to members yet as commercially sensitive. Shortlisted for green business awards on 12 march. Questions: Mobiles? high volume only economic. What is cws? Cooperative Wholesale Society, part of the Cooperative Group. Member profile. Coop purchases. Diversity. Southern acquisitions? Regulator Dependent. Name. Biodiesel. Satisfaction, corp members, large corp custs. Miles travelled. Walking payments. Group promotion of AOL is annoying. Third party card discouraged? Member-account links. Larger affinity. Works bus. 1 against scrutineer. Directors spend on average 4 hours a week on the coop.

Next.

Previous.