Search Results: "ag"

15 February 2008

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.

Andrew Pollock: [life] Worst. Recovery. Ever.

I wonder if things could go any worse if we actively tried? So despite going back to see the cardiologist on Monday afternoon, concerned about there possibly being still some sort of infection, and being told there wasn't, on Thursday morning, the top part of the incision was looking swollen. It looked even more so by the evening when I got home from work, and Sarah emailed a photo to the cardiologist, and he agreed it didn't look too crash hot, so he phoned a prescription for another, longer course of antibiotics through to the pharmacy, but too late to get filled last night. By bedtime it was looking even more ready to blow, and sure enough, around 1am (it's always 1am) it erupted everywhere. Fortunately (for me), I missed all the gory details, but I think there was a fair bit of fluid built up in there. So we went back to the clinic this morning, and they decided that they needed to open up part of the incision to let it drain and heal properly. They took another swab to run another culture, and then got a physician's assistant to take to her with a scalpel. I've seen my poor wife go through too many painful things in the last six months. Today's was no better. Most of the problem was the local anaesthetic injections, but watching them open up the incision again wasn't much fun either. No one should have to go through as much shit in a short time as what Sarah has had to. It's just not fair. She now has a gaping hole in her chest with some gauze packed in it, which has to be changed twice a day (by lucky old me). The idea is to let it heal from the bottom up, rather than the top down, as it seems an abscess had formed in the wound, and that was were all the trouble was. So by leaving it all open, it can drain properly, and heal from the bottom up. $DEITY only knows what sort of mess it's going to make of the incision area, but we can deal with that later. They reckon it'll take another 4-6 weeks to heal. I'm really hoping now that with it draining, and another course of antibiotics, Sarah will be in much less pain. I just did the evening gauze change. Fun. The opening in the incision is longer than I remembered them making this morning. It's about an inch long, and a centimetre deep, and there's a small hole in the bottom that presumably leads to the "interior". It's not as bad looking as I thought it might be. Packing the gauze in didn't seem to hurt Sarah too much, which is just as well. This really is the pits. I really hope this is the end of this, and the infection goes away for good, and the incision heals quickly. In terms of recovery, this is a pretty major setback in my opinion. From now on, we won't be relying on the cardiologist for surgical opinions, we'll be insisting a member of the surgical team checks Sarah out.

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
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!

Benjamin Mako Hill: Free Culture Elections

Recently, Students for Free Culture -- a non-profit organization dear to my heart -- elected its new board. Several months ago, the group voted to hold its elections using the same preferential election method system that Debian uses. To help make their election easier I agreed to support them with a new set of features in Selectricity aimed at more structured organizational decision-making. Currently Selectricity is more geared toward more informal QuickVotes. From a democratic and voting technology perspective, the election was a huge success. With 16 voters and 13 candidates, a traditional plurality or "first past the post" election would have been a poor match for their group -- the 16 first-place votes were very split among the candidates. The results also show one very polarizing candidate who won the plurality but was in the bottom third of most preferential rankings! The use of Selectricity helped SFC select a board who better represented the preference of their group than they would have otherwise. Exciting stuff! You can read more on the Free Culture website or on the Selectricity blog. Thanks are due both to the previous SFC board who took the risk on the technology and to all of the candidates and voters! I'm currently integrating feedback and improvements based on the SFC election and will open the feature up the public in the next couple weeks. If you want hear about this when it happens, you should subscribe to the Selectricity Blog or drop an email to team@selectricity.org.

Daniel Leidert: pbuilder and SUN Java

pbuilder with default settings will fail to build a package depending on sun-java5 or sun-java6, because the license needs to be accepted first. Now some time ago I saw a patch for pbuilder itself to “fix” this, but for the time beeing I used to set DEBIAN_FRONTEND to readline in my pbuilderrc. But today Michael Koch came up with much better suggestions: Preset the debconf value in the CHROOT and save it. It’s pretty easy:
$ sudo pbuilder login --save-after-login
# echo "sun-java5-jdk shared/accepted-sun-dlj-v1-1 boolean true"   debconf-set-selections
# echo "sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true"   debconf-set-selections
# exit
and voila, problem solved. Thanks to Michael for the tip.

Simon Richter: More building

I've gone over the design for "dammit" again, and I think I can even get away with non-specialised nodes for the various compilation tasks in the work tree, which will make support for additional input languages pluggable, an idea I tossed in the beginning for fear that it might not be doable. So I finally get to solve one thing I found annoying with automake. :-) The other big feature I'm excited about is having two different modes of importing stuff from libraries, with and without reexporting the ABI. Depending on that, any newly built library will incorporate the SONAME of the dependent library into its own, and its development package will depend on the other -dev package (obviously, for that to work, I'll have to add package building to it as well :-P )

Wouter Verhelst: ID papers

Bruce Schneier blogs about an issue that, in the context of the current vote craze in the US, seems to be pretty popular: the question of whether or not the US governments should give a drivers' license to illegal immigrants. Bruce argues in favour of giving a drivers' license to illegal immigrants, since requesting that the administration which issues drivers' licenses also check whether or not people are illegal immigrants is going to cost the government a lot of money (both from the extra amount of resources that needs to be spent on doing this job, and the lawsuits to make up for the errors). The fun bit is, I think that they are creating a problem where there is none. By not creating an official, designated, identification system, the US government is forcing people to look for alternatives, effectively giving a drivers' license a double function; that of an ID card, and that of a drivers' license. This can't be a good idea. Often the major argument against issuing ID cards is that it reduces people's privacy. I think this is wrong, for a very simple reason:
The US already has an ID card. It's called a drivers' license.
No, really. For all practical matters, that little piece of paper is an ID card. Better get done with it and issue a real ID card, then.

Simon Richter: erm

MJ Ray: Current Issues / Transport: if you tolerate this, then your green space will be next...

Looks like the Bristol Airport-M5 Link Road is in the news again.  See the Mercury news story

Meeting at Wrington on 26 February.  One of the proposed routes is through Wrington Vale.  It's disappointing that the shuttle bus services from Weston-super-Mare and Nailsea (both possible connections to the M5 and rail services from the south-west) are still pretty terrible and there seems to be few improvements in the airport's masterplan.  As a result, there's this demand for road-building and it looks like The Powers That Be may build the road instead of managing the demand.  Ouch.

In more positive transport news, there's lots of new cycle route improvements (parking, signs, bugfixes, bypasses and blessedly few new-build cycle farcilities) listed in http://www.n-somerset.gov.uk/cairo/docs/doc16354.htm

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: A Redway Question

Mrs Taylor asked:
"are the council allowed to reroute a redway or are they right of way and if so can you help me to prove that they are??"
I don't know. Do you? If no-one knows, I'd probably start by looking at the detailed OS maps for the area (which I think mark rights of way) and maybe make Freedom of Information Act requests for the order that established a particular redway. However, even if they are a right of way, a council could reroute it through the usual transport planning process, although a member of the public and any affected councillors should be able to speak against it at a hearing.

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.

Jeff Bailey: Time to talk...

Well, I guess it's time to talk.

I mentioned in my last post some back troubles. These aren't really news - I've had those for a long time. The news is the discovery in early January that there's some sort of growth / lesion / tumour on that spot causing me further problems now.

So I've been for tests. The MRI was a couple weeks ago. The CT scan earlier today. I have an angiogram tomorrow to map it further. The idea in my head was to wait until I had something interesting to tell people. A plan, knowledge, all the rest.

Well, I don't have that yet. But where two days ago, I was thinking that tomorrow was just a day of tests, it seems that as part of the angiogram an embolism is possible - that's where they try to cut off the blood supply to a tumour to make later surgery a bit easier. It carries risks. It carries a night in the ICU and another night in a ward. Surgery would need to follow within two weeks.

So I still have nothing to tell people. I'm used to being one of the ones with the answers handy. I'm obviously a bit nervous, but more in anticipation.

Thoughts and love are appreciated. We get started at 7am pacific.

14 February 2008

Sune Vuorela: this time of year again

/me++

Julian Andres Klode: Ubuntu: aufs with casper 1.118 / ndisgtk 0.8.1 / ndisgtk in main?


Colin Watson today uploaded casper 1.118, now supporting aufs. To use aufs in future Ubuntu disks built with casper 1.118 or newer, use union=aufs. Please test it. Another upload today was ndisgtk 0.8.1-1ubuntu1, bringing Ubuntu up-to-date with Debian and closing 3 bugs. BTW, I requested to include ndisgtk in main, see https://wiki.ubuntu.com/MainInclusionReportNdisgtk. Having ndisgtk on the Ubuntu disks would be very useful for users without linux network drivers available and without enough experiences to use ndiswrapper from the commandline.

Jordi Mallach: La Ruta del Carrilet

As Josep asks for it every now and then, and we really enjoyed this trip, it's time to write about the four days we spent cycling from Ripoll to Girona, through the Ruta del Carrilet, a Catalan via verda similar to the one we completed a year ago. I spent this year's 9 d'Octubre cycling trip with totally different trip mates, not related to my triathlon team. The extensive group was formed by Sabri, Mar, B rbara, Carles, Desi, Adela, N ria, Amador and myself. We started our journey by car from Val ncia to Mollet de Mar, where we parked the cars and take a regional train to Ripoll with our bikes, where the real journey would start.


Arrival at Ripoll When we got to Ripoll, it was quite late and dark, but we managed to find the start of the Ruta del Ferro rail trail which would take us to Sant Joan de les Abadesses. It was quite cold, but especially really humid, so we had to think twice before settling on a place to camp and setup our tents. We had to take special care of covering the bicycles as the air was really wet, and anything we left uncovered would appear soaking next morning. In part, my shoes suffered from this.

Early next morning we had breakfast on the wet grass and then started our way to Sant Joan through a deliciously well equipped and maintained cycling track, which unfortunately only lasts for 12 kilometres through a splendind landscape. After having breakfast in the old railway station in Sant Joan, we abandoned the Ruta del Ferro to take a road to Olot via Sant Pau de Seguries, where we had to climb a small mountain and then descend through the Vall de Bianya until we got to Olot.


Sant Joan de les Abadesses' railway station Asking the locals for the start of the Ruta del Carrilet was fun due to the strong oriental accent in the area and we sometimes wouldn't get a word of what we were told. An old man recommended us finding a big park in the outskirts of the town, where we prepared our entrepans for lunch, and after a little rest, we started cycling up the Carrilet, which would take us to Girona in two stages. This Catalan area is of volcanic origin, and there are several natural parks dedicated to the phenomenon. There are many mountains covered with forests and impossible peak shapes, which due to the time of the year were starting to go from green to brown and yellow, making fantastic colour schemes in the landscape.


Under a green ceiling in Olot Just after the few first kilometres, the railroad track starts to descend most of the way, which makes it easy for people who aren't too trained, and easier to enjoy your way chatting with people while you cycle. As we consumed the daylight, we came across a parish church party with lots of old and young people from the nearby town of Sant Miquel de Pineda. Amador and I were lagging behind a bit at that point, and when we got there, we found the rest of the group were already off their bikes and either having a curious look over the party, or directly following suit and dancing like the others. We had a peek into the small church and also into a small graveyard in the back, where I was surprised to find the enemies of my Catalan grandmother: Fam lia Matabosch , as one of the headstones revealed.


Partying at Sant Miquel de Pineda As it was getting late, we eventually started off again, but luckily B rbara spotted what seemed a good sleeping place for that night. To the right of the trail there was a hermitage (devoted to Santa Cec lia) up on the hill which, for bonus points, had a porch with a recently renewed roof which would help cover ourselves from humidity and rain, as we found soon after starting cooking dinner. While the cooks prepared our soup, some others went down to the Carrilet in order to find out if the next town was close so we could get some driking water for the dinner. Luckily, Sant Feliu was close enough, and we found a bar where we got some water... and two bottles of wine, which made some people back at the hermitage very happy. We were quite tired though, so we eventually went to sleep after reading some stories from a great tale book, with the sound of rain hitting the grass outside the porch. The rain was still with us when we started waking up, so we had breakfast and packed our stuff very slowly, in an attempt to avoid getting wet. But rain didn't stop, so we made a few hacks on our bicycle bagpacks to minimise the amount of rain wetting them. When we were finally ready to set off and had cycled around 3 kilometres under the light rain, it finally stopped raining, making the rest of the journey very pleasant.


Sleeping under the porch of Santa Cec lia's hermitage This part of the route is again quite beautiful, with impressive amounts of green vegetation at both sides of the track. There's a lot of water presence in the land, which makes the type of trees and bushes quite different to the ones we are used to find in the Valencian Country. After going by a few small towns, we arrived in the old railway station of Amer, hometown of the Puigdemonts. Even if it was a bit early, we decided to have lunch there, so a few of us went down to the centre of the town to buy bread and some other details to eat. Being in my friend Josep's town for the first time, I wanted to visit his family's bakery, but unfortunately it is closed on Mondays. We had lunch back at the cute station, and eventually kept going on our way to Girona. Outside Amer, the Carrilet was temporarily cut by the road, and there were two possible alternatives: using the road, with heavy lorry traffic, or diverting through a very steep track with very hard slopes. Most of the group preferred the road, but Mar, Amador and I went up that track, which was hard to climb and really fun to descend. Apparently, Amer locals call those 1.5 kilometres the Tourmalet . It's probably not so bad, though. :)


Amer's railway station Unfortunately, the Ruta del Carrilet starts getting uglier after Amer, and as you approach the more industrialised towns near the capital Girona. The area around Angl s wasn't that fun, with the track continuously being invaded by cars and other vehicles. Soon after we were in the farmland area surrounding Girona and its Devesa. Jonathan was waiting for us in the city, after his two month stay in Scotland, and we were all happy to meet him. We discarded continuing our way to the coast, which was the initial plan, and instead dropped our stuff in the house of one of Adela's friends, and went out to have dinner to a Wok restaurant, where the poor people running it suffered our childish behaviour involving the rotating central dish on our table and custard sucking contests. Jonathan guided us through the Cathedal and city wall areas of the town centre, which are impressive, and we climbed all of the wall towers to have great looks over the dark and quiet city. Eventually, we went to sleep, as Adela had to leave early, and we had to pack to get our train back to Barcelona. Back in Mollet, we cooked our last camping-gaz lunch in the park right next to the station, before noticing the place stinked of dog poo. After the careful operation of filling the three cars with 9 bicycles, we were finally on our way back to Val ncia, completing another great cycling journey. If you like bicycle tourism and can travel to this area in Catalonia, I highly recommend it, as there's many great places to visit, all of them accessible with bikes.


Having lunch in Mollet

Jose Luis Rivas Contreras: My new toy! Lenovo X61

Yay! I got my new toy two days ago but I wasn't able to install debian on it booting from USB with several versions, when I almost got it there was some issue with the ethernet driver (with sarge) or that didn't loaded the correct driver for detecting my hard drive or worst, with the hd-media, found an iso but didn't work out! Hehehe Anyway, I installed my system trough PXE with my old notebook serving as gateway so I got it! :D It runs smoothly and is the smaller notebook I could ever wish, plus the battery gives me 12h of energy so w00t!! I installed i386 instead of amd64 because of the java-browser plugin that I will use this semester and to get skype and all that. Is not that I will use larger archives and stuff so I will be ok by the moment. Later I will post the spec details, right now I will keep working on a project for my university. BTW, I installed directly sid :D

Steve Kemp: Listen to me when I'm telling you

So today I'm a little bit lazy and I've got the day off work. As my previous plan suggested I wanted to spend at least some of the day tackling semi-random bugs. Earlier I picked a victim: less. less rocks, and I use it daily. I even wrote an introduction to less once upon a time. So lets take a look at two bugs from the long-neglected pile. These two issues are basically the same: They seem like simple ones to fix, with the same root cause. Here's an example if you want to play along at home:
 cp /dev/null testing
 gzip testing
 zless testing.gz
What do you see? I see this:
"testing.gz" may be a binary file.  See it anyway? 
When I select "y" I see the raw binary of the compressed file. So, we can reproduce it. Now to see why it happens. /bin/zless comes from the gzip package and is a simple shell script:
#!/bin/sh
# snipped a lot of text
LESSOPEN=" gzip -cdfq -- %s"; export LESSOPEN
exec less "$@"
So what happens if we run that?
$ LESSOPEN=" gzip -cdfq -- ~/testing.gz" /usr/bin/less ~/testing.gz
"/home/skx/testing.gz" may be a binary file.  See it anyway? 
i.e. it fails in the same way. Interestingly this works just fine:
gzip -cdfq -- ~/testing.gz   less
So we've learnt something interesting and useful. We've learnt that when LESSOPEN is involved we get the bug. Which suggests we should "apt-get source less" and then "rgrep LESSOPEN ~/less-*/". Doing so reveals the following function in filename.c:
	public char *
open_altfile(filename, pf, pfd)
	char *filename;
	int *pf;
	void **pfd;
 
/* code to test whether $LESSOPEN is set, and attempt to run the 
   command if it is */
		/*
		 * Read one char to see if the pipe will produce any data.
		 * If it does, push the char back on the pipe.
		 */
		f = fileno(fd);
		SET_BINARY(f);
		if (read(f, &c, 1) != 1)
		 
			/*
			 * Pipe is empty.  This means there is no alt file.
			 */
			pclose(fd);
			return (NULL);
		 
		ch_ungetchar(c);
		*pfd = (void *) fd;
		*pf = f;
		return (save("-"));
That might not be digestible, but basically less runs the command specified in $LESSOPEN. If it may read a single character of output from that command it replaces the file it was going to read with the output of the command instead! (i.e. Here less failed to read a single character, because our gzipped file was zero-bytes long! So instead it reverted to showing the binary gzipped file.) So we have a solution: If we want this to work we merely remove the "read a single character test". I can't think of circumstance in which that would do the wrong thing, so I've submitted a patch to do that. Bug(s) fixed. Incidentally if you like these kind of "debuggin by example" posts, or hate them, do let me know. So I'll know whether to take notes next time or not..

MJ Ray: Sunsets, Bookmarks, Fighting Shadows, Conferences

I've replaced the top banner on my personal site with a sunset panorama taken from the other end of Sand Bay. Yes, it may look green and grassy, but it is Sand Bay. I've added a shared bookmarks RSS to my site, generated from the first subfolder in my Bookmarks Toolbar Folder by a daft shell script. I've put an old paper online. Fighting in the shadows: moles and activists is about how to keep an open group, but minimising the effectiveness of moles:-
"It does not matter whether an activist is a mole or not, as long as they work well for you. The mole may be working against you in secret, but they would probably work against you anyway. To be an effective mole, they have to do some helpful work in order to avoid detection. They are a resource that we would not have access to if they weren't a mole."
Finally, I've attended a few events recently, so the next few posts will probably be mostly conference reports.

Mart&iacute;n Ferrari: How to have a private APT configuration without being root

Say you're working on a Debian box for which you don't have root access, you need to get some source packages, but there is no deb-src lines (or not the ones you need) in /etc/apt/sources.list. So usually you will have to manually wget the files, after looking the exact location, and all that jazz. Today I found that APT can be configured to use a different sources.list file, and different directories for the package lists. Which is enough to make it work for downloading source packages. What you need to do is: $ mkdir apt
$ cp /etc/apt/sources.list apt/
$ vi apt/sources.list
# customise as needed
$ mkdir -p apt/lists/partial
$ cat > apt/apt.conf
Dir::Etc::SourceList "
home_dir/apt/sources.list"; # You need to use the full path
Dir::State::Lists "
home_dir/apt/lists";
^D
$ export APT_CONFIG=~/apt/apt.conf
$ apt-get update
...
$ apt-get source foo
After downloading the lists, it will complain about it not being able to lock the dpkg directory, but no need to worry. It will work perfectly. Tags: Planet Lugfi, Planet Debian

Next.

Previous.