Search Results: "mats"

10 April 2007

Neil Williams: pilot-qof finally leaves NEW

One version of pilot-qof went into Etch (0.1.1-3) with 0.1.2-1 uploaded to unstable after the freeze and just migrated into Lenny. A new release had sat in the NEW queue for a month due to the final stage of the Etch freeze. Finally, it is moving into unstable. 0.1.3-1 separates the pilot-qof binary from the perl, XSL and documentation making four packages in all, three under the new title: datafreedom. See data-freedom.org.

Hopefully, splitting existing Debian packages will not require a spell in the NEW queue in future - or at least a reduced queue, after all these packages have been checked once already. (Hence Sam was my first choice as DPL - congratulations again, Sam.)

If you previously used the XSL stylesheets from pilot-qof, you will now need the datafreedom-qsfxsl package. Note that the location of the XML catalog (and the XSL stylesheets) has changed too. See NEWS.Debian in the pilot-qof package. (zless /usr/share/doc/pilot-qof/NEWS.Debian.gz).

The intention is that the datafreedom packages will now mature to support a wider range of small utilities like pilot-qof - there is already support for calcurse, contacts, dates, gpe-expenses, gpe-calendar and a few others - justifying the package name change.

The XSL is (predictably) limited to converting from XML so if XSL is used to convert to a non-XML format, you'll also need the datafreedom-perl package to support conversion of non-XML data back into XML for inclusion into pilot-qof or conversion to other formats via XSL. The perl scripts also include support for aggregating data sources to create new data sets, e.g. combining addressbook, expenses and contacts data sources into a simple invoice. If, like me, you enter new data into your Palm whilst travelling around on business, you can HotSync the Palm and generate all your invoices in one script!

The perl package includes a number of new scripts and brings in a few new perl module packages and this is where the majority of updates are likely to occur in future.

Enjoy!

2 April 2007

Ben Armstrong: Launcher for xjig adds open dialog and file conversion

I have long recognized that to be usable by young kids, xjig really needs a better user interface. So I wrote a launcher, xjig-menu to address the problem. It adds a file open dialog (via zentiy) and support for more file formats (via imagemagick). Update
I have put this script in subversion and added a man page. Check it out:

  $ svn co svn://svn.debian.org/pkg-games/people/synrg/xjig

or browse the repository.

23 March 2007

Lars Wirzenius: Random hacks: Finnish .ics files

I abandoned paper calendars in 1997. For a few years I used various Palm devices, then Evolution. For the most part, this has worked fine. One of the drawbacks is that I have not had any info in my calendar about official holidays in Finland. That would be useful so that I would know when other people are going to be responding to e-mail slowly, and get annoyed if I call them on business. Evolution can deal with several calendars at the same time, and can import calendar files in various formats. A couple of years ago I found an iCal file with Finnish holidays, and imported that to Evolution, but it's out of date by now. This week I decided to look for a new one, but before I did, Droidy, the fastest interface to search engines, found one for me. Unfortunately, it was severly lacking, and did not even include Midsummer Eve, the biggest summer festivity in Finland. I then decided to make my own. I skimmed the web pages of The Almanac Office at University of Helsinki. They used to have the monopoly on making calendars in Finland (and what a silly anachronism that was), and they still have the copyright on name days, but that stuff doesn't interest me. The list of holidays is uncopyrightable, and that's the info I extracted from their pages. I also looked at the list of times when food stores are allowed to be open. That's actually more important to me than holidays. I ended up making two .ics files: aukiolot2007.ics for opening hours, and suomi2007.ics for the holidays. They're probably riddled with errors: if you find any, e-mail me and I'll fix and update. I hope they're of some use for someone. (I realize that someone is going to tell me about a complete and officially supported .ics file with all the above data as a response to this log entry. Good.)

9 March 2007

MJ Ray: Gov: Links for 2007-03-09

