Born today 8:19am, 9 lbs 4 oz, 20 inches.
Sometime in August,
I said I would watch the
Inbox Zero
talk later on that day. Well, I finally did today. And I'm ready to mass-murder
my (now not so) fat inbox folder and start from scratch, and becoming a good
boy.
In fact, I've been on probation for a few weeks. While I wasn't watching
the talk (which is pretty insightful and fun, and useful if you also
have these horrid mail handling problems) I did roll up my sleeves a few times
and worked on reducing the problem. After a few rounds of fighting, things
were looking slightly better. I deleted TONS of spam which still was sitting
in there. I deleted entire threads of list mail which for some reason wasn't
being filtered properly. I archived a lot of random, misc email. I even replied
to some job offers, for a change. I fixed my .procmailrc a little
to get rid of lots of useless stuff that appears in my mail. It got better,
but not entirely better.
I went from the 6600~ which was probably the figure when I said Enough!
to around 2580. It's still a lot, and I can still get rid of a lot more with
easy pattern searches in mutt. The good news is that, for the first time in
ages, the number of emails in the mailbox has stayed stable for more
than a month. I tell you: I'm proud!
So Merlin gets asked in the talk
what to do when you've been a naughty boy for a long time, and you've ended
up with this HUGE mailbox you can't handle anymore. His answer was what some
people suggested in blog comments: put it aside, start from zero. Merlin calls
it mail-DMZ, and that's probably what I'll do in a few hours, admittedly with
a sentiment of guilt deep in my chest. And from that point, I'll have my
mailbox be a TODO list. Delete. Defer. Delegate. Respond. Do. Simple!
Other Planet Debian participants like
joeyh commented
that something that really helps is reducing the number of times you poll
for email. For me, that means
set daemon 1800 # Pool every 30 minuteswhen it was 5 minutes before. I hope I won't find myself issuing awaken commands often... I remember when, more than five years ago, having more than 100 mails made me feel bad and go cleanup. After some vacation, it went up to 150. Then Christmas came along, 300, until I found myself nearing 7000 last summer. Before moving my junk to a demilitarised mailbox, I'm having some fun replying to some email. The first one in my mailbox is from a member of a Catalan "Mallach" family.
who discovered there was a "Jordi Mallach" other than his brother in the Internet. Apparently we had an exchange on where our families came from (Mallach is all but a common surname... anywhere, and my family has always wondered where it came from). So that's more than 6 years ago. I think I'd love to get a reply to some email sent by me years ago which has been sitting for years in a mailbox, because "I need to reply to this sometime". I think the Mallach-Broquetas are getting one tonight. If you think I'm dumping random thoughts on a vim buffer, it's probably due to me feeling sad today. Sorry, but I feel like typing, and I don't have a typewriter with me. Speaking of sad, nothing beats the next email which sat for some dramatic 6 months in my messy inbox until I found out in the worst of the possible scenarios. Let's go back to late February, 2004, when I had no job, and I didn't have a clue on what to do with my life.From: Conchita Broquetas <familia_mallach_broquetas@yahoo.es> Subject: Hola! To: jordi@sindominio.net Date: Sun, 17 Jun 2001 16:55:17 +0200 (CEST)
I'm not sure if I totally missed it as it came in, or I skimmed through it and thought WTF?! Dude on crack or I just forgot I need to reply to this email , but I'd swear it was the former. Not long after, no-name-yet.com popped up, the rumours started spreading around Debian channels. Luckily, I got a job at LliureX two months later, where I worked during the following 2 years, but that's another story. I guess it was July or so when Ubuntu was made public, and Mark and his secret team organised a conference (blog entries [1] [2] [3] [4] [5]), just before the Warty release, and I was invited to it, for the same reasons I got that email. During that conference, probably because Mark sent me some email and I applied a filter to get to it, I found the lost email, and felt like digging a hole to hide for a LONG while. I couldn't believe the incredible opportunity I had missed. I went to Mark and said "hey, you're not going to believe this", and he did look quite surprised about someone being such an idiot. I wonder if I should reply to his email today...From: Mark Shuttleworth <mark@hbd.com> Subject: New project to discuss To: Jordi Mallach <jordi@debian.org> Date: Sun, 29 Feb 2004 18:33:51 +0000 [...] I'm hiring a team of debian developers to work full time on a new distribution based on Debian. We're making internationalisation a prime focus, together with Python and regular release management. I've discussed it with a number of Debian leaders and they're all very positive about it. [...]
W00t, my pet package
is so clean!
Ah, looking closer, there's a Ubuntu thing in a corner. I'll integrate that
patch when Debian will be mentioned in their release announcements.
[Manual typewriters] just plain shame me into working. As with any fine instrument, they're made to be used, their very design bespeaks this, and there's been many a night I've caught one of my typewriters glaring sternly at me from the shadows, implicating me in a grand failure to honor their structural destinies. Chagrined and challenged, I dutifully sit down to see what I can do to contribute to the machine-age legacy I've been called on to uphold. . .
When you sit down to write a song at the piano, you're going to write differently than if you have a banjo in your lap. And if one instrument isn't bringing the magic and the muse, maybe another will. Typewriters are the same; they make me write in a different fashion, and also provide an alternate trigger for inspiration. And as an electric guitar is different from an acoustic steel-string guitar is different from a nylon-string classical guitar is different from a national steel resonator guitar; so does each individual typewriter differ. My Underwood is different from my Royal is different from my Remington is different from my Corona is different from my Hermes. And if one isn't giving me the juice, another might.
Or you print out the document again because someone misplaced it. Misplaced it! When we were on typewriters, let me tell you, no one misplaced a hundred-page contract! That meant another two days of typing, and tying up at least two secretaries to get it done then. . .
Gore Vidal said he could tell when a book had been written on a word processor. I can, too. Sometimes I can see the cut-and-paste.
I've worked as a professional proofreader and copyeditor, and I can attest that the computer has not led to better writing. What it has led to is more writing, acres and acres of it. Books have grown fatter and fatter while their content grows slimmer and slimmer.
Long time no blogging. Yeah, I know that's a weak intro, but I have to put up something to note that I haven't written anything on this blog in weeks.
I've got a lot of backfill to give -- life has been exciting, even if my blog hasn't been -- but before I do that, I wanted to make a quick note about a letter I just sent out.
It's for the Creative Commons fall fundraiser. As part of their funds drive, they've invited a number of CC supporters to write about their experience and their believes on Open Content.
My letter came out first, today. Commoner Letter #1 - Evan Prodromou is my contribution to the series. I hope it helps out with a cause I believe in a lot. And I hope that people take an opportunity to support Creative Commons.
tags: cc creativecommons fundraiser wikitravel wiki opencontent
...and, really, we nearly never thought that Argentina could win tonight.
South Africa was really too strong for them.
The only domain where Argentinians dominated were scrums but this was much
compensated by their great weakness on line-outs, losing something like 5 or
6 of them.
South Africa thus logical won very easily...and Bryan Habana is now the best
try scorer all along RWCs, along with Jonah Lomu. He is a really great
player, indeed.
Much much impressive South Africa: they'll be by far the favourites of the
final against England, which they beated already during that World Cup. I
said several times that I'm not a deep fan of RSA's play, but I could become
one. Their game improved all along the World Cup and today, they probably
played their best match.
Two remakes next week-end: France-Argentina for the 3rd place and South
Africa-England as final. That will be good matches, no doubt...and I hope
that Bernard Laporte will change the French team to play against Argentina.
...and, really, we nearly never though that Argentina could win tonight.
South Africa was really too strong for them.
The only domain were Argentinians dominated were scrums but this was much
compensated by their great weakness on line-outs, losing something like 5 or
6 of them.
South Africa thus logical won very easily...and Bryan Habana is now the best
try scorer all along RWCs, along with Jonah Lomu. He is a really great
player, indeed.
Much much impressive South Africa: they'll be by far the favourites of the
final against England, which they beated already during that World Cup. I
said several times that I'm not a deep fan of RSA's play, but I could become
one. Their game improved all along the World Cup and today, they probably
played their best match.
Two remakes next week-end: France-Argentina for the 3rd place and South
Africa-England as final. That will be good matches, no doubt...and I hope
that Bernard Laporte will change the French team to play against Argentina.
Having a new home on the web is alwais something really special for me and installing wordpress listening to some good music make me feel quite happy and ready to write a new chapter of my web-life on a new home. I’ve decided to start up a new blog to share my thoughts and opinions on a bigger area of users with the idea to link it to the existing italian one on blogspot (http://andreaveri.blogspot.com), maybe subscribing my feed to community planets such as Ubuntu and Debian one respectively at http://planet.ubuntu.com and http://planet.debian.org. I’m currently trying to install a new bittorrent client called linkage…
….but something is going wrong making it, seems something like the use of a bad syntax or even an ABI breakage on compiling it with the new libtorrent-rasterbar 0.12, I hope to find out a workaround for this; I would like to use linkage again hoping to have it fixed upstream in the near future……and I suggest everyone to browse linkage’s homepage at http://zeflunk.googlepages.com/ and maybe try it out, every istruction on having it installed on Ubuntu can be found at http://code.google.com/p/linkage/wiki/Installation, and yeah…it looks too nice to avoid his use as your main bit-torrent application…
What to say….try it out!
I've been meaning to write this for weeks. Hopefully I can still remember
everything.
So Sarah had a c-section the day before we were scheduled to have our
c-section class. We'd both read a bit though, so it wasn't like we were
going in totally uninformed and unprepared..
Firstly, Stanford Hospital's operating room area is rather mind-blowing.
Sarah was transferred from Lucille Packard Children's Hospital to Stanford
because they could get an operating room there sooner. The transfer was
trivial, just roll the whole bed down the corridor, through the magic double
doors into the operating rooms. The doors in question have a whole heap of
video cameras pointing straight down, so they see everyone that gets wheeled
in and out, which I found interesting. Good for records of patient movements
I guess.
Anyway, through those doors is a maze of corridors. There was a light-up
board hanging from the ceiling in the middle of the main corridor with
lights for all of the ORs. I think there were about 20. The illuminated ones
were available. We went down a corridor, and past a few ORs. Outside of each
one is a big stainless-steel scrub area.
We got to "our" OR, and they transferred Sarah onto the operating table.
Because of her heart condition, they wanted to have an arterial line in her
for the duration of the procedure. This is some sort of gadget that goes
into an artery and monitors your blood pressure beat by beat.
The "interesting" thing with the anaesthesiologist was the New Zealand woman
that we'd seen when we had an anaesthesiologist months prior, but the
appointment was with a different anaesthesiologist, and this New Zealand
woman was "observing". At the time, the anaesthesiologist we had the
appointment with told us that she was going to be on vacation at the time of
the delivery, so she wouldn't be attending. So I don't know if the Kiwi
woman got promoted out of "observing" to "doing" in that period, or what,
but she reintroduced herself to us in LPCH prior to moving to Stanford as
being our anaesthesiologist for the delivery.
Anyway, in the OR, they handed her the arterial line, in it's plastic
packaging, and the first thing she asked was whether it came with anything
else to put it in. At this point I figured she hadn't put one of these in
before. (The answer to her question, by the way, was "no")
She then proceeded to have a terrible time getting the line into Sarah's
arm. Normally intravenous lines go into a vein, but this has to go into an
artery. Apparently when you go poking an artery, it spasms. It then becomes
very hard to get it into a moving target. She had a few goes on one arm,
then gave up, and had to move over to the other arm.
Sarah doesn't like needles at the best of times, and getting this honking
great big thing in was no picnic. The bruising on both her wrists afterwards
was phenomenal. She tends to bruise fairly spectacularly whenever they stick
a needle in her. I almost stepped in and asked if it was really necessary
that she have it, because they were having so much trouble getting it in,
and it was clearly hurting Sarah. I think someone else ended up getting it
in, not the anaesthesiologist. Not "that" one anyway. There were heaps of
people in the OR.
Next, came the epidural. Again, we had the inexperienced anaesthesiologist.
This time she said to someone else how she was so nervous because there were
"too many eyes". Not really reassuring. They gave Sarah a numbing injection
first, and then proceeded to poke her in back with the epidural catheter
needle thing.
Sarah was flinching when they did it, and they kept yelling at her not to
move. Apparently it didn't hurt, but it caused discomfort every
time they tried to get it in. Eventually the associate professor of
anaesthesiology stepped in and got it in. Later, they said that Sarah had a
slightly curved spine or something, and that had made it a bit more
complicated.
I'm not begrudging the obviously inexperienced anaesthesiologist for
anything. Stanford is a teaching hospital, and doctors have to get their
experience somehow, but I think that when the patient is conscious, it's
important to come across a little more confident.
So once they got all of that sorted out, they could get her lying down on
the table and get down to business.
Apparently one of the side-effects of the epidural is that it can cause your
body to think it's got hypothermia. Part way through the procedure, Sarah
started shaking uncontrollably. I can't remember whether she complained
about feeling cold or not. She also got a really itchy face. Apparently
that's a side-effect of morphine.
Sarah also doesn't tolerate anaesthetics very well, and started feeling
nauseous part way through the procedure. Sure enough, as has happened
countless times previously post-operatively, she threw up. At least we had
warning and I got a kidney dish in place in time.
That was about all the eventful surgical stuff. They had the usual screen up
from about her neck area, so I couldn't see what they were doing. After
Joshua was delivered, one of the nurses asked me if I wanted to see him, and
took me around from her left shoulder where I'd been sitting to around below
her right foot, to where they had him in one of those perspex portable crib
things. I could see a lot of red out of the corner of my eye, and I could
have seen a lot more if I'd bothered to look, but I was more interested in
seeing my son at that stage.
They let me bring him back around to where I'd been sitting previously, to
show Sarah, but it was hard getting him up to a point where she could see
him properly, and she was partially out of it by this stage. I think she
dozed off for a little bit not long after that.
I forget what time we got into the OR, but they started the operation in
earnest at about 10:00am, and we were out of there by 10:45am if memory
serves. The nurse in charge of the recovery room really didn't want me
there, so I went back to LPCH with one of the nurses to spend some time with
him while he was weighed and measured, and I took some photos, and held him.
This was good, because I got to have a good cry on my own with him.
So overall, in my "I'll never be squeezing a watermelon out of my nether
regions" blokey perspective, having seen what Sarah went through, and how
much discomfort that it looked like she was going through, both in the OR
and afterwards, I'm not convinced c-sections are any less painful than a
vaginal birth (taking the average case of both). I think you're trading some
"short term" (depends on how long your labour is I guess) pain for some
"long term" pain while you recover from your incision. Granted, Sarah wasn't
really laid up all that badly for all that long, but it still didn't look
all that pleasant.
I guess really only the women who have done both delivery methods can really
comment. All I know is I found it very difficult watching Sarah go through
so much pain. So much so that I'm not really looking forward to that again.
Maybe, hopefully, after her aorta is
repaired, they'll let her delivery vaginally next time. I'm not holding
much hope though. The high-risk obstetricians are fairly paranoid. There's
also the possibility the baby will make the decision very easy for everyone
by being breech.
Sarah raised an interesting point today. Why didn't they just knock her out
with a general anaesthetic? There was no need for her to be conscious for
the delivery. That would have spared her the pain and suffering of getting
the arterial line in, and they wouldn't have needed to bother with an
epidural. One for her to ask the obstetrician at her follow-up appointment.
We went to see Sarah's cardiologist the week after she was discharged from
hospital, and he said that looking back over all of the echocardiograms that
have been taken in the 18 months or so that he's been following her, it
looks like her aortic
aneurysm has gotten a little bit bigger.
It's still below the size that they'd normally operate at, but he said that
in his opinion it should be repaired before attempting another pregnancy, to
play it safe. He even said that afterwards, Sarah could go back to doing
triathlons, which is a big step back towards a normal life.
So on Monday, we had an appointment with Dr Craig Miller,
who is apparently the best cardiac surgeon in the US, and one of the top
three in the world, when it comes to aortic aneurysm repair whilst being
able to save the heart valve.
We'd done a heap of reading up on Dr Miller before the appointment, and the
cardiologist's clinic administrator had told us about him as well.
Apparently he's a real character. He certainly looked it from the staff
photo (linked above). In reality he looked much more like this.
But he's certainly a real cowboy type. We saw his nurse practitioner on
Monday before we saw him, and his nurse practitioner was this moderately
pierced, cowboy boot wearing, "y'all" speaking kinda guy, who really knew
his stuff. In fact we exhausted all of our questions that we had for Dr
Miller on him before we even saw Dr Miller, because he was running a bit
late with the previous patient.
This is where Sarah's got a pretty detailed
write-up of what they're planning on doing. They're going to replace
more of the aorta than they would otherwise (because the enlargement seems
to be continuing further up the aorta), which makes the surgery a little
more involved, in that they're messing with the arteries that lead up to the
brain, so they've got to some more funky bypass work, and lower her core
temperature so her brain copes with the blood flow being monkeyed with.
Dr Miller was very softly spoken, and a lot older looking than I'd expected,
given the whole cowboy hat thing. He seemed really nice and thorough, and
explained everything. He also showed us what a mechanical valve looked like.
The reason sparing the valve is so important is that the alternatives if
they can't are either a pig's heart valve or a mechanical one. Both have
their drawbacks.
A pig's valve won't last the rest of Sarah's life. She'd need to have valve
replacement surgery at some point down the track (I think they said about 8
years, although they wear out faster in younger people).
A mechanical valve requires you to take blood thinning drugs for the rest of
your life. One of the side effects of these drugs are birth defects. It's
also audible from outside the body.
We got to see (and keep) a sample of the Dacron tubing that they use to
replace the part of the aorta they're removing. I was totally taken aback by
the diameter of it. I hadn't sat down and really thought about what 4.4cm
(which is about what her aneurysm is currently at) really looked like.
The operation is likely to take 8 to 10 hours. I'm not looking forward to
that waiting game. Dr Miller said the procedure, whilst sounding pretty
bloody scary has about a 1% risk. I'm not exactly sure what that is a risk
of though.
Sarah's booked in for January 3 next year.
The road ahead is still long.
It's funny. I was reading Planet Debian, whilst I sat on hold with Dell
myself, and I read John Goerzen's
post, which prompted to write this one, when I wouldn't have otherwise
bothered.
Dell's customer service has completely degraded over the years, I think.
I've been trying for a few days now to get pricing on replacement hard
drives for my PowerEdge 1850. When I bought it, I made the mistake of
skimping on getting the 140 Gb disks because of cost, and the 70 Gb ones are
approaching capacity. As I'm going to be back in Australia soon, I'll have
an opportunity to visit daedalus and physically upgrade the disks,
so I thought I'd start looking into ordering some new disks now.
I called the Australian 1800 number. It went something like this:
Dell: Press 1 for sales and pricing information
I press 1
Dell: Press 1 for home crap, 2 for small businesses with 3-400 people, press
3 for education and businesses with 400+ people
I press 2 since I figure home users don't buy PowerEdge 1850s.
Dell: "Dell switchboard this is blah, how may I direct your call?"
Me: "I'd like to get pricing on some replacement hard drives for a PowerEdge
1850."
Dell: "I'll just put you through to sales"
Dell: "Home sales, how may I help you?"
Me: "I'd like to get pricing on some replacement hard drives for a PowerEdge
1850."
Dell: "I'm sorry, you'll need the server people, let me transfer you"
Dell: "Dell switchboard this is blah, how may I direct your call?"
Me: "I'd like to get pricing on some replacement hard drives for a PowerEdge
1850."
Dell: "I'll just put you through to sales"
Dell: "Home sales, how may I help you?"
Rinse and repeat something like three times before the switchboard operator
couldn't hear me and hung up on me. I swear I got the same sales droid in
Home Sales at least once. Retards.
So I called back, opted for the 400+ employees option, got the same thing,
but this time the switchboard operator put me through to spare parts, where
I sat on hold for a while and then hit voicemail.
Maybe I'll be lucky tomorrow.

$ ssh alioth $ cd /git/collab-maint $ ./setup-repository pkg-mdadm mdadm Debian packaging $ exit $ apt-get source --download-only mdadm $ mkdir mdadm && cd mdadm $ git init $ git remote add origin ssh://git.debian.org/git/collab-maint/pkg-mdadm $ git config branch.master.merge refs/heads/masterNow we can use git-pull and git-push, except the remote repository is empty and we can't pull from there yet. We'll save that for later. Instead, we tell the repository about upstream's Git repository. I am giving you the git.debian.org URL though, simply because I don't want upstream repository (which lives on an ADSL line) hammered in response to this blog post:
$ git remote add upstream-repo git://git.debian.org/git/pkg-mdadm/mdadmSince we're using the upstream branch of the pkg-mdadm repository as source (and don't want all the other mess I created in that repository), we'll first limit the set of branches to be fetched (I could have used the -t option in the above git-remote command, but I prefer to make it explicit that we're doing things slightly differently to protect upstream's ADSL line).
$ git config remote.upstream-repo.fetch \
+refs/heads/upstream:refs/remotes/upstream-repo/upstream
And now we can pull down upstream's history and create a local branch off it.
The "no common commits" warning can be safely ignored since we don't have any
commits at all at that point (so there can't be any in common between the
local and remote repository), but we know what we're doing, even to the point
that we can forcefully give birth to a branch, which is because we do not have
a HEAD commit yet (our repository is still empty):
$ git fetch upstream-repo warning: no common commits [ ] # in the real world, we'd be branching off upstream-repo/master $ git checkout -b upstream upstream-repo/upstream warning: You appear to be on a branch yet to be born. warning: Forcing checkout of upstream-repo/upstream. Branch upstream set up to track remote branch refs/remotes/upstream-repo/upstream. $ git branch * upstream $ ls wc -l 77
$ #git tag -s mdadm-2.6.3+200709292116+4450e59 4450e59 $ git checkout -b master mdadm-2.6.3+200709292116+4450e59 $ zcat ../mdadm_2.6.3+200709292116+4450e59-2.diff.gz git applyThe local tree is now "debianised", but Git does not know about the new and changed files, which you can verify with git-status. We will split the changes made by Debian's diff.gz across several branches.
$ git checkout -b upstream-patches mdadm-2.6.3+200709292116+4450e59 M Makefile M ReadMe.c M mdadm.8 M mdadm.conf.5 M mdassemble.8 M super1.c $ git add super1.c #444682 $ git commit -s # i now branch off master, but that's the same as 4450e59 actually # i just do it so i can make this point $ git checkout -b deb/conffile-location master $ git add Makefile ReadMe.c mdadm.8 mdadm.conf.5 mdassemble.8 $ git commit -s $ git checkout -b deb/initramfs master $ git add debian/initramfs/* $ git commit -s $ git checkout -b deb/docs master $ git add RAID5_versus_RAID10.txt md.txt rootraiddoc.97.html $ git commit -s # and finally, the ./debian/ directory: $ git checkout master $ chmod +x debian/rules $ git add debian $ git commit -s $ git branch deb/conffile-location deb/docs * master upstream upstream-patchesAt this time, we push our work so it won't get lost if, at this moment, aliens land on the house, or any other completely plausible event of apocalypse descends upon you. We'll push our work to git.debian.org (the origin, which is the default destination and thus needs not be specified) by using git-push --all, which conveniently pushes all local branches, thus including the upstream code; you may not want to push the upstream code, but I prefer it since it makes it easier to work with the repository, and since most of the objects are needed for the other branches anyway after all, we branched off the upstream branch. Specifying --tags instead of --all pushes tags instead of heads (branches); you couldn't have guessed that! See this thread if you (rightfully) think that one should be able to do this in a single command (which is not git push refs/heads/* refs/tags/*)
$ git push --all $ git push --tagsDone. Well, almost
$ git checkout -b build mdadm-2.6.3+200709292116+4450e59Now we're ready to build, and the following procedure should really be automated. I thus write it like a script, called poor-mans-gitbuild, which takes as optional argument the name of the (upstream) tag to use, defaulting to upstream (the tip):
#!/bin/sh set -eu git checkout master debver=$(dpkg-parsechangelog sed -ne 's,Version: ,,p') git checkout build git merge $ 1:-upstream git merge upstream-patches git merge master for b in $(git for-each-ref --format='%(refname)' refs/heads/deb/*); do git merge -- $b done git tag -s debian/$debver debuild # will ignore .git automatically git checkout masterNote how we are merging each branch in turn, instead of using the octopus merge strategy (which would create a commit with more than two parents) for reasons outlined in this post. An octopus-merge would actually work in our situation, but it will not always work, so better safe than sorry (although you could still achieve the same result). If you discover during the build that you forgot something, or the build script failed to run, just remove the tag, undo the merges, checkout the branch to which you need to commit to fix the issue, and then repeat the above build process:
$ git tag -d debian/$debver $ git checkout build $ git reset --hard upstream $ git checkout master $ editor debian/rules # or whatever $ git add debian/rules $ git commit -s $ poor-mans-gitbuildBefore you upload, it's a good idea to invoke gitk --all and verify that all goes according to plan:
$ git push origin build tag debian/2.6.3+200709292116+4450e59-3Now take your dog for a walk, or play outside, or do something else not involving a computer or entertainment device.
$ git checkout upstream-patches $ git-apply < patch-from-lunar.diff #444682 again $ git commit --author 'J r my Bobbio <lunar@debian.org>' -s # this should also be automated, see below $ git checkout master $ dch -i $ dpkg-parsechangelog sed -ne 's,Version: ,,p' 2.6.3+200709292116+4450e59-3 $ git commit -s debian/changelog $ poor-mans-gitbuild $ git push $ git push origin tag debian/2.6.3+200709292116+4450e59-3That first git-push may require a short explanation: without any arguments, git-push updates only the intersection of local and remote branches, so it would never push a new local branch (such as build above), but it updates all existing ones; thus, you cannot inadvertedly publish a local branch. Tags still need to be published explicitly.
$ git checkout -b tmp/start-arrays-rework masterUnfortunately (or fortunately), fixing this issue will require work on two branches, since the initramfs script and hook are maintained in a separate branch. There are (again) two ways in which we can (sensibly) approach this:
$ git merge master deb/initramfs $ editor debian/mdadm-raid # $ git commit -s debian/mdadm-raid $ editor debian/initramfs/script.local-top # $ git commit -s debian/initramfs/script.local-top [many hours of iteration pass ] [ until you are done] $ git checkout -b tmp/start-arrays-rework-init master # for each commit $c in tmp/start-arrays-rework # applicable to the master branch: $ git cherry-pick $c $ git checkout -b tmp/start-arrays-rework-initramfs deb/initramfs # for each commit $c in tmp/start-arrays-rework # applicable to the deb/initramfs branch: $ git cherry-pick $cThis is assuming that all your commits are logical units. If you find several commits which would better be bundled together into a single commit, this is the time to do it:
$ git cherry-pick --no-commit <commit7> $ git cherry-pick --no-commit <commit4> $ git cherry-pick --no-commit <commit5> $ git commit -sBefore we now merge this into the official branches, let me briefly intervene and introduce the concept of a fast-forward. Git will "fast-forward" a branch to a new tip if it decides that no merge is needed. In the above example, we branched a temporary branch (T) off the tip of an official branch (O) and then worked on the temporary one. If we now merge the temporary one into the official one, Git determines that it can actually squash the ancestry into a single line and push the official branch tip to the same ref as the temporary branch tip. In cheap (poor man's), ASCII notation:
- - - O >> merge T >> - - - = - - OT
- - T >> into O >>
This works because no new commits have been made on top of O (if there would
be any, we might be able to rebase, but let's not go there quite yet; rebasing
is how you shoot yourself in the foot with Git). Thus we can simply do the
following:
$ git checkout deb/initramfs $ git merge tmp/start-arrays-rework-initramfs $ git checkout master $ git merge tmp/start-arrays-rework-initand test/build/push the result. Or well, since you are not an mdadm maintainer (We^W I have open job positions! Applications welcome!), you'll want to submit your work as patches via email:
$ git format-patch -s -M origin/masterThis will create a number of files in the current directory, one corresponding for each commit you made since origin/master. Assuming each commit is a logical unit, you can now submit these to an email address. The --compose option lets you write an introductory message, which is optional:
$ git send-email --compose --to your@email.address <file1> <file2> < >Once you've verified that everything is alright, swap your email address for the bug number (or the pkg-mdadm-devel list address). Thanks (in advance) for your contribution! Of course, you may also be working on a feature that you want to go upstream, in which case you'd probably branch off upstream-patches (if it depends on a patch not yet in upstream's repository), or upstream (if it does not):
$ git checkout -b tmp/cool-feature upstream [ ]
$ git fetch upstream-repo $ git checkout upstream $ git merge upstream-repo/masterwe could just as well have executed git-pull, which with the default configuration would have done the same; however, I prefer to separate the process into fetching and merging. Now comes the point when many Git people think about rebasing. And in fact, rebasing is exactly what you should be doing, iff you're still working on an unpublished branch, such as the previous tmp/cool-feature off upstream. By rebasing your branch onto the updated upstream branch, you are making sure that your patch will apply cleanly when upstream tries it, because potential merge conflicts would be handled by you as part of the rebase, rather than by upstream:
$ git checkout tmp/cool-feature $ git rebase upstreamWhat rebasing does is quite simple actually: it takes every commit you made since you branched off the parent branch and records the diff and commit message. Then, for each diff/commit_message pair, it creates a new commit on top of the new parent branch tip, thus rewrites history, and orphans all your original commits. Thus, you should only do this if your branch has never been published or else you would leave people who cloned from your published branch with orphans.
If this still does not make sense, try it out: create a (source) repository, make a commit (with a meaningful commit message), branch B off the tip, make a commit on top of B (with a meaningful message), clone that repository and return to the source repository. There, checkout the master, make a commit (with a ), checkout B, rebase it onto the tip of master, make a commit (with a ), and now git-pull from the clone; use gitk to figure out what's going on.So you should almost never rebase a published branch, and since all your branches outside of the tmp/* namespace are published on git.debian.org, you should not rebase those. But then again, Pierre actually rebases a published branch in his workflow, and he does so with reason: his patches branch is just a collection of branches to go upstream, from which upstream cherry-picks or which upstream merges, but which no one tracks (or should be tracking). But we can't (or at least will not at this point) do this for our feature branches (though we could treat upstream-patches that way), so we have to merge. At first, it suffices to merge the new upstream into the long-living build branch, and to call poor-mans-gitbuild, but if you run into merge conflicts or find that upstream's changes affect the functionality contained in your feature branches, you need to actually fix those. For instance, let's say that upstream started providing md.txt (which I previously provided in the deb/docs branch), then I need to fix that branch:
$ git checkout deb/docs $ git rm md.txt $ git commit -sThat was easy, since I could evade the conflict. But what if upstream made a change to Makefile, which got in the way with my configuration file location change? Then I'd have to merge upstream into deb/conffile-location, resolve the conflicts, and commit the change:
$ git checkout deb/conffile-location $ git merge upstream CONFLICT! $ git-mergetool $ git commit -sWhen all conflicts have been resolved, I can prepare a new release, as before:
$ git checkout master $ dch -i $ dpkg-parsechangelog sed -ne 's,Version: ,,p' 2.6.3+200709292116+4450e59-3 # git commit -s debian/changelog $ poor-mans-gitbuild # git push $ git push origin tag debian/2.6.3+200709292116+4450e59-3Note that Git often appears smart about commits that percolated upstream: since upstream included the two commits in upstream-patches in his 2.6.4 release, my upstream-patches branch got effectively annihilated, and Git was smart enough to figure that out without a conflict. But before you rejoice, let it be told that this does not always work.
$ git checkout -b maint/lenny debian/2.7.6-1You might do this to celebrate the release, or you may wait until the need arises. We've already left the domain of reality ("lenny" is not yet released), so the following is just theory. Now, assume that a security bug is found in mdadm 2.7.6 after "lenny" was released. Upstream is already on mdadm 2.7.8 and commits deadbeef and c0ffee fix the security issue, then you'd cherry-pick them into the maint/lenny branch:
$ git checkout upstream $ git pull $ git checkout maint/lenny $ git cherry-pick deadbeef $ git cherry-pick c0ffeeIf there are no merge conflicts (which you'd resolve with git-mergetool), we can just go ahead to prepare the new package:
$ dch -i $ dpkg-parsechangelog sed -ne 's,Version: ,,p' 2.7.6-1lenny1 $ git commit -s debian/changelog $ poor-mans-gitbuild $ git push origin maint/lenny $ git push origin tag debian/2.7.6-1lenny1
SELinux is entirely correct about disallowing dynamic code generation, as it is a major security risk.
Disregarding Just-In-Time compilation, the main legitimate need for dynamic code generation is to support (downward) closures that are ABI-compatible with normal C functions. GCC’s local functions extension of C is one example, and many non-C languages need them badly in their foreign-function interfaces (Haskell is one, Ada I’m told is another).
A closure is a function pointer that refers to a function that is local to another function. That function has access to the local variables of the parent function, and this access is provided by having the caller give the callee a static link (a pointer to the parent function’s stack frame) as a hidden parameter. If the call is direct (that is, not through a function pointer), the caller knows the appropriate static link and can just pass it. The trouble comes with function pointers, as we need some way of including the static link in the function pointer.
The simplest way is to have function pointers be two words long; one of the words contains the classical function pointer (that is, the entry point address), and the other contains the static link. Unfortunately, the prevalent C ABIs, including the SYSV ABI used by GNU/Linux, mandate that function pointers are one word long. The only way I know to work around this is to dynamically generate, when the function pointer is created, a small snippet of code that loads the correct static link to the appropriate place and jumps to the actual code of the function, and use the address of this snippet (usually called a trampoline) as the function pointer. The snippet is generated on the stack or in the heap, and thus requires an executable stack or executable dynamic memory.
It’s time to fix the ABI to allow for proper two-word function pointers.
Now that through black magic, voodoo, and a working network driver I have
Avahi working on my NAS and UPnP working on my SoundBridge, I can
get back to the task of learning a bit about GUPnP, a GObject-based library for UPnP. My
first hack is a simple tool that pops up notification bubbles when the
currently playing track changes, and it was surprisingly easy.
First, wecreate a Control Point for the service we want to
control. This object will emit signals when devices on the network are
discovered which provide this service, so by connecting to that signal all
of the discovery is handled for us.
GUPnPContext *context = gupnp_context_new (NULL, NULL, 0, &error);
GUPnPControlPoint *cp = gupnp_control_point_new (context, "urn:schemas-upnp-org:service:AVTransport:1");
g_signal_connect (cp, "service-proxy-available",
G_CALLBACK (service_proxy_available_cb), NULL);
gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE);
Now in service_proxy_available_cb we are passed a Service
Proxy object to which represents a device providing the service we
asked for. Service proxies can have actions invoked on them,
or we can be notified when a State Variable change. There
is a state variable in AVTransport called CurrentTrackMetaData
but don't let that fool you: for reasons too boring to detail that doesn't
cause notifications. The only interesting state variable in AVTransport
is LastChange, which is basically a meta-variable which contains
the name and value of the last variable which changed. Madness, I agree.
This is where we come to the problem with GUPnP: it makes the protocol
seem so clean and simple that when warts like this become obvious, they
stand out.
Anyway, we want to listen for changes to the LastChange state
variable. This involves adding a notify and then subscribing to the proxy.
Luckily state variables emit their current value when we subscribe to
them, so we never need to fetch the current value.
static void
service_proxy_available_cb (GUPnPControlPoint *cp, GUPnPServiceProxy *proxy)
gupnp_service_proxy_add_notify (proxy, "LastChange",
G_TYPE_STRING, notify_cb, NULL);
gupnp_service_proxy_set_subscribed (proxy, TRUE);
Believe it or not, we're actually nearly finished. Now to implement
notify_cb. This is passed the variable name and a
GValue containing the new value. A basic implementation is
pretty simple.
static void
notify_cb (GUPnPServiceProxy *proxy,
const char *variable,
GValue *value,
gpointer user_data)
g_print ("%s changed to %s\n", variable, g_value_get_string (value));
And we're done! When the program starts it discovers any devices on the
network, creates proxies and watches the variables, printing them as they
change. Devices can come and go, GUPnP handles that automatically. Easy
as pie.
Well, sort of. The string is an XML document which could contain any
variable, so we need to parse it looking for a
CurrentTrackMetaData node. On that node the val
attribute contains an escaped XML document describing the metadata in the
(and I kid you not) DIDL-Lite format. The saving grace here
is that at least its partially Dublin Core, but that needs to be parsed
for the title and artist information. This is all standard XML mojo, and
quite boring. The end result is that my first hack application is 150
lines long, the first 100 of which are entirely devoted to XML parsing.
The next step is to write a convenience library around DIDL to avoid
having to parse it manually. It's not exactly a complicated task, but
quite tiresome.
For the curious, the full source is in this Bazaar branch.
NP: Directions EP, Variou (from Acroplane I think)
Next.