Upgrading the local version of subversion against a large subversion repository has so far taken three DAYS. It goes through this multi-gigabyte repository in no perceivable order, it goes through every single directory in every single tag and every single branch and refuses to run in any sub-directory. (Even after clearing out some older tags, the tags/ directory is still nearly 8Gb and that doesn't include any binary files.) Each tag within tags/ is 500Mb and contains nearly 6000 sub-directories. Yes, it's large but svn upgrade should still be able to handle it without crippling every machine. subversion 1.7.5-1
Updated 22/06/2012: Reference to Canonical's response
I have an interesting problem: How do I shoehorn "hired by The Internet for
a full year to work on Free Software" into my resume?
Yes, the git-annex Kickstarter
went well. :) I had asked for enough to get by for three months. Multiple
people thought I should instead work on it for a full year and really do
the idea justice. Jason Scott was especially
enthusiastic about this idea.
So I added new goals and eventually it got there.
Don Marti thinks the success of my Kickstarter
validates crowdfunding for Free Software.
Hard to say; this is not the first Free Software to be funded on
Kickstarter. Remember Diaspora?
Here's what I think worked to make this a success:
git annex watch command that automatically
commits changes to git, will be in the next release of git-annex.
I can already tell this is going to be a year of hard work, difficult
problems, and great results. Thank you for helping make it happen.
I will sound monothematic, but I have been devoting quite a bit of work to this topic lately: Trying to stop the advance of e-voting in Mexico, Latin America and the world.
Why trying to stop it? Isn't technology supposed to help us, to get trustable processes? Yes, it's supposed to... but it just cannot achieve it, no matter how hard it is tried I won't get into explanations in this blog post, but there is plenty of information. Feel free to ask me for further details.
Anyway Yesterday (Sunday, 2012-06-17) was the fifth simulated voting that will lead to the first wide-scale deployment of electronic voting booths in my country: About 10% of the population of the state of Jalisco (that means, ~500,000 people) will cast their votes on July 1st electronically.
This particular case illustrates how simulated votings can be used to forge a lie: Pounce Consulting, the company that won the e-voting project for IEPC (Jalisco's voting authority), delivered their booths over 40 days late, just before the deadline for the project to be canceled. Oh, and by the way, it's the same company that just failed to deliver on time for another planned local authority (10% of the booths in the Federal District, where I live, where fortunately 100% of the votes will be cast on traditional, auditable and cheap paper).
After this delay, five voting simulations were programmed, to get the local population acquinted with them. The first ones just failed to get the population's interest and had close to 40% failure rates (mainly regarding transmission). Several other "minor details" were reported, including mechanical details that allowed subsequent voters to see the vote of who had just left.
Anyway, making long story short: The fifth and last simulation was held yesterday. Officially, it was finally successful (about time). As these booths include the "facilities" to communicate the results via the cellular network, but the populations where they are to be deployed do not yet have cellular coverage, 10% of the booths will have to be carried back to the Districtal Header (that can be a ~10hr trip) to be counted. Also, in all places, traditional paper stationery and paraphernalia will be printed just in case it is needed (and when will they now? When half of the votes are cast and lost?)
Anyway... e-voting is still in its first stage in Mexico. Right now, I'm sure, no attempts to rig the election will be made (centrally). But every effort will be made (as it has been made) to dismiss the obviously big and nontrivial ways it has failed and will fail, and any problems will be labeled as "minor". And probably by 2018 we will be facing many more states (even nationwide) deployments.
But propaganda fails to see the obvious: E-voting is more expensive, more complicated, leads to more possible failure states. E-voting should not be deployed in large-scale (i.e. more than a couple of hundred voters) elections. Electronic voting is insecure, violates secrecy, allows for fraud. No matter how many locks are put into it.
A copy of this post is sent to
soc-coordination@lists.alioth.debian.org
as well as to
debian-bootstrap@lists.mister-muffin.de.
Diary
June 4
I added the first version of basenocycles.ml to git. Given an initial set of
cross built packages, it tries to compile as much as possible on the resulting
system in multiple rounds.
June 5
During June 3, I discovered and error in my program that would only come up
when using the Debian Sid package lists as the input:
Fatal error: exception Assert_failure("common/edosSolver.ml", 610, 11)
On this day, June 5, I wrote a minimal test case for this problem.
The same day, Pietro figured out that this is a bug in dose which will be
fixed in the next release.
Begin writing code to figure out how important a binary package is for the
further build process.
Try to use Depsolver.edos_install to find out what packages are needed to make
debhelper available.
Restructure basenocycles.ml, exclude source packages that already have been
built, still trouble with already existing binary packages and
Cudf.mem_installed, comment stuff better.
June 6
I wrote some crude code (only estimate, not correct, fixed later) that would
give a rough overview of how often a given binary package is directly required
as a build dependency.
Debhelper came out as the most needed package. It is architecture:all, so it
does not have to be built but it has unfulfilled runtime dependencies. To make
those packages available, 13 (actually 11, fixed later) packages have to be
compiled on Ubuntu Natty. But those packages all (except gettext) require
debhelper itself to be built. The first dependency cycle.
This dependency cycle (actually, the 12 cycles) can be broken by either cross
compiling those source packages or by making them build without debhelper. One
goal of the program is to help decide what the easier option is, but this is
not yet implemented.
To play around a bit, I created the possibility to specify a list of packages
that are additionally to the minimal set of cross compiled packages also cross
compiled. I added the 13 packages found above to the list, thus making the
binary packages they build available. This made debhelper available in the
system.
As a result, 1625 out of 3339 source packages can be built with just a minimal
build system (priority:essential packages plus build-essential) and debhelper
available.
The next package that blocks the most other source packages from being built is
cdbs. The next nine packages in that list also require cdbs so it seems to be
the next important package to be available.
Pietro's suggestions make me:
- do not open BootstrapCommon but ExtLib, Common, Algo, Debian
- do proper option parsing and logging
- use Debcudf.ignore_essential = true
- do Debcudf.init_tables (binlist@srclist)
- use @ with shorter list first
- use more List.rev_append instead of @
- use CudfAdd.who_provides to find if a package is available
June 7
Pietro and Patrick suggest that for solving the debhelper cycles, one
could provide a minimal debhelper version so that the above list of 12 packages
can be built without debhelper.
I try to figure out how to get a list of packages that are missing to make a
package installable/buildable. This functionality should be provided in dose
but I fail to find it.
June 8
Lacking a solution of the problem of June 7, I write a mail to Pietro.
I start my first graphs in ocaml using the ocamlgraph library.
The graph I generate, starts off at a binary package. For each binary package
it connects new vertices as its runtime dependencies. If a binary package is
not arch:all and also not yet otherwise compiled, its source package is also
added.
The result is a graph in which set of source packages in it will make the
initial package available, if those source packages would be cross compiled.
The graph is extended further than the source packages.
June 9
I refine a couple of functions, make univ_get_pkg_by_name return the package
with the highest version number.
I wrote a rather lengthy (1027 words) email to the list that explains my
status as of this day.
I can create graphviz dot files with ocaml, can create node and edge types and
create the graph by an imperative pattern that I saw a lot in Pietro's code.
Disjunctions are not yet handled correctly (see mail from June 8).
The graphs generated look like the following:
http://mister-muffin.de/p/8nyc.png
June 11
I write a test case which shows how CudfAdd.who_provides doesnt find
virtual packages.
Automate the process of finding the packages that, if cross compiled, would
make another package available.
Add more predicates (identifying source packages) and improve input file
reading code.
Move build_compile_rounds which compiles as many source packages as it can in
multiple rounds on a given minimal system a toplevel function and thereby
abstract it more.
Create a rudimentary text based menu to choose different actions to take for an
analysis.
Start writing an extended version of simple_dependency_graph for deeper
analysis.
Use xdot to show graphs from the text menu. Allow saving those graphs to a
file.
June 12
Move functionality from the extended version of simple_dependency_graph over to
the normal version and delete the extended version.
Add the new Closure vertex type.
Create extended_dependency_graph which is supposed to not contain single binary
package vertices but handle a package and its installation set as one vertex.
The output of extended_dependency_graph is optionally reduced to the biggest
(non degenerate) strongly connected component.
User gets the option of choosing the exploration depth.
June 13
Pietro replies to my mail from June 8 but apparently I failed to express
myself well enough in my last mail, so I rephrase my question.
Pietro replies to my email from June 11 and explains how the effect I see
is due to "a nuisance of the debian to cudf encoding". As a result I change my
code accordingly.
June 14
Another lengthy (1130 words) email to the list. I explain what was done
in the past days, what parts work and how they work. I list some rationales on
why I did things the way I did them.
The most important observation is, that after improving my code again and
again, I ended up representing the dependency cycle problem in the same (very
similar) way that Pietro suggested in the beginning. This is probably a good
discovery.
Lots of data of that email is now of only little use as of June 16, I make lots
of improvements in correctness.
As I dont have an answer to my other email to Pietro from June 13, I implement
a very crude way to get an answer to the question of what packages are missing
for a package to be available/compileable. I called it
flatten_vpkgformula_best_effort and it suffers from many faults including
disjunctions and package conflicts.
Patrick spots a problem. As a result, I make sure that at no point, the source
package of an arch:all package can be listed.
June 15
As a reply to my mail from June 13, Pietro creates a new branch in the git and
adds the code I needed to get a proper installation set.
June 16
As a result of Pietro's efforts from June 15, I make great advancements
on all fronts.
Details of the current status follow in the next section.
Results
A big leap was made on June 16 due to Pietro's great help on making me
understand how Depsolver.listcheck can be used for my purposes. My difficulties
in finding the solution myself are rooted in many parts of the dose framework
being poorly commented but Pietro did already a couple of documentation commits
whenever things were unclear for me.
Using Depsolver.listcheck makes it possible to be more distribution agnostic
and I dont have to handle vpkgs, virtual packages and constraints myself
anymore. The code also doesnt suffer anymore by wrongly analyzed dependencies
and conflicts. The only thing that is not yet taken care of, is that
Depsolver.listcheck only chooses one out of several possible installation set.
A final version should be able to take into account that a different
installation set could provide a better solution.
Overall, in comparison to two weeks ago, I can now properly build, traverse and
analyze graphs, can choose an installation set properly, understand more about
dependencies, closures, dose and ocaml in general.
Finding the importance of binary packages for building
When calculating how many source packages are depending on the
availability of a binary package I originally flattened the
pkg.Cudf.depends list twice for a rough overview. This is of course
wrong due to disjunctions and conflicts and also doesnt provide a deep
dependency inspection. The new method is to calculate an installation
set that is necessary to compile a source package for every source
package. The resulting list of binary packages is then used to find out
how often a binary package appears in an installation set.
I see three drawbacks though:
I made it..:-)
Despite quite horrible weather conditions (heavy rain before the race,
strong rain during the first 1/2h, light rain up to
half-marathon....and wind during the first 25 kilometers), I managed
to break my personal best in a marathon, down to 3h38'45".
Not a huge improvement (1'35") but, given that this race is not the
easiest ever (the last 17 kilometers are made of ups and downs, for a
total 150 meters positive slope and 60 meters height difference
between start and finish), a very good result indeed.
This has been my first "negative split" marathon, with a second half
faster than the first. Also I managed to keep the same speed all along
the race, each kilometer being 5'02" and 5'16" except one at 5'23
because of the steepest hill there. Final kilometer in 4'50"!
As I was hoping, training gives results...
Now, I'm heading to a summer without races, but probably great runs
during DebConf in Nicaragua.
Next "big" race : Seine-Eure marathon, in Val de Rueil, France, on
October 20th. Here, I again expect to break my PB as this is a very
flat race (the place where I set my previous PB, indeed)
tl;dr: Version 1.0 of Obnam, my
snapshotting, de-duplicating, encrypting backup program is released.
See the end of this announcement for the details.
Where we see the hero in his formative years; parental influence
From the very beginning, my computing life has involved backups.
In 1984, when I was 14,
my father was an independent
telecommunications consultant, which meant he needed a personal computer
for writing reports. He bought a
Luxor ABC-802,
a Swedish computer with a Z80 microprocessor and two floppy drives.
My father also taught me how to use it. When I needed to
save files, he gave me not one, but two floppies, and explained
that I should store my files one one, and then copy them to the
other one every now and then.
Later on, over the years, I've made backups from a hard disk
(30 megabytes!) to
a stack of floppies, to a tape drive installed into
a floppy interface (400 megabytes!), to a DAT drive, and various other media.
It was always a bit tedious.
The start of the quest; lengthy justification for NIH
In 2004, I decided to do a full backup, by burning a copy of all my
files onto CD-R disks. It took me most of the day. Afterwards, I sat
admiring the large stack of disks, and realized that I would not ever
do that again. I'm too lazy for that. That I had done it once was an
aberration in the space-time continuum.
Switching to DVD-Rs instead CD-Rs would reduce to the number of disks to
burn, but not enough: it would still take a stack of them.
I needed something much better.
I had a little experience with tape drives, and that was enough to convince
me that I didn't want them. Tape drives are expensive hardware,
and the tapes also cost money. If the drive goes bad, you have to get
a compatible one, or all your backups are toast. The price per gigabyte
was coming down fast for hard drives, and it was clear that they were
about to be very competitive with tapes for price.
I looked for backup programs that I could use for disk based backups.
rsync, of course, was the obvious choice, but there were others.
I ended up doing what many geeks do: I wrote my own wrapper around
rsync. There's hundred, possibly thousands, of such wrappers around
the Internet.
I also got the idea that doing a startup to provide online backup
space would be a really cool thing. However, I didn't really do
anything about that until 2007. More on that later.
The rsync wrapper script I wrote used hardlinked directory trees
to provide a backup history, though not in the smart way that
backuppc does it.
The hardlinks were wonderful, because they were
cheap, and provided de-duplication. They were also quite cumbersome,
when I needed to move my backups to a new disk the first time. It
turned out that a lot of tools deal very badly with directory trees
with large numbers of hardlinks.
I also decided I wanted encrypted backups. This led me to find
duplicity, which is a nice program
that does encrypted backups, but I had issues with some of its
limitations. To fix those limitations, I would have had to re-design
and possibly re-implement the entire program. The biggest limitation
was that it treated backups as full backup, plus a sequence of
incremental backups, which were deltas against the previous backup.
Delta based incrementals make sense for tape drives. You run a full
backup once, then incremental deltas for every day. When enough time
has passed since the full backup, you do a new full backup, and then
future incrementals are based on that. Repeat forever.
I decided that this makes no sense for disk based backups. If I already
have backed up a file, there's no point in making me backup it again,
since it's already there on the same hard disk. It makes even less
sense for online backups, since doing a new full backup would require
me to transmit all the data all over again, even though it's already
on the server.
The first battle
I could not find a program that did what I wanted to do, and like
every good NIHolic,
I started writing my own.
After various aborted attempts, I started for real in 2006. Here is
the first commit message:
revno: 1
committer: Lars Wirzenius <liw@iki.fi>
branch nick: wibbr
timestamp: Wed 2006-09-06 18:35:52 +0300
message:
Initial commit.
wibbr was the placeholder name for Obnam until we came up with
something better. We was myself and Richard Braakman, who was going
to be doing the backup startup with me. We eventually founded the
company near the end of 2006, and started doing business in 2007.
However, we did not do very much business, and ran out of money in
September 2007. We ended the backup startup experiment.
That's when I took a job with Canonical, and Obnam became a hobby
project of mine: I still wanted a good backup tool.
In September 2007, Obnam was working, but it was not very good.
For example, it was quite slow and wasteful of backup space.
That version of Obnam used deltas, based on the rsync algorithm, to
backup only changes. It did not require the user to do full and
incremental backups manually, but essentially created an endless
sequence of incrementals. It was possible to remove any generation,
and Obnam would manage the deltas as necessary, keeping the ones
needed for the remaining generations, and removing the rest.
Obnam made it look as if each generation was independent of each other.
The wasteful part was the way in which metadata about files was
stored: each generation stored the full list of filenames and their
permissions and other inode fields. This turned out to be bigger
than my daily delta.
The lost years; getting lost in the forest
For the next two years, I did a little work on Obnam, but I did not
make progress very fast. I changed the way metadata was stored, for
example, but I picked another bad way of doing it: the new way was
essentially building a tree of directory and file nodes, and any
unchanged subtrees were shared between generations. This reduced the
space overhead per generation, but made it quite slow to look up
the metadata for any one file.
The final battle; finding cows in the forest
In 2009 I decided to leave Canonical and after that, my Obnam hobby
picked up in speed again. Below is a table of the number of commits
per year, from the very first commit (bzr log -n0
awk '/timestamp:/ print $3 ' sed 's/-.*//' uniq -c
awk ' print $2, $1 ' tac):
2006 466
2007 353
2008 402
2009 467
2010 616
2011 790
2012 282
During most of 2010 and 2011 I was unemployed, and happily hacking
Obnam, while moving to another country twice. I don't recommend that
as a way to hack on hobby projects, but it worked for me.
After Canonical, I decided to tackle the way Obnam stores data from
a new angle. Richard told me about the copy-on-write (or COW) B-trees that
btrfs uses, originally designed by Ohad Rodeh
(see his paper
for details),
and I started reading about that. It turned out that
they're pretty ideal for backups: each B-tree stores data about
one generation. To start a new generation, you clone the previous
generation's B-tree, and make any modifications you need.
I implemented the B-tree library myself, in Python.
I wanted something that
was flexible about how and where I stored data, which the btrfs
implementation did not seem to give me. (Also, I worship at the
altar of NIH.)
With the B-trees, doing file deltas from the previous generation
no longer made any sense. I realized that it was, in any case, a
better idea to store file data in chunks, and re-use chunks in
different generations as needed. This makes it much easier to
manage changes to files: with deltas, you need to keep a long chain
of deltas and apply many deltas to reconstruct a particular version.
With lists of chunks, you just get the chunks you need.
The spin-off franchise; lost in a maze of dependencies, all alike
In the process of developing Obnam, I have split off a number of
helper programs and libraries:
md5sum on steroids),
useful for verifying that files are restored correctlyunstable, and will
hopefully get into wheezy before the Debian freeze. I provide
packages built for squeeze on my own repository,
see the download page.
The changes in the 1.0 release compared to the previous one:
The other complaint about UEFI Secure Boot is that it doesn't add any security. There's two aspects to this - people either think it'll be quickly broken, or people think that the public availability of signing services will render it useless.
Do you remember how Intel used to be the white knight of graphic card
manufacturers, the one from which you could buy hardware without looking, being
sure that it would be supported by GNU/Linux directly?
Do you remember how they broke that by releasing the infamous Poulsbo
card?
Well, they did it again. The newest Intel Atom D2500, D2550, D2700, N2600 and
N2800 processors, codenamed CedarView and Cedar Trail , include a graphic
core that is only supported by a proprietary driver only available on Meego
(read: unusable on regular GNU/Linux.So, if you plan to buy a netbook, beware! Intel is not a
manufacturer you can trust to provide freely usable hardware. Just like other
manufacturers, check that the hardware you are planning to buy is supported, by
asking on #intel-gfx
on Freenode. The most relevant course of action probably consists in
buying a previous model or waiting for the next models.
Sometimes conferences can be dull and
boring, but sometimes they can be just awesome in terms of finding the
right people to collaborate with. Linaro Connect in Hong Kong last
week was definitely one of the great ones!
I chaired my my usual sessions
(armhf
status
and cross-distro
ARM) and we had some lively discussion in both. We're probably
just about done with the armhf sessions, as most distros have accepted
a hard-float ARMv7 port now and there's not so much specific work left
there now that future sessions will be necessary. The cross-distro
work for ARM ports is likely to continue into the future, but we're
going to be concentrating on bootstrapping work for ARMv8 soon.
Talking v8, there were a lot of meetings discussing the various
work topics for this new 64-bit ARM architecture: kernel, toolchains,
bootstrapping etc. More to come on that soon!
On top of all this useful discussion and planning, we also found
time during the week for some hacking. This was the highlight of the
week for me, as I found some expert help to solve my long-standing
Ruby on ARM bug
(Debian
bug #652674, ruby1.9.1: FTBFS on armhf: test suite
segfaults). Ulrich Weigand (an IBM toolchain wizard seconded into the
Linaro team) sat with me for a couple of hours while we worked through
reproducing the problem, only to find that he could not reproduce it!
The crash had looked very much like a pthreads locking bug, which
was scaring me. After some digging, we worked out where the
problem was, and how it was now fixed.
For a long time on ARM, the Linux getcontext/setcontext system
calls have never been implemented; apparently nobody really missed
them, so they have never been a priority. In Ruby 1.9.x, the
implementation of the new "fiber" primitive wanted to use
getcontext/setcontext to control stack state etc. in different threads
of control. In cases where they are not available or known not to work
well, Ruby has fallback code to implement similar functionality. It
seems that fallback code is buggy. Maybe it was correct at some point
and has bit-rotted due to not being exercised, or maybe it was buggy
as written, but it clearly does not work correctly for us now. In the
last few months, getcontext/setcontext have finally
been implemented
for ARM in glibc trunk (by Michael Hope, also in the Linaro
toolchain team!) and backported into current Debian and Ubuntu eglibc
versions. Re-running configure and rebuilding Ruby against the most
recent code in both Sid and Precise fixed the test suite crash we were
seeing earlier. Yay! We could also provoke the bug again at will by
quickly hacking around the Ruby source to force it to switch back to
the fallback code, thereby verifying the fix.
Why does this matter? As we're expecting ARM servers to enter the
market soon, web apps written in Ruby on Rails are going to be an
important part of the software stack that customers will want to
run. Broken fibers and threading would not help here!
It's great to meet up and work with talented folks like this;
Linaro Connect is an excellent event for getting stuff done!
#!/usr/bin/perl
use strict;
use warnings;
use Text::ParseWords qw(quotewords);
my $opregex;
my $tmp = join( " ", map quotemeta $_ qw (&& ; ));
# Match & but not >& or <&
# - Actually, it should eventually match those, but not right now.
$tmp .= ' (?<![\>\<])\&';
$opregex = qr/$tmp/ox;
my @tokens = ();
my $lno;
while (my $line = <>)
chomp $line;
next if $line =~ m/^\s*(?:\# $)/;
$lno = $. unless defined $lno;
while ($line =~ s,\\$,,)
$line .= "\n" . <>;
chomp $line;
$line =~ s/^\s++//;
$line =~ s/\s++$//;
# Ignore empty lines (again, via "$empty \ $empty"-constructs)
next if $line =~ m/^\s*(?:\# $)/;
my @it = quotewords ($opregex, 'delimiters', $line);
if (!@it)
# This happens if the line has unbalanced quotes, so pop another
# line and redo the loop.
$line .= "\n" . <>;
redo;
foreach my $orig (@it)
my @l;
$orig =~ s,",\\\\",g;
@l = quotewords (qr/\s++/, 1, $orig);
pop @l unless defined $l[-1] && $l[-1] ne '';
shift @l if $l[0] eq '';
push @tokens, map s,\\\\",",g; $_ @l;
print "Line $lno: -" . join ("- -", map s/\n/\\n/g; $_ @tokens ) . "-\n";
@tokens = ();
$lno = undef;
Here is a little example script and the tokenization of that script (no, the example script is not supposed to be useful).
$ cat test
#!/bin/sh
for p in *; do
if [ -d "$p" ];then continue;elif
[ -f "$p" ]
then echo "$p is a file";fi
done
$ ./test.pl test
Line 3: -for- -p- -in- -*- -;- -do-
Line 4: -if- -[- --d- -"$p"- -]- -;- -then- -continue- -;- -elif-
Line 5: -[- --f- -"$p"- -]-
Line 6: -then- -echo- -"$p is a file"- -;- -fi-
Line 7: -done-
Next.