We the undersigned petition the Prime Minister to promote the use of Open Document Format within the UK government.
Government documents must be available for tens if not hundreds of years. Currently much electronic documentation is stored in proprietary formats, such as Microsoft's .doc format. In order to allow future generations access to these documents it is imperative that they be in a fully documented standard. Open Document Format (ISO/IEC 26300:2006) is now the international document standard and as such should be supported by the Government.
The Weston Mercury - News: Council chief probe costs 34k
This happened in North Somerset and I remember something similar happening in West Norfolk. When will councillors stop using expensive lawyers to defend themselves at the taxpayers' expense?
opensource - epetition response
Ambivalent reply from the PM's office.
Town and parish councils
Kewstoke is used as a case study, but the link goes nowhere now...
The Irascible Professor-commentary of the day 02-08-07. Movie star teachers.
I've given up watching hero-teacher films. It's really not like that. I guess the oppressive bureaucracy of state education, with pressure from executive teachers to fiddle the student numbers, wouldn't make a good film.
The Irascible Professor-commentary of the day 03-06-07. Why I hope mhy children won't become educators.
Don't let your children grow up to become salesm^Wteachers.
NO2ID:newsletter 66
"Saturday, 10th March - King's Lynn street stall to advertise forthcoming public meeting, from 10am. Volunteers needed! Contact kings.lynn@no2id.net or text/call James on 07778 966395."
Tories want to free (software) Whitehall
The shadow chancellor gets all over the BBC as a result of his party's latest conversion.
Neighbourhood Fix-It
Another better-than-local-councils system from MySociety.
Concerto for blunt instrument: Ode to the No Longer Active
"We held a place for you // But you were busy // You've been so busy lately."

2 March 2007

Jacobo Tarrío Barreiro: And now, for something completely the same

Enrico: if you extract the platforms using lynx -dump -nolist (or w3m -dump ), you’ll only extract the text, with no HTML, and the keywords will vary slightly:

27 February 2007

Edd Dumbill: OpenID and microformats support on XTech site

Thanks in no small part to the advocacy of Simon Willison, I've just OpenID-enabled the XTech web site. OpenID log in box on Expectnation Users can now create their accounts using an OpenID, or associate an OpenID with an existing account. A single-sign on solution like OpenID solves an important problem for us, as most people tend to interact with our conference web sites in only one or two time periods each year. While we've gone to the trouble of making retrieving a password easy, there's still the mental burden on the user of setting up the account and noting it down somewhere. As a measure of the impact of this on me personally: I habitually save registration confirmation emails in a certain mail folder. Since 1997 I have collected no fewer than 572 of these, and I'm sure some have been missed! One other cool thing about OpenID is that finally I can get the identity I wish to have. No longer do I have to be a compulsive early adopter of every service just to get the name edd. (Well, as long as said service integrates OpenID of course!) Personal branding is an important attractive aspect of OpenID.ImplementationImplementing OpenID using the Ruby ruby-openid gem was quite straightforward, as was the logical integration into our user models. I've not been the only one following this path recently, as illustrated by this post on Rails OpenID integration from Dan Webb.The harder problem of deploying OpenID lies in making the user interface work well: ultimately that will have a huge influence over its uptake. We've made a decent first go of it in Expectnation, but I'm sure we'll evolve and improve it over time. The main puzzling thing is how obvious to make the OpenID facility, given its relatively small take-up right now. We don't want to confuse normal users too much by using it. Microformats When I did my behind-the-scenes piece on the building of the XTech schedule last week, one feature I didn't discuss was the support for microformats we have in the schedule and on the session pages. If you use a tool such as Operator, you can easily save talk times to your calendar while reading the schedule.
XTech schedule microformats I'm personally a little late to the microformats party. Being a fan of pragmatic RDF, I didn't see much need for microformats right away. However, with tools like Operator I can honestly say that the use of microformats does enhance the XTech schedule.My impressions of microformats (in particular hCalendar and hCard) from using them are mixed. One the plus side, it was very easy to do. On the negative side, I found them restrictive in the sense that for the metadata to be present in the hCalendar object, it needs to be part of the HTML presentation.So, while microformats are meant to be about making human readable data useful for computers, they can have a tail-wagging effect on the human markup. Let me elaborate. In the conference schedule there is a grid overview. For readability here we want to keep the details down to a minimum in each box. There is definitely no need to repeat the date of each presentation when you can see there's a grid per day.But also we want to have microformats available in the page so users can use the grid to pick off talks to add to their calendar. The only details you currently get from the microformat are those you physically include inside the div marked as vevent. This means we can't embed the full details, such as the talk description. It also means I indulge in some dubious markup practices (an empty abbr element) in order to get the date and time into each hCalendar object.It seems to me that this could be ameliorated by more intelligent user agent behaviour. Each of my hCalendar events is given a URL. At the end of that URL is a full description of the event, using microformats. So, as long as I reference the URL in a summary page, the user agent can beetle off and pull down the full information, in much the same sort of way that FOAF uses the rdfs:seeAlso property.So, remove the expectation that microformats provide complete data, and I'm sold.Other schedule features: iCal, Upcoming.org
Of course, we have iCalendar support in the XTech schedule, so you can subscribe conventionally using iCal, Evolution or a similar program. Aaron Straup Cope took the iCalendar, and uploaded each event into Upcoming.org. If you look at the upcoming events tagged xtech07, you see the results of his work.This foreshadows some of the social elements we plan to add to Expectnation itself: indicating your intent to attend a talk, and adding comments to it. As a program chair I'm finding this quite fascinating to watch.

