you have to put options scsi_mod scan=sync somewhere in /etc/modprobe.d/ and regenerate the initrd.mdadm -A /dev/md0 worked just fine to confuse me.
See previous post for the rationale.
I ve then started migrating my mail using evolution.
First I ve installed dovecot and set it up so as to store my mail inside my $HOME/Maildir/ dir. Evolution will run dovecot on demand through a pipe, instead of through network access like with regular remote IMAP servers. So dovecot won t be started as a daemon. I ve been inspired by Roland s setup for this (even though I not using offlineimap).
Inside Evolution, I ve configured a second mail profile, for this local IMAP server, using the custom command to connect to server :"MAIL=maildir:$HOME/Maildir /usr/lib/dovecot/imap"
I ve migrated my existing mail folders using copy to function on all top-level mail folders from the local evolution storage, to copy them to the IMAP folders. Note that some folders that include a dot ( . ) need to be renamed, as the dot is a path separator for IMAP.
I ve adapted Evolution s vfolders definitions so as to take into account the active remote folders instead of the local ones, and that s it, the mail is migrated.
I m using fetchmail + procmail to fetch mail from remote servers and to deliver it to the Maildirs, using dovecot s deliver program, with something like :
DELIVER="/usr/lib/dovecot/deliver"
:0: w
$DELIVER
I ve migrated the filters of evolution to server-side Sieve rules so that dovecot s deliver sorts incoming mail in the right Maildirs. The dovecot config needs to be adapted to activate the sieve plugin (dovecot-sieve Debian package), in /etc/dovecot/conf.d/15-lda.conf :
protocol lda
# Space separated list of plugins to load (default is global mail_plugins).
mail_plugins = $mail_plugins sieve
log_path = /tmp/dovecot-deliver-errors.log
info_log_path = /tmp/dovecot-deliver.log
The original Evolution filters rules were stored in $HOME/.config/evolution/mail/filters.xml, so I wrote a quick python DOM parsing tool to extract the (long) list of definitions and generate Sieve rules for the $HOME/.dovecot.sieve config file (in which folder hierarchy uses a . path separator instead of a / ).
The sieve-test program can be used to check is sieve rules function as you want.
Now this is all setup, I only need to configure notmuch to index all the Maildirs. But this is left to another post.
I ve been fed up with Evolution being so buggy and slow, which was making managing my mail ever more painful as time passes. Still, one of the advantages of Evolution over other MUAs is the vfolders feature, which I ve been using intensively for years. Would there be some alternate way of managing my mail ?
I ve been reading about notmuch s progress in becoming a very powerful mail management / retrieval tool (it could very well replace the vfolder feature of Evolution), but unfortunately, it is not (yet) integrated with Evolution.
Others have documented their mail setup, and it seems that I could achieve a middle ground solution by migrating all my mail folders, currently stored inside Evolution s local storage, into Maildir folders managed by a local dovecot IMAP server. Evolution would still be my MUA, but it would store my mail inside Maildirs through dovecot. I ve been told that Evolution may be less buggy with IMAP than with local folders, which could solve my main annoyances. Also, it would make it possible to index mail with notmuch, as it supports the Maildir storage format.
I ve then decided to take the opportunity of a holiday period to start the migration attempt.
I ll document it in another post.
Yesterday, I've received developer kit with Nokia N950. After almost day of using it, it is time to share first experiences.
The phone feels big and heavy to me (just to clarify, this is my first touch screen phone). Well at least when compared to Nokia E52 I used up to now. However it is still acceptable to bring it with me in pocket. Having real keyboard is great, because typing on touchscreen is not really comfortable (what is not specialty of this phone, but applies to all touchscreen phones).
Included software does the "basic" things well (as in basic things for smartphone, including maps, music player, web browser,...), in the end the device was shipped to develop applications, so I did not even expect to have that much. What really surprised me was migration of data from my old phone, it was able to fetch all I wanted including SMS messages.
Filed under: English Meego 12 comments Flattr this!
When I recently switched my
blog over to
Jekyll as my blog/site generation
platform, one of the driving forces was implementing comments. I ve been a
comment-free blogger for years, but I ve just decided to change my opinions
on things and see what happens. (Turns out: you get some cool comments.
And a lot of spam.)
However, the standard advice when it comes to handling comments with Jekyll
is use Disqus (or, very occasionally, some other Insert-Javascript-Here
cloud commenting service). Not being one to stand for the conventional
wisdom, and given that I m allergic to the cloud , I decided to go a
different way an all-static comment handling system for
Jekyll.
First off, you need a way to render comments inside Jekyll. This was
disturbingly easy with Jekyll s plugin system. With around 30 lines of
Ruby, it was done. It simply reads a pile of YAML files from a _comments
directory, and adds them to the individual blog post objects in the
templating system, which can then be iterated over when rendering a post.
Obviously, you need to also adjust your blog post templates to suit. This
is fairly straightforward; just render each of page.comments in a list.
Adding a comment submission form is also necessary, and similarly trivial.
The only moving part in this whole system is the bit of code that handles
comment form submissions. The simplest way to handle it, which is what I ve
gone with, is a few lines of PHP that writes the contents of the form out as
YAML and e-mails it to me. Although I m not a fan of PHP for web
applications, this is sort of job is where PHP excels it s ubiquitous,
trivial to deploy, and easy to understand (in small doses). Using a CGI or
anything larger (like, say, a sinatra app) would be massive overkill.
Since I m still a control freak at heart, I m hand-moderating all comments
by the simple expedient of having all blog comments e-mailed to
me1, and I have to import them into the blog and re-upload.
Mutt makes this trivial; I ve got a script that I trigger by pressing C
(for comment) that pipes the message to formail to strip the RFC2822
header, then drops the rest into my blog s _comments directory. A quick
rake upload and they re published.
If you re not as obsessive as me about hand-moderating your comments, it
wouldn t be hard to write a slightly different PHP script that commits the
comment directly to a git repo2 and re-renders the site.
All you d have to do when you wanted to make a new post is merge those new
comment commits from the live git repo and go to work. This would then be
a completely static site (with all the performance benefits that implies)
with immediate-gratification comments.
So, if you re suspicious of the cloud, or just want to be the cool kid whose
blog comments load even when people have turned cookies off, check out my
Jekyll static comments
plugin.
/dev/null, while the
slightly-less-sure stuff goes into an IMAP folder I ignore except when
I m extra-super-bored. Interestingly, bogofilter was already
pre-trained and ready to go on my blog spam it caught most of the
spam straight away, with no additional training from me, and after being
trained on two examples, it s now going great guns auto-flushing the one
persistent spammer who hammers one particular old post a couple of times
a day with link farms.
At the Copenhagen airport, Mika and I found the quiet room. It
was a soft, well lit, room designed for prayer and reflection. During
the hour I was in it, the only other visitor was a child cracking open
the doorway to peer in. The room had a guest book with hundreds of
messages left by other travelers over the last couple years. People
praised the airport administrators for providing the room, made
suggestions, and complained about the room, the airport, and the
country's shortcomings. They talked about themselves, their travels,
their happiness and unhappiness with departing or returning home, and
their thoughts about the world.
I spend a lot of time in airports but only rarely speak to my fellow
travelers. It's amazing how little I know about the thousands of
people waiting in line with me, sitting near me on the plane, and
sharing in the long, lonely, and often stressful experience of moving
between countries and continents. The guest book provided a rare
window into these people in what is normally the anonymous and
depersonalized non-place of airports. In the quiet room, I could
-- for the first time -- hear some of these fellow travelers speak.
I'm someone who sometimes has
a beard, and sometimes doesn't. Today, I'm someone with a fairly
long beard, although it's not (yet?) one of the likes of andrew or maddog.
I don't think it looks very well on me, but you can blame the government
(or lack thereof) in Belgium. How?! What?! Yes, the government.
A while back, a movie critic working for the RTL (a
Francophone Belgian TV station) decided to keep his beard until the
Belgian government took the oath of office. He was quickly joined by an
actor, and then by a
Flemish radio presenter (dutch, with pictures). And then by a
whole bunch of people.
I didn't join them, initially. But after a while, when my beard was
starting to get long again, people started asking me, 'is that for the
government?' And initially I said no. But people kept asking.
Since it seemed like a good excuse for not having shaven that long,
after a while I just decided to say 'yes' for the heck of it. And now,
after having said so for quite a while, I've kindof grown to the
idea.
Which, I guess, means that if the impossible happens, and someone
back home manages to form a government that will take the oath while
I'm still in Bosnia and Herzegovina, I'll have to go out and buy
some razor equipment.
But I don't expect that to happen. Today, exactly 400 days after the
previous election (yes, it's really been that long), it still doesn't
look as if there's going to be an agreement on anything.
I wish there was something positive or funny that I could
report on in this whole thing, but it doesn't look like it.
Sigh.
The venue looks great. It's full of nice spots for impromptu
chats, beers, and the like, which I love. I had a good lengthy
recovery sleep and I'm ready for the usual DebConf fun to begin.
Plan for today is simple: dismantle DPL backlog accumulated during
the trip and in the frantic 10-15 days before it.
If you are at the conference and willing to discuss, chat, or
simply share a beer: do not hesitate! For something less informal,
Neil is also organizing an in person "ask
the leader" session here; feel free to propose
questions to him and make me have a hard time answering
them.
See you around.
We already studied one weird error of dpkg, let s do another one:
Unpacking replacement libexo-common ... dpkg: error processing /var/cache/apt/archives/libexo-common_0.6.1-1_all.deb (--unpack): unable to open '/usr/share/doc/exo/html/C/images/exo-preferred-applications-internet.png.dpkg-new': No such file or directoryRather difficult to understand on the first look right? Let s see in detail what s usually happening when you get this error.
The first hint comes from the file extension .dpkg-new . This extension is used by dpkg to unpack the updated files near the old files. When everything has been unpacked, they are renamed over the old files.
The failure happens precisely when dpkg tries to rename the file (in fact when it tries to fsync() it before the rename) but why does it fail?
Usually because there are unexpected symlinks (or bind mounts) involved that resulted in two different files being installed in the same directory. For example consider package that provides /dir1/a-file and /dir2/a-file. Now imagine that on the target system, /dir1 is a real directory but /dir2 is a symbolic link that points to /dir1.
When dpkg processes /dir1/a-file.dpkg-new everything is fine, but when it tries to process /dir2/a-file.dpkg-new it will fail because that file is the same than /dir1/a-file.dpkg-new which has already been renamed.
Diagnosing further the problem requires to understand why there s a symlink instead of a real directory. It might be two packages that were badly coordinated, or a problem in the package itself because it lacks some code that drops the symlink in the preinst (so that dpkg installs the real directory instead of keeping the symlink).
There might be variations in the way two files end up sharing the same directory, but this simple example should have clarified the nature of the underlying problem.
Subscribe to this blog by RSS, by email or on Facebook.
No comment Liked this article? Click here. My blog is Flattr-enabled.
Marcus Rohwetter has recently published a very detailed article about
Antifeatures in the German monthly magazine Zeit
Wissen. Although I've only read the article through automatic
translation -- unfortunately, I don't read German -- I'm hugely
honored that Rohwetter has taken the time to engage with the idea so
deeply and to help translate the argument for a much broader community
than the free software community I come from and am best able to
speak to.
A lot of what I've been trying to do in the last year or so is to
figure out how to speak more effectively about the politics of
technology control to audiences of non-technologists. Indeed, that's
the whole point of the antifeatures concept. I deeply appreciate
the help of Rohwetter, and others, in that project.
/dev/videoX to the network, and done.
Example:
# Streaming:
cvlc v4l2:///dev/video0 --no-audio --sout "#transcode vcodec=mp2v,vb=3072 :std access=udp,mux=ts,dst=224.0.0.1 "
# Playing, possibly on a remote machine:
vlc udp://@224.0.0.1:1234
Notes:
v4l2 vs. v4l depending on the distribution (sid vs. squeeze).v4l[2]:// part, one for the
device (/dev/video0).uvcvideo module, getting No space left on
device when the second (c)vlc is started.--resolution to request a specific
resolution (the device will fall back to another resolution if the
requested one is unavailable); --frames to specify the number of
frames to capture (lower noise, but possibly higher blurriness).threading module. To
avoid encountering the same bandwidth issue, a tiny lock ensures a
single fswebcam instance runs at a time.videoX-timestamp.jpg and to log rotate them after a while, for
further viewing/reviewing during a given time window.# Only keep a rectangle of width W, height H, starting at the point (X,Y):
convert -crop WxH+X+Y capture.jpg capture.jpg
# Include a timestamp on the top-left corner:
convert -box white -font Fixed -draw "text 2,12 \"$timestamp\"" capture.jpg capture.jpg
videoX-current.jpg symlink for each /dev/videoX
device is trivial.
I decided to go to DebConf11
by car. Not willing to do this alone, I asked for volunteers to join me
in my car trip. One such volunteer showed up, and the car trip happened.
Now, since I remembered to push the correct buttons on my dashboard
after I completely fueled up the car and checked the tire tension and
other things, I am now proud to be able to present you with the
following statistics on this trip:
Some weeks ago I noticed that one of my backup servers was not removing
the old backup generations it was making. It had over 18 months worth of
daily backups, done with rsync and "cp -al". This is not the world's
greatest backup system, but that's entirely irrelevant for this rant.
The cron job that would do that did not exist: I had forgotten to enable it.
So I ran it by hand. Then fixed it, when I noticed it was buggy, and didn't
remove any old generations prior to 2010. After that
I removed years-old backups of machines that haven't existed for years.
Disk usage:
Size Used Avail Use%
before 5.4T 2.6T 2.6T 51%
after 5.4T 892G 4.3T 18%
Inodes:
Inodes IUsed IFree IUse%
before 732577792 77645915 654931877 11%
after 732577792 16871789 715706003 3%
That's about 61 million files removed, over the course of three weeks,
of which the machine was down due to crashes for about one week.
It should not take two weeks to copy a couple of terabytes (it's less than
two megabytes per second). It should definitely not take two weeks to
delete it. Almost all the time it was up, it was removing files. There
were a couple of times when it finished one run and was idle until I woke
up and started the next run. Say a day in total.
Why is "sudo rm -rf" on a large directory tree, or set of large directory
trees, so slow? I suspect part of the problem is that the system call
API is beautiful, but simplistic: you need to call unlink or rmdir on
every file separately, and that means doing an inode lookup separately
for each file. Having a system call to delete everything in a directory
would have a chance of removing things more efficiently, I suspect.
However, since I've not done any profiling, nor even analyzed the
relevant source code in the kernel, I might be entirely wrong.
I wonder if anyone else needs to remove large directory trees frequently?
I do that a lot, because of my backup software development hobby. But
I may be in a unique position, and nobody else would benefit from fast
removal.
(I'll note that my backup server is using ext3, and that ext4 is much
faster at removing files, particularly large
files, but it's still not fast enough.)
mksh R40b (nowadays with filled
in user s caveats (for R40, too!)
and packager s upgrade hints) has
just been released. This is a should-have upgrade, fixing a number of
admittedly some obscure bugs, changing things begun in R40, improving
upon others. Thanks to the PLD Linux guys for spotting all these errors;
thanks to them and phpnet.org both for adopting mksh so well.
I have also fixed a bug in nroff(1) which will lead to an even
nicer looking HTML manpage mksh(1) (after the next rebuild and upload of
a MirBSD snapshot scheduled RSN).
jupp 3.1.16 took on the task
of merging Debian joe changes (aiming at an upload). I also split the
jupprc file into three versions (2.8 generic/DOS, 3.1+jupp and 3.7/Unix)
because of the differences in the baseline executables making rc files
partially mutually incompatible (think Insert key), annoyingly warning
(think syntax, hmsg), or less usable (joe s new menu system).
jupp 2.8.2 is a companion to
jupp 3.1.16 mostly because of the new help window character map
Binaries for jupp should be updated RSN too.
Considering Banja Luka is arriving quickly, the r in RSN should be
taken with a few grains of salt. I ve also scheduled working on the pcc
Debian package for the next future; updating lynx and maybe others like
OpenSSH in MirBSD is also due; cvs(1) will receive more of my time, but
before the next Upload I d like to fix LP#12230 once verified.
Builds for Debian/m68k are also still running. I note I did in fact
not manage to make a new base image, yet (but 2.6.39 kernels
miss a patch, anyway, so waiting for 3.0 is ok). It s still using gcc-4.4
because nobody tests gcc-4.6 and gcj-4.6 FTBFS due to SIGSEGV, but that s
ok in my books. rsyslog is broken but sysklogd works.
The #ksh Freenode page finally
got a well-deserved link to Planet Commandline. Throw more my way!
Acronyms and translations,
too. (Got Norwegian and Rumanian covered in the meantime. No idea whether any
RTL languages will work in that beast. But I m young and need the money)
Since I m writing a wlog entry anyway let me thank Gunnar for a nice
summary on the current Free Culture discussion; my comments on Nina s site
seem to be eaten, but let me support it fully, although, of course, I normally
use a copycenter style licence, which
is specifically written for general works of authorship under copyright law,
not limited to software. I did in fact have that in mind. Maybe some people
will like it (it s less than one Kibibyte long) either generally or just for
their everyday random musings (they can then keep CC-BY-SA for the big works
if they so desire).
Wouter, grass background makes green headlines illegible. I ve never liked,
and never installed manually, cups either. (Benny tells me that Apple s new
version refuses to talk with a non-Apple cups, kinda defeating the whole idea
I think.) Port 9100 is JetDirect (probably with an HP in front and some subset
of trailing) and just nice. (Being able to talk ESC/P with your printer
like print '\033K\x07\0\x3E\x81\x99\xA5\xA5\x81\x3E' >/dev/lpa too
rocks though, IMHO. Yes, mine can, and I still can. /dev/lpa is BSD.)
Kai, thanks for your vimrc lines:
:highlight TrailWhitespace ctermbg=red guibg=red :match TrailWhitespace /\s\+$\ \+\ze\t/
Automatic removal is harmful, though I just fell into the trap since jupprc contains needed whitespace at EOL but manual removal (bound to ^K] in jupp) rocks. And I like that your solution uses such strong a colour vim users are the single most represented offender group for actually leaving the redundant whitespace at EOL there, and it should hurt their eyes. (Sadly there is some vehement disagreement preventing them from inclusion in grml-etc-core but that s why I re-post them here.) Ah, and jupp can of course display whitespace visibly (although it uses / , replacing the arrow with if no UTF-8, not ), accessible with ^Ov. Steve, want to put up a checklist for sites? We can crowdsource the testing to maybe get some interesting results Some other people would get more comments if they were idling in IRC (Freenode) or allow comments on their blog, specifically without too high an entrance barrier OpenID is ok, but many other things, and ECMAscript, are not; but I can t really say that loud because our wlog is static HTML compiled from a flat plaintext data source so it doesn t allow such either. I often forget what I wanted to add if I can t get it out quickly enough (especially at work). Sowwy Me like the cat picture postings (Amayita, Tiago, Gracias!).
Recently I was at a pub and there was an advert for pub tokens displayed on the window.
Seemed like a cute idea:
SELECT * FROM cms_module_pubtokens_users where email = '"'' AND password =''"' LIMIT 1 Fatal error: Call to a member function FetchRow() on a non-object in /home/pubtokens/U79P18WQ/htdocs/includes/functions.php on line 291Suffice it to say I sent them an email, then poked them on twitter, but to no avail. In conclusion they don't get my money, and I couldn't recommend them to anybody else at this point either. As I'm not a customer at least I can rest easy knowing my details haven't been compromised at any point over the past few months. ObQuote: "It can't rain all the time" - The Crow
Next.