Julien Valroff: Mini DebConf Paris 2010
- Debian and Ubuntu by Lucas Nussbaum
- Debian Quality Assurance by Lucas Nussbaum
- Latest features of dpkg-dev by Rapha l Hertzog
- Smart cards in Debian by Ludovic Rousseau
Story
I bought Xperia X10i this summer during DebConf10 in NYC, I loved this phone from very beginning however what bothered me was that it was still stuck on outdated Android 1.6. To get your own custom Android on it, wasn t quite possible because no one managed to hack bootloader even though some of the guys at XDA where getting pretty close.
Long story made short, Sony Ericsson has finally release their Android 2.1 update, but made it available only for Nordic region, they explained it all on their blog where they also sent a message for paranoid users as they called them. I thought, if I gave it all this time I can wait a little bit longer, but then one of my friends (@sahinovic) gave me a good pointer to go in right direction with using custom ROM, Nordic for example? So this is where I got my idea.
I want 2.1 update now!
Please note steps below will get you Android 2.1 update, but AFAIK you ll also lose your warranty
1. Root your phone
If you don t have your phone rooted, this can now be done in single click. Get X10 Root and follow instructions on screen.
2. Edit system/default.prop
Get Root Explorer, mount r/w (upper right corner), edit system/default.prop
Lines you re concentrating on are 1 and 3
Let s say they are:
ro.semc.version.cust=1237-0333 ro.product.name=X10_1237-0333Edit them to look like:
ro.semc.version.cust=1234-8465 ro.product.name=X10_1234-8465Save the file and it s gonna create automatic backup of original file. 3. Get the updates using SEUS Turn off your phone, launch SEUS, plugin in the USB cable while holding back button, SEUS is going to tell you have updates for your phone
Follow on screen instructions. Enjoy the update
Conclusion
X10 is a pretty sweet phone, but with it being so closed, it also closes a lot of doors to hacking it and playing with it, great example would be this update itself, since right now Android 2.1 update is an outdated one. However 2.1 update brings new life into it, just as it s a brand new phone, it s more responsive and much much faster. And do take a backup before this update, because I lost everything from my contacts to internet settings, but all files on my sd card remained intact.
If you want to discuss anything regarding this topic please do so in comment area below or find me on Twitter.
Closing advice: beside some last minute legwork, I did
essentially nothing to organize this mini-DebConf, your kudos
should be better directed to Carl Chenet
and Mehdi
Dogguy for the organization. Other gifts such as bug
fixes can be directed to the speakers, sponsors, and loads of other
helpers from Debian France
and not in particular Xavier Oswald, Valessio Brito, Tanguy Ortolo,
Nattie Mayer-Hutchings, Luca Capello, Stephane Glondu, and others
which surely I'm forgetting to mention here (sorry about that).
Kudos folks ... let's do it again next year! (SCNR)
I m experiencing since some time (out of the blue) spontaneous reboots of some of my dom0s on lenny/i386 (others don t have this effect). As result of this, I started rolling out linux-image-2.6.32-bpo.5-xen-686 from bpo and backported xen and xen-common from testing:
# dpkg -l grep xen grep bpo
ii libxenstore3.0 4.0.1-1~bpo50+1 Xenstore communications library for Xen
ii linux-image-2.6.32-bpo.5-xen-686 2.6.32-26~bpo50+1 Linux 2.6.32 for modern PCs, Xen dom0 suppor
ii xen-hypervisor-4.0-i386 4.0.1-1~bpo50+1 The Xen Hypervisor on i386
ii xen-linux-system-2.6.32-bpo.5-xen-686 2.6.32-26~bpo50+1 Xen system with Linux 2.6.32 on modern PCs (
ii xen-tools 4.1-1~bpo50+1 Tools to manage Debian XEN virtual servers
ii xen-utils-4.0 4.0.1-1~bpo50+1 XEN administrative tools
ii xen-utils-common 4.0.0-1~bpo50+1 XEN administrative tools common files
ii xenstore-utils 4.0.1-1~bpo50+1 Xenstore utilities for Xen
This fixed the problem of spontaneous reboots for all of the systems I have migrated . until now! Last week I tried this solution on my private system and it failed in some way.

A full dump of the syslog is also available. It looks like /etc/rcS.d/S03udev is hanging in some way .. the syslog for this looks like:
Oct 29 20:51:07 mordor kernel: [ 17.728120] Code: 04 00 00 00 00 83 3c 24 10 74 32 77 0c 83 3c 24 08 0f 85 9f 00 00 00 eb 12 83 3c 24 20 74 30 83 3c 24 40 0f 85 8d 00 00 00 eb 35 <0f> b6 01 8b 54 24 20 89 02 c7 42 04 00 00 00 00 eb 79 0f b7 01
Oct 29 20:51:07 mordor kernel: [ 17.731554] EIP: [<c1184d4c>] acpi_ex_system_memory_space_handler+0 189/0 221 SS:ESP 0069:ec135d74
Oct 29 20:51:07 mordor kernel: [ 17.731791] CR2: 00000000eda86000
Oct 29 20:51:07 mordor kernel: [ 17.731881] [ end trace 7b8af581772a1c55 ]
Oct 29 20:51:07 mordor kernel: [ 18.116622] input: PC Speaker as /devices/platform/pcspkr/input/input6
Oct 29 20:51:07 mordor kernel: [ 18.427607] Error: Driver pcspkr is already registered, aborting
Oct 29 20:51:07 mordor kernel: [ 232.381814] Adding 10000452k swap on /dev/sda2. Priority:-1 extents:1 across:10000452k
The dom0 is there hanging in some way I don t have an exact way to get the system proceed from there usually I need to wait some seconds and pressing ^C after a while will get the box up.
Anyways I remember there are some problems with udev >= 150 and older kernels, which is also documented in the squeeze release notes. Maybe there is also a problem with older udev and newer kernels? But why is this combination working on other systems? Booting linux-image-2.6.32-bpo.5-686 works without any issue anyways, so it seems xen related. Any idea is appreciated!
UPDATE: I ve also reported this via #602109.
It turns out that pdfedit is pretty good at extracting text from pdf
files. Here is a script I wrote to do that in batch mode.
#!/bin/sh # Print the text from a pdf document on stdout # Copyright: (c) 2006-2010 PDFedit team <http://sourceforge.net/projects/pdfedit> # Copyright: (c) 2010, David Bremner <david@tethera.net> # Licensed under version 2 or later of the GNU GPL set -e if [ $# -lt 1 ]; then echo usage: $0 file [pageSep] exit 1 fi #!/bin/sh # Print the text from a pdf document on stdout # Copyright: 2006-2010 PDFedit team <http://sourceforge.net/projects/pdfedit> # Copyright: 2010, David Bremner <david@tethera.net> # Licensed under version 2 or later of the GNU GPL set -e if [ $# -lt 1 ]; then echo usage: $0 file [pageSep] exit 1 fi /usr/bin/pdfedit -console -eval ' function onConsoleStart() var inName = takeParameter(); var pageSep = takeParameter(); var doc = loadPdf(inName,false); pages=doc.getPageCount(); for (i=1;i<=pages;i++) pg=doc.getPage(i); text=pg.getText(); print(text); print("\n"); print(pageSep); ' $1 $2Yeah, I wish
#!/usr/bin/pdfedit worked too. Thanks to Aaron M Ucko for pointing out that
-eval could replace the use of a temporary file.
Oh, and pdfedit will be even better when the authors release a new version that fixes truncating wide text
Today I forgetfully left my USB drive at home when I took off for a night
at the yurt. This has happened before and generally involves staring at
an scp for rather too long, probably getting low on battery power in the
process, and is followed by not quite having files in the places I expect
and forgetting to delete them from my small laptop SSD later.
With git-annex those annoyances can go
away.
So I wanted a couple of gigabytes of files that were left at home behind a
slightly slow link. Rather than scp them to my laptop for several hours, I
just did a quick ssh into a server, and browsed through my stuff there,
running git annex get $foo & on files and directories I wanted.
Then went to eat dinner and play board games while the content was
scped across the slow link from home.
Now I can quickly download it all to my laptop from that fast server (named
"finch"), like this:
git pull
git annex move . --from finch
That removes the data from the server too, freeing its space back up
for next time. And the files are in their regular places on my laptop,
automatically. And I can simply git annex drop . when I need that
space back without worrying about losing any data.
(Hmm, this feels a little bit like it did to switch from doing everything
by hand with dpkg to using apt-get..)
I disabled my Facebook account about a month ago. See the
blog post when I started my Facebook hiatus for the reasons.
Now, almost one month into my hiatus, I must say that it has been
surprisingly easy. While I do think I probably missed some interesting things
my friends are doing (or maybe even did not get invited to some parties; a lot
of things are Facebook-only nowadays, unfortunately) I do have the impression
that I have much more spare time and that I'm more productive.
To my most important friends (in particular my girlfriend of course) I've
been keeping my contact out of Facebook anyway, so I didn't lose anything
there.
So essentially I'm continuing my Facebook hiatus for an indefinite amount
of time. I just wonder how to inform my Facebook friends that are expecting
my back anytime soon ... and I do hope they'll at some point realize that
some of their friends are not on Facebook by choice, but still deserve to be
invited to parties and such.
Another month ending and you still have some clicks left on flattr.com? How about these then?
So the four days are up. What do I have to show for it? Well I am declaring victory because S.Y.T.Y.C.D...OMG? is playable. There is a long way to go before one would actually want to play it though.
I had to take out doors, AI, the level boss and levels for that matter. FOV is kind of erratic. But you can fight, take, and quaff things and the dungeon is nicely laid out (except for doors.) So that's good for something right? I will add all the other good stuff as time passes.
Three thousand lines of code is not a huge program, but it is enough
to get a pretty good feel for a language. Now that I've completed my
first real Haskell program I feel that I've gotten over several
of the humps in the learning curve and am starting to get a good feel
for it.
Actually, I've written closer to five thousand lines, since there were
several big refactorings. One was when I stopped manually threading my
program state around and added a StateT monad. I did know from the
beginning I would need one, but it seemed easier and a better learning
exercise to let the program start out with a vesigial tail and gills
before growing up into a modern Haskell program. (I suppose it's still
written in baby-Haskell, really..)
Another refactoring came when I realized I needed to use a custom data
type, not String, to represent keys. That was a great experience in
type-based refactoring. Being able to keep typing ':make' and landing
on the next bit of code that needed fixing was great, and simply adding
that one type exposed several non-obvious bugs.
I found myself writing code that is much more solid and reusable than
normally comes easily. And yet it's also very malleable. Actually,
pulling out better data types and abstractions can get a bit addictive.
When I realized that I had a similar three-stage control flow being
used for each of git-annex's subcommands, and factored that
control flow out into a function that used the 3 data types below, I felt
I'd gone down that rabbit hole perhaps far enough for now.
type SubCmdStart = String -> Annex (Maybe SubCmdPerform)
type SubCmdPerform = Annex (Maybe SubCmdCleanup)
type SubCmdCleanup = Annex Bool
(That will allow for some nice parallelism later though, and removed dozens
of lines of code, so was worth it.)
Since git-annex is a very
Real World Haskell type program,
there is a lot of impure code in it. I could probably do better at
factoring out more pure code. I count 117 impure functions, and only
37 pure.
Anyhow, from my perspective of a long-time perl programmer, some
other random impressions..
ghc --make is handy, but every time it spits out a new 13 mb executable
I can feel my laptop's SSD groan!man to get at mutiple books worth
of detailed documentation for perl, and work easily offline or with
limited bandwidth. With Haskell, I spend much more time searching online for
documentation than I an comfortable with (although Hoogle
is pretty neat). And the haddock-produced documentation is often pretty
sketchy. The saving grace is that the source to any library function is
a click away, and tends to be very readable.mkdir, chmod, rename, etc. In Haskell, there is a Windows
smell to the names, like createDirectoryIfMissing and setPermissions.
And there are pointless distinctions like renameFile vs renameDirectory.
These long names are not memorable and I have to look them up every time.
Most of POSIX is available, but it's scattered amoung many disparate
libraries, and I can't find an interface for sysconf(3) at all. There
is a certian temptation, that I am so far resisting, to make a library
for C/perl refugees that exports the sane Unix names for everything.if ($flag foo && length $l = <>)vs
foo <- getFlag "foo"
l <- getLine
if (foo && not $ null l)
then do
When writing lots of impure code, that got old, and while I could use
ifM, or make up some other similar thing, its syntax would also
be somewhat clumsy.error $ "foo: " ++ (show bar) or return $ Just $ ...
(Still a lot better than Scheme thanks to $!)
First there was mr, then etckeeper. Now
git-annex completes my triptych of
software tools that use git in ways that were
never intended.
Git's original tagline was "the stupid content tracker". Git-annex inverts
that, by managing files with git, without checking their contents into git.
While that may seem paradoxical, it is useful when dealing with files larger
than git can currently easily handle, whether due to limitations in memory,
checksumming time, or disk space.
I've been working on git-annex for two weeks, and have been trusting my
data to it for a week. Not a little data, but terabytes spread amoung
multiple archival drives, file servers, laptops, and portable USB drives.
In situations too complex for unison or rsync to be of much use. Applying
git to this problem in an unconventional way has simplified things
enormously.
At this point it should be very usable, and solid. A package will be
uploaded to Debian shortly; or
git clone it.
First there was mr, then etckeeper. Now
git-annex completes my triptych of
software tools that use git in ways that were
never intended.
Git's original tagline was "the stupid content tracker". Git-annex inverts
that, by managing files with git, without checking their contents into git.
While that may seem paradoxical, it is useful when dealing with files larger
than git can currently easily handle, whether due to limitations in memory,
checksumming time, or disk space.
I've been working on git-annex for two weeks, and have been trusting my
data to it for a week. Not a little data, but terabytes spread amoung
multiple archival drives, file servers, laptops, and portable USB drives.
In situations too complex for unison or rsync to be of much use. Applying
git to this problem in an unconventional way has simplified things
enormously.
At this point it should be very usable, and solid. A package will be
uploaded to Debian shortly; or
git clone it.
#include <stdio.h> #define len 1000000000L unsigned long f(unsigned long a, unsigned long b) __attribute__((noinline)); int main() printf("%lu\n", f(0, 2*len)); return 0; unsigned long f(unsigned long a, unsigned long b) unsigned long sum = 0; for (; a < b; a++) sum += a; return sum;Now, I would be interested to see what s happening here. I took a look at the assembler code both compilers create, but the only thing I found out so far is that gcc s assembly is easier to understand 50 lines (gcc) vs 134 lines (clang). If someone knows the answer, please tell me. Also see http://lwn.net/Articles/411776/ for a C++ version that calls
f() via boost::thread.
Update: I also reported a bug at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46186.
As requested by our beloved leader, here s my report on this year s Google Summer of Code 2010 Mentor Summit. The summit took place in Google s HQ in Mountain View, California and was what they call an unconference . In the beginning of the unconference the attendees had 10 minutes to write down proposals for a session and put them on a huge white board. After that, every attendee voted for the sessions in which he was interested by putting a small sticker on the proposal. This way we could evaluate the interest on a specific topic and schedule the sessions to the differently sized rooms according to their interest. Neat trick!
The the rest of the summit was basically like a conference: we had 11 tracks filled with 5-6 sessions per day, which ran from 10:00 to 17:30. Google provided shuttle buses from our wonderful hotel to the googleplex in the morning and back to the hotel in the evening. The hotel was very nice, it was equipped a swimming pool and a hot tub (both outside), which was extensively used in the morning and of course during the night. Speaking of the night, Google sponsored Thai food in the first night and ye olde Pizza and Beer in the second. Some of the attendees brought their keyboard, guitar, bass and electric clarinet, and where playing some sweet ass Jazz and Pop (on special request ).
The sessions itself where not quite what I expected. I expected some proper talks about specific topics, but it was more like and open discussion round where everyone was invited to participate. For some topics it worked pretty well, for others not. It was still totally worth coming, since you meet a lot of like minded people and there is plenty stuff to talk about.
Of course I was very exited to see the googleplex. And the rumors are true: the googleplex seems to be a very nice place to work. They provide free breakfast, lunch and dinner for their employees. They have micro kitchens everywhere where you can grab free snacks and beverages. There are lot s of toys lying around, they have bicycles everywhere on the campus which you can just grab to move from one building to another. There is a dinosaur on the yard, a spaceship over the stairwell and lots of other things (testing on the toilet, anyone?), and we have probably only seen a small fraction, since we were not allowed to leave the restricted areas for the unconference.
Despite the horrible yet lag (leaving Germany on Friday morning and leaving San Francisco on Sunday night), I m glad I was able to attend to the summit and can only recommend aspiring mentors and students to participate to the next summer of code!

Email. We get a lot of it. We filter out the SPAM. Then if we're well-organized we file it away into folders as it arrives. (To be fair some people use priority settings such that all mail stays in their INBOX until they're "done" with it. I've never had the patience for that kind of behaviour.)
One problem which I often encounter is wanting to have email be delivered, archived, and stored, but I don't want to read it. Yet when I see a folder in my mail client which has unread mail in it I cannot unsee.
In my case I deliver mail to folders as it arrives via either Exim's filter language, or procmail. Procmail blows goats on the whole, but it is common and available everywhere - I just don't trust my own DSL enough to rely upon it (which is a dangerous sign).
So, how do you deliver a new mail to a Maildir folder, and mark it read at the same time? Well you can be na ve and do what I did which is to invoke formail to add "Status: ro" to the header. Unfortunately that's insufficient to mark a mail as read when viewed in mutt.
When an email is stored in a Maildir folder its status is encoded in part of its filename - which is why you'll have files like:
new/1288039894.28406_3.steve.org.uk cur/1283711971.11157_3.skx.xen-hosting.net:2,SThe latter file has been Seen. So to mark a message as not-new you need to do two things:
:0 *^(To: From:).*root@ *^X-added-header:.*debian-administration.org ~/bin/read-to-maildir .machines.debian-administration.org/Similarly you can use Exim's filter language to do the same job:
# Exim filter
if $h_to: contains "hostmaster@" then
pipe "/home/skx/bin/read-to-maildir /home/steve/Maildir/.hostmaster/"
finish
Cute. Obvious too? Maybe not to me.
ObSubject: Why did you murder someone, Raymond? - In Bruges
I don't believe in bottled water. The reason for that should be
obvious to anyone who thinks about it for more than just a second, but
in case you can't figure it out:bottled water
sucks.
Since I moved out on my own, now over two years ago, I haven't bought
the slightest amount of water other than through the tap. This wasn't a
conscious decision, originally; it's just that I'm not a fan of
non-sparkling water, and that buying 1.5L bottles of sparkling water
would quickly reduce to non-sparkling ones by the rate I drink it, and I
just didn't think it worth buying for that reason. As I came to realize
that tap water is a fine beverage, and that for all practical purposes
it is free or mostly so, compared to bottled water I stopped
even considering the idea to buy bottled water.
But I do still like sparkling water every once in a while; and this
weekend, I remembered that about a decade ago, an acquaintance who
worked for Philips had shown me a
prototype apparatus to generate sparkling water out of plain water in
approximately 1L quantities. It was a prototype then, so I could imagine
it being a product today. Googling around for a while found no Philips
product of that type; but then I did find another company that specializes in
such devices. Their devices are fairly cheap (or, at the very least,
affordable). And the best part: it doesn't even require electricity
(contrary to that prototype device I saw so many years ago).
One is on its way now. Wonder what it'll be like.
Kanzepharaz of the one thousand and eight spires. Kanzepharaz capital of the Empire of K'thorv and since the succesful end to the war that led to the annihilation of the Pleiadic Oligarchy in K'threl, the richest and most splendid city in the Middle World. Kanzepheraz whose real estate prices have soared e'en beyond the calculation of the rainbow abacus of Thobis Himself.
Anathomelis, a princeling of the Imperial Clan needs a location for his new and expanded orgy dome. Yet the only available and affordable on a seventh rank civil allowance place left in the city of one thousand and eight spires is the tomb of Pharaz the First and Subsequent, lich-emperor of the Jerelite dynasty and his eldritch retainers. Before the construction-serfs can move in, the tomb must be cleared of its unshriven and non-rent-paying denizens.
As His Principalities' chief swordbearer it has fallen to you to make the tomb of Pharaz safe for gentrification. Treasures and honors await you if you succeed. Aeons of torment in the Planes of Unlife await you if you fail.
WILL YOU RISE TO THE CHALLENGE?
rec.games.roguelike.development is having another challenge, this time to complete a roguelike game in four days. My previous attempt to write one in seven days was a failure but as I can build upon my previous work, I think I can make it this time.
This time I did not waste lots of time thinking of a name. S.Y.T.Y.C.D...OMG? and The Real Housewives of Mordor were the only ones under serious consideration.
With that crucial task out of the way, I spent the morning ripping code out of A.L.F. wherever possible. In the afternoon, I looked into dungeon generation.
My previous experiments with this sort of thing were pretty convoluted but now I think I have a simpler algorithm which still provides a random yet plausible-looking map. It basically goes like this:
Dear Gnome people. Is there a reliable way to right-attach panel applets?
May laptop screen and my external monitor have different resolutions, and I
havn't found a reliable way (except making two panels) of getting some of my
applets to stick to the right. I usually keep my launchers on the left, while
vairous system status icons on the right part. But when switching to a higher
resolution, at most one will move to the right end of the panel at the new
resolition, while the others just stay in place (i.e. left-attached at a given
pixel position).
There are so many smart layout managers, GTK pretty much always uses flexible
layout managers, why is the Gnome panel relying pixel offsets?
It has been suggested to me a couple of times that I could achieve this
via gconf. However, since the gconf changes are not reflected at runtime but
frequently overwritten I did not get this to work reliably even just for two
applets.
Thank you. If you have any comments, please email me via erich () debian org.
On a side note, this is also the first true post to my new blog. :-)
Next.