20 February 2007

Meike Reichle: Bilingual

I've decided to split my blog into an English and a German section. This is mostly because I've now also started blogging about some local events that are probably not of much interest to readers from other countries, so I'll blog these in German, but the rest will still be in English. All English posts will still be syndicated on Planet Debian, the German ones will only be readable via my blog or the respective feed. Talking about feeds, I spent some time trying out different feed formats for this blog, since I had some trouble with Planet. The current one (rss2.0) doesn't validate because there is html in the description element but apart from that it seems to be fine, so I'll keep it for the moment.

18 February 2007

Junichi Uekawa: Tokyo area debian meeting.

25th meeting was held yesterday.We did a session to compare and contrast dbs, quilt, and dpatch.Kobayashi was ill, and quilt session lacked a presentor. dbs session was presented by Iwamatsu, and I presented dpatch.quilt looks new but not much different from dpatch, dbs looks a bit old and rusty and less widely used now.The way forward looks more like integrated stg where dpatch-style stuff is more integrated into the SCM.

9 February 2007

Erich Schubert: XML schema datatypes

... suck. The XML Schema "datetime" format can't be handled by Java's SimpleFormat (ok, that probably is more Javas fault, of not being able to handle hours:minutes in the timezone specification, anyway, this is mildy annoying). The XSLT2 parsers are very intolerant about the format of the time specification, too. They could have made more stuff optional such as the specification of seconds; an error here will make the whole XSLT fail with an exception. Some compact form of error handling would be nice... as would be a smart parser which can handle various formats. The XML Schema "duration" is even worse. First of all, it was completely forgotton when doing XSLT 2; there are no functions to format or disassemble it (except by regular expressions, which could also use a zero-width lookahead). Secondly, it's lacking common specifications such as "next week". While "next week" is computationally equivalent to "in 7 days", it can have different semantics in some contexts (especially when not being aligned): If I'm looking for the week February 9th 2007 is in, the result is February 5th two February 11th. If I'm looking at a 7 day interval containing this day, there are infinite possibilities (aligned on milliseconds and below...). So it does make sense to make a difference between 7 days and a week.

8 February 2007

Erich Schubert: Calendaring in a semantic wiki

... is the working title of my diploma thesis. Tomorrow I'll hold the introductory presentation on my topic in the research seminar. This is to explain my project to other members of the working group, so they can give me feedback and suggestions. What I'll be doing: Where I am: Difficulties: Fortunately, we have a rather strong research group here in Munich. There are experts for query and transformation languages (e.g. Xcerpt, SPEX - Querying XML Streams), temporal calculations (Computational Treatment of Temporal Notions, CTTN) and time modeling Calendar and Temporal Type System CaTTS); and I'm also working closely together with the author of IkeWiki and Xcerpt. And of course they're all nice people to work with!

3 February 2007

Evan Prodromou: 14 Pluvi se CCXV

I was interested to see the announcement on Flickr of a new syntax called machine tags (via a story on machine tags from Programmable Web). Machine tags are a way to provide structured information within a tagging structure. It takes the traditional tagging format (just words) and adds a little structure of the form "namespace:property=value". I like machine tags; they map cleanly into RDF. I'll be interested to see how the rel=tag microformat will grow or adapt to this new structure. My guess is that there will be some resistance. tags:

31 January 2007

Evan Prodromou: 11 Pluvi se CCXV

The growth of new Open Content projects continues to amaze me. I really admire how the wiki technique makes it possible to combine the microcontributions of thousands or millions of people across the Internet and make high-quality, usable reference works for everyone to share and enjoy equally. What we'd normally think of as staggeringly audacious becomes manageable and realizable using wikis. I'm mostly waxing poetic here about a new project for creating a Free event calendar for the entire planet. Wikevent is built using the ubiquitous and reliable MediaWiki software, but with a ton of add-ons and features to make organizing an events calendar reasonable. There's a good mix of calendar-oriented interface, geographical interface, and a nice dose of Microformats thrown in for good measure. Wikevent is still in its early stages, but it doesn't take much imagining to envision a great future for it. Managing event calendars -- everything from the Beck concert in your city to the meeting of the local Interlingua club -- is a daunting task for local media. As its API and data feeds mature, it's reasonable -- nay, probable -- that Wikevent feeds could power the events calendars for local weekly newspapers, radio stations, TV, and community Web sites. I think it will make a good data source for community-oriented sites like Upcoming.org or Eventful. Wikevent plans to use a lot of metadata to allow slicing its database in different ways for different kinds of people. The entire database is available under the extremely liberal BSD-like Creative Commons Attribution license. Because it's such a nice complement to a travel guide, we've started adding Wikevent links to Wikitravel guide articles on our English version (and, soon, other versions too). There's more crossover, of course: the site's founder, Mark Jaroski, and community powerhouse Andrew Haggard, are both longtime Wikitravellers. I'm looking forward to seeing how this new Open Content project continues to develop. tags:

Jyte Speaking of cool new sites, I was glad to see in Scott Kveton's blog news of the new Jyte project. Jyte is a fascinating social network that uses the OpenID authentication system for the identity infrastructure. I think this is really interesting -- using OpenID for social networks is really a good idea, and opens up the process a lot. Another interesting point is that Jyte lets you make arbitrary assertions about yourself or, really, anything that has an URI. Other users can approve or disapprove the assertion, giving it more validity. For example, I've made an assertion that I'm the founder of Wikitravel: http://jyte.com/cl/evan.prodromou.name-is-the-founder-of-wikitravel That assertion has been backed up by 3 other people (so far), giving it a little bit more authority. Or, as Chris Dawson put it, http://jyte.com/cl/jyte-is-hot-or-not-for-nerds I think that the claims system is pretty intelligent -- a great way to make statements about yourself or others. It works like ClaimID, but with more latitude in what you can make claims about. tags:

27 January 2007

Daniel Burrows: Sandisk doesn't want your money for a music player unless you run Windows

I bought a Sansa e280 last weekend to replace my aging and bulky Neuros (the last straw was when I lost the charger for the Neuros). It's nice to have such a small, light music player, and having 8GB of space is a big bonus. But when I went to the Sandisk web site to get a new firmware, I discovered that they only provide a .exe of a magic firmware download program. This is despite the fact that, as you can find by searching on the Web, the actual firmware upgrade procedure is just "copy the firmware file onto the device".

So, I wrote to support, mentioning that I don't have a running Windows installation and asking if they could provide an alternate means of updating the firmware. Here's the response:


Please be informed that your Sansa e280 is supported on Windows XP. If the operating system of your computer is not Windows XP, if you have just bought your Sansa e280, we do recommend that you contact the store where you purchased it and inquire about replacements that can be supported on your operating system or if that store honor refunds, please do ask for it. Please do provide the proof of purchase and packaging for verification purposes.


Now, I can work around this problem -- but after reading that brush-off I think I might just take their advice; as it happens, I saved the packaging just on the offchance something like this came up. Can anyone recommend a decent, small, flash-based media player that works well with Linux? Must-have features are:



I still haven't made up my mind: I might hang onto the e280 out of inertia and wait for the Rockbox guys to figure it out (it looks like they're making pretty good progress). But if there's a better vendor out there that actually wants my money, I'd love to hear about them.

20 January 2007

Bernhard R. Link: please add mime-types

Enrico blogged about translating the mime-types of file to a debtags, stating "I&aposm not sure it&aposs a good idea to encode mime types in debtags".

I just want to throw my two cent in here and state that I only once looked into debtooks and gave up because it does not list mime-types but some obscure other specification.

Getting suggested programs that support formats which have the same type of content like the one I want to show, to convert or to create does not help me. I most of the time do not want to edit "a video" or "a spreadsheet", but I first of all have a very specific file I want to do something with, or a specific set of formats I want to create something in. If I have a AbiWord file, Openoffice.org will not help me, and with video or audio formats it is even worse.

So after turning away disappointetly from debtags, I had to do a full mirror scan for /usr/lib/mime/packages/ files and their contents. Having that data cached in debtags would be something that really makes debtags usefull in my eyes. (And the more direct and verbatim the mime-type is encoded, the more useful it would be for me).

19 January 2007

Enrico Zini: tagminer

Cute things one could do with debtags While answering to a long message in the debtags-devel mailing list I accidentally put together the pieces of a fun idea. This is the bit of message I was answering:
  • It would be very useful if the means for indicating the supported
    data formats was more comprehensive. This could mean a lot of
    expanding in the "works-with-format" section of the vocabulary, which
    doesn't even include formats such as gif or mpg at the moment. I don't
    know how feasible it is to alter underlying debtags functionality, but
    perhaps it would be the easiest to make "works-with-format" a special
    case tag which allows for formats not listed in the vocabulary.
This is my answer:
Good point. The idea has popped up in the past to list supported mime types among the package metadata, so that one could point to a file and get a list of all the packages that can work with it. I'm not sure it's a good idea to encode mime types in debtags and I'd like to see something ad-hoc for it. In the meantime works-with-format is the best we can do, but we should limit it to the most common formats.
This is the fun idea: if works-with-format is the best we can do, what can we do with it? Earlier today I worked on resurrecting some old code of mine to expand Zack's ls2rss with Dublin Core metadata extracted from the files. The mime type scanner was ready for action. Some imports:
import sys
# Requires python-extractor, python-magic, python-apt
# and an unreleased python-debtags from http://bzr.debian.org/bzr/pkg-python-debian/trunk/
import extractor
import magic
from debian_bundle import debtags
import re
from optparse import OptionParser
import apt
A tenative mapping between mime types and debtags tags:
mime_map = (
        ( r'text/html\b', ("works-with::text","works-with-format::html") ),
        ( r'text/plain\b', ("works-with::text","works-with-format::plaintext") ),
        ( r'text/troff\b', ("works-with::text", "works-with-format::man") ),
        ( r'image/', ("works-with::image",) ),
        ( r'image/jpeg\b', ("works-with::image:raster","works-with-format::jpg") ),
        ( r'image/png\b', ("works-with::image:raster","works-with-format::png") ),
        ( r'application/pdf\b', ("works-with::text","works-with-format::pdf")),
        ( r'application/postscript\b', ("works-with::text","works-with-format::postscript")),
        ( r'application/x-iso9660\b', ('works-with-format::iso9660',)),
        ( r'application/zip\b', ('works-with::archive', 'works-with-format::zip')),
        ( r'application/x-tar\b', ('works-with::archive', 'works-with-format::tar')),
        ( r'audio/', ("works-with::audio",) ),
        ( r'audio/mpeg\b', ("works-with-format::mp3",) ),
        ( r'audio/x-wav\b', ("works-with-format::wav",) ),
        ( r'message/rfc822\b', ("works-with::mail",) ),
        ( r'video/', ("works-with::video",)),
        ( r'application/x-debian-package\b', ("works-with::software:package",)),
        ( r'application/vnd.oasis.opendocument.text\b', ("works-with::text",)),
        ( r'application/vnd.oasis.opendocument.graphics\b', ("works-with::image:vector",)),
        ( r'application/vnd.oasis.opendocument.spreadsheet\b', ("works-with::spreadsheet",)),
        ( r'application/vnd.sun.xml.base\b', ("works-with::db",)),
        ( r'application/rtf\b', ("works-with::text",)),
        ( r'application/x-dbm\b', ("works-with::db",)),
)
Code that does its best to extract a mime type:
extractor = extractor.Extractor()
magic = magic.open(magic.MAGIC_MIME)
magic.load()
def mimetype(fname):
    keys = extractor.extract(fname)
    xkeys =  
    for k, v in keys:
        if xkeys.has_key(k):
            xkeys[k].append(v)
        else:
            xkeys[k] = [v]
    namemagic =  magic.file(fname)
    contentmagic = magic.buffer(file(fname, "r").read(4096))
    return xkeys.has_key("mimetype") and xkeys['mimetype'][0] or contentmagic or namemagic
Command line parser:
parser = OptionParser(usage="usage: %prog [options] filename",
        version="%prog "+ VERSION,
        description="search Debian packages that can handle a given file")
parser.add_option("--tagdb", default="/var/lib/debtags/package-tags", help="Tag database to use (default: %default)")
parser.add_option("--action", default=None, help="Show the packages that allow the given action on the file (default: %default)")
(options, args) = parser.parse_args()
if len(args) == 0:
    parser.error("Please provide the name of a file to scan")
And here starts the fun: first we load the debtags data:
# Read full database 
fullcoll = debtags.DB()
tagFilter = re.compile(r"^special::.+$ ^.+::TODO$")
fullcoll.read(open(options.tagdb, "r"), lambda x: not tagFilter.match(x))
Then we scan the mime type and look up tags in the mime_map above:
type = mimetype(args[0])
#print >>sys.stderr, "Mime type:", type
found = set()
for match, tags in mime_map:
    match = re.compile(match)
    if match.match(type):
        for t in tags:
            found.add(t)
if len(found) == 0:
    print >>sys.stderr, "Unhandled mime type:", type
else:
If the user only gave the file name, let's show what Debian can do with that file:
    if options.action == None:
        print "Debtags query:", " && ".join(found)
        query = found.copy()
        query.add("role::program")
        subcoll = fullcoll.filterPackagesTags(lambda pt: query.issubset(pt[1]))
        uses = map(lambda x:x[5:], filter(lambda x:x.startswith("use::"), subcoll.iterTags()))
        print "Available actions:", ", ".join(uses)
If the user picked one of the available actions, let's show the packages that do it:
    else:
        aptCache = apt.Cache()
        query = found.copy()
        query.add("role::program")
        query.add("use::"+options.action)
        print "Debtags query:", " && ".join(query)
        subcoll = fullcoll.filterPackagesTags(lambda pt: query.issubset(pt[1]))
        for i in subcoll.iterPackages():
            aptpkg = aptCache[i]
            desc = aptpkg.rawDescription.split("\n")[0]
            print i, "-", desc
\o/ The morale of the story:

16 January 2007

Russell Coker: Some ideas for running a conference

Firstly for smooth running of the presentations it would be ideal if laptops were provided for displaying all presentations (obviously this wouldn't work for live software demos but it would work well for the slide-show
presentations). Such laptops need to be tested with the presentation files that will be used for the talks (or pre-release versions that are produced in the same formats). It's a common problem that the laptops owned by the speakers will have problems connecting to the projectors used at the conference which can waste time and give a low quality display. Another common problem is that laptops owned by the conference often have different versions of the software used for the slides which renders them differently, the classic example of this is OpenOffice 1.x and 2.x which render presentations differently such that using the wrong one results in some text being off-screen.

The easy solution to this is for the conference organizers to provide laptops that have multiple boot options for different distributions. Any laptop manufactured in the last 8 years will have enough disk space for the
latest release of Debian and the last few Fedora releases. As such machines won't be on a public network there's no need to apply security updates and therefore a machine can be used at conferences in successive years, a 400MHz laptop with 384M of RAM is quite adequate for this purpose while also being so small that it will sell cheaply.

A slightly better solution would be to have laptops running Xen. It's not difficult to set up Xephyr in fullscreen mode to connect to a Xen image, you could have several Xen instances running with NFS file sharing so that the speaker could quickly test out several distributions to determine which one gives the best display of their notes. This would also allow speakers to bring their own Xen images.

This is especially important if you want to run lightning talks, when there is only 5 minutes allocated for a talk you can't afford to waste 2 minutes in setting up a presentation!

In other news Dean Wilson gave my talk yesterday a positive review.

Sam Hocevar: Exposing file parsing vulnerabilities

U FAIL Binary file parsing is difficult. There is a lot of byte swapping, offset computation and magic bit mask handling involved. Add to that the fact that many binary formats were reverse-engineered and do not even have a public spec, are so convoluted that there is no way to write a decent parser, or have so many buggy writer implementations that the readers need to accommodate for that. Media players, web browsers and email clients are probably the most exposed ones. These programs are full of bugs, not more than any other program, but more dangerous bugs. Admit it, you just play any video you find on the Intarweb, click any image link and read your email (seriously, even mutt uses antiword to read .doc attachments). It is no longer necessary to have network listening services to be exposed to security issues, the users themselves listen to the world. Using my fuzzing tool zzuf that I eventually decided to release, I found more than 40 bugs in common Unix tools, popular media players and other utilities, simply by reading valid files and slightly corrupting them. The most scary ones are the media player bugs:
VLCMPlayerxineFFmpeg (ffplay)GStreamer (gst-launch)mpg321ogg123
MP3robustSIGSEGVrobustrobustrobustrobustN/A
Ogg VorbisrobustSIGSEGVrobustSIGSEGVSIGSEGVN/Arobust
MPEG-1SIGSEGVSIGSEGVSIGSEGVSIGSEGVrobustN/AN/A
MPEG-2SIGSEGVSIGSEGVrobustSIGSEGVSIGSEGVN/AN/A
MPEG-4 AVISIGSEGVSIGSEGVSIGSEGVSIGSEGVdeadlock?N/AN/A
FLACrobustSIGSEGVrobustheap corruptionrobustN/ASIGFPE
Ogg TheorarobustSIGSEGVrobustSIGSEGVrobustN/AN/A
WMVSIGSEGVSIGSEGVN/ASIGSEGVrobustN/AN/A
AACheap corruptionSIGSEGVSIGSEGVN/AN/AN/AN/A
AC-3/A52SIGSEGVrobust (I KID YOU NOT)robustSIGSEGVN/AN/AN/A
Each of these segmentation fault bugs is a potential security hole in Debian. zzuf also found bugs in Firefox, Openoffice.org, antiword, ImageMagick and even objdump. And there is more to come.

13 January 2007

Erich Schubert: More on configuration files

Gunnar doesn't like the idea of recommending XML for configuration files, why do you need to be able to edit a XML-file with a non-XML-aware editor if you don't like the raw syntax? If you don't like the raw syntax, use an editor that gives you a different representation. Or use some transformation. Write a tool that converts YAML to XML and back, if you like YAML better. (Btw, this is another reason to use a common library for configuration file handling - let people choose their configuration file formats!) Writing XML in the raw with a good schema-aware editor with syntax highlighting is actually quite nice. Have you ever edited an XML file with eclipse? You really should do that... I once opened my Openbox (a rather minimalistic window manager) configuration file in eclipse. Guess what, it was giving me useful syntax completion! It had loaded and used the referenced schema file. openbox configuration in eclipse It's not as if I think XML is the ultimate thing; (nor is Eclipse an editor I'd use for configuration files; startup takes years and it frequently crashes for me. vim also has some XML support...) IMHO there is a lot in XML that should be stripped (such as attributes); I like JSON syntax better, except it's in turn lacking essential information such as character encoding, namespaces and schema information. I also don't thin JSON allows comments. But when handling information from multiple sources (and multiple schemes), XML is really useful. It removes most of the quessing needed for handling other formats. And that is what I'm precisely advocating: use standardized formats. Consider for example the apache configuration. Do you know of any tool that can parse the apache configuration files other than apache? Some parts look like SGML/XML, but they don't have much more in common than using < and >. When you are in need of automating something with apache, you'll be annoyed by this. If apache would be using something where you have a reliable parser ready for - that would be nice. Have a look at the xchat.conf configuration file. It uses "key = value", but they have these extra spaces there and don't use quoting, this means the file can't be loaded by many parsers, e.g. bash. Now lets use at buttons.conf - compeltely different syntax, "KEY value" blocks, separated by empty lines... Btw, note that configuration handling with XML to me means also keeping comments somehow... most applications will nuke any comments in their configuration files; which is funny since most configuration syntaxes do have a notion of comments, but did you ever come across an application using sh-style configuration (i.e. that you could source in bash/dash/zsh), that keeps comments? P.S. The YAML homepage is not YAML. It's valid XHTML. Only if you strip out all the tags and attributes and use only the text content within the /html/body/pre tag, then you have something which probably is YAML. This compatibility with HTML is probably why XML was at all successful.

12 January 2007

Mike Hommey: Playing evil with VMWare ESX Server, part 3

For a reminder of the situation, see also: I finally had time at work to implement a solution for the problem. The result is a bit less than 400 lines of code, which I hope to be able to make free-as-speech. I’ll probably have tons of paperwork to do with my employer before that can happen… The program implements a fuse filesystem that you feed with a raw device image file (but I’m willing to implement more image file formats), and that shows the individual partitions as separate files, named “partn.fstype“. These files can then be mounted via loopback devices the standard way (which was not possible on vmfs for the reason you can find in my first post on the subject), with the benefit of not requiring offset adjustments (as when you want to mount partitions from a disk image), or some loopback device hack. Additionally, it has an internal Copy-On-Write mechanism so that it is possible to mount “dirty” ext3 filesystems (e.g. a snapshot of a mounted filesystem) without modifying the original disk image. Note that there is no way, yet, to keep these writes after unmounting the fuse filesystem. It uses libparted to handle the partition table reading, which means it will read any disk label types parted supports, such as BSD labels, sun partition tables, and so on. It doesn’t support LVM, though. Unfortunately, VMWare ESX server 3.0 being based on RedHat Enterprise Linux 3, only an ancient version of libparted is available. By the way, this version (1.6.3) had a pretty bad bug that made it impossible to use it for regular files instead of devices: it was trying to do a BLKGETSIZE (or was it HDIO_GETGEO ?) ioctl on it. To workaround this, I implemented my own PedArchitecture. It was somehow a revelation, because with similar mechanism, I can implement support for different disk image types :). Anyways, there have been quite some API changes in-between, so some updates will have to be done to the code… In other news, I started working on ext3rminator again. There may be a new release in a few weeks. Update: Thinking again about the ioctl issue, I’m wondering if vmfs couldn’t be responsible (again) for the failure, actually… I’ll check that on monday.

Erich Schubert: Configuration file mess

Aigars Mahinovs mentioned that it would be nice if applications would not clutter the home directory with their config files as much. I agree a lot. Dotfiles for configuration suck badly. If you start a new application (or if you are in an early stage and have a small userbase), please follow the Freedesktop.org XDG base directory specification. I.e. use .config/applicationname instead of .applicationname for configuration files (unless an overriding environment variable is set), and .local/share/applicationname for data files. And for cache files, use .cache/applicationname (anyone writing a patch for firefox?) What I'd also like to propose is to reduce the number of different configuration file syntaxes. It sucks having to find out which syntax an application uses again and again, because every application is different. We probably won't be able to convince everybody on one format, but we could maybe cut it down to, like 3 formats, please? There is no reason that one application needs to start comments with "#" and another with ";" while a third application uses "//" but doesn't allow "/* comment */"... A small set of syntaxes (preferrably with standardized parsers) should be good enough for just about every application: If we had just these few syntaxes and an appropriate schema description language, we could write generic configuration file editors. That would be very nice. Also we avoid having config file parser bugs by using libraries, and if someone prefers using e.g. gconf or dconf, this could be handled by the library, transparently for the application. (Note that many application lack error handling when writing their configuration files, especially when the disc is full... - they really should be using a library. IIRC xchat also has some bugs of this kind, I remember having tried to patch some of them once when we were preparing for the sarge release, just to find out that there might be many more of them...)

Next.

Previous.