Search Results: "agi"

5 March 2008

Sami Haahtinen: Handling upstream packaging changelogs

For a while now I've been pondering how to handle a package that has Debian packaging in upstream tarball. The upstream packaging is pretty much written by me, so there is no duplication of work. The big problem is the packaging changelog. When ever a new upstream package is released the changelog is changed and since I keep my packaging in a VCS this causes conflicts and I end up manually merging the two changelogs. The problems is, how should I handle this? I'm starting to think that I should move to the Ubuntu style. Just include my changes to the upstream Debian packaging in the last changelog entry and just carry that along with the Debian package. The other options are to for the changelog in to changelog.upstream and my own. That would cause me to loose the upstream changes (if any) unless I mirror them in my own changelog. Or I could just split the Debian packaging from the upstream completely and just keep my own packaging instead. This would make it harder for me to provide the changes upstream that I've made for the packaging. Or I could just try and cope by merging the changelogs manually. It might be easiest to just keep the changes to the upstream packaging in the latest changelog entry since it should be quite obvious to me what I've changed. The downside is that the upstream changelog isn't really that informative and people using apt-listchanges get to see the same changes over and over since some of the changes are kept without including them in upstream packaging.

4 March 2008

Kai Hendry: Gear the Web on mobiles

android on dwm Update (3/3/2008): We’re also working to bring Google Gears for mobile to Android and other mobile platforms with capable web browsers. Here is my writeup of yesterdays Android Code Day in London. Eclipse 3.3 is needed to get the plugin working. Only eclipse 3.2 is in Debian unstable. Download the Europa release and re-setting up the plugin will do it. I’m no Eclipse fan boy, though the integrated debugger works. The iteration cycles are really short for trying stuff out. Very good. Developers, mainly from a Symbian background grilled Jason Chen over security and wanting C API access. Lot of people didn’t seem to like the idea that users were controlling security. I like Google’s “empowering the users” stance, though I think representatives from operators don’t. I heard that poor argument about users asking their operators for android support. Jason argued well that it’s up to user education to contact the right people. When a computer crashes in the UK, who do people call? VirginMedia? Please! :) How about Breakpad crash reporting on Android?. Jason used the OHA to defend Google from looking like they have all the political power… Hmmmm. :) I can understand the tight rope that Google are walking. They are trying not to fragment their platform before it’s properly released. OEMs, operators will feck it up if they have the chance to play with the source code before a Google co-ordinated release. Once they release Google claim they will release everything under the Apache 2 license. So I asked could we see Android on desktops? Jason said there is nothing stopping you. I hope not. Their opened fonts and multimedia codecs on desktop PCs could really make a big difference for Linux take up, especially in Asian (growth) markets. I have studied and implemented Asian fonts and Android’s font rendering even on that nightmare Website sina looked good to me. Despite the “Symbian developers” giving Jason hell in the beginning I had impression they actually liked Android. It fealt almost staged. Scary. Symbian C++ programmers learning Java and jumping ship! Same old problems with images. People are concerned about how bitmap images will scale on different target screens. There is four ‘skins’ already supported in the emulator (QVGA-L+P, HVGA-L+P). We need scalable images too on the Web. ;) Though there are some workarounds demonstrated which seemed OK to me. During the hackathon, I wanted to write a backup/sync tool. Since only Jason Chen seemed to know Android and there was a filled audience, I didn’t get to ask him how really to go about coding it. Though with the help of Dave from Zyb, we eventually found out about content providers. Took some debugging to find that out, but we got there. Having a working debugger is really really nice. We discovered we needed “android.permission.READ_CONTACTS” in the manifest to make our little application that read out the contact on stdout. Cool, though I’d rather use Javascript and the Web stack. Anyway, Android seemed like a good platform, but I have concerns. My biggest concern is basically where is Google Gears on Android? Jason could neither confirm or deny this, so perhaps they have it. Though gears is an opensource project and you can see code reviews… no Android mentioned. What happens if the Android platform is wildly successful? Then we are going to see two major platforms. The Android platform on mobiles and the Web platform on everything else. I worryingly saw no support for Web application device APIs on Android. Encouraging people to write for their Android/java-esque platform undermines their main Web platform! It’s like Microsoft’s mistake of undermining their own platform all over again. From Android you can use Webkit and the Web stack. But from the Web API stack you can’t seemingly access their Dalvik VM APIs. I disclose I am an employee of Aplix (opinions etc. are my own), also a OHA member. I am actively working on a plugin technology that exposes APIs as familiar JS APIs to Web developers. I have already done a proof of concept implementation of Google Gear’s Location API on mobile devices with Aplix technologies. Google you should really do the same and make Web applications equal citizens on your mobile platform by implementing Gears on Android (if you haven’t already).

3 March 2008

MJ Ray: Removing messages from a qmail queue is not a FAQ

I had a call last week from one of our customers that a self-managed server had been attacked and email wasn't running smoothly on it any more. The exploited web app (old version of mambo IIRC) had been repaired and there didn't appear to be a shell-gaining exploit, so what was wrong? Looking at the mail queue gave a clue. I couldn't see anything at first. Nothing. No output. Eventually, qmail-qstat returned and reported over 50,000 emails in the queue, which is pretty high for that webserver. Poking around the mailserver found lots of examples of a few types of spam. I stopped outgoing mail so I could clean up. I don't use qmail much. It hasn't been free software for long and the default upstream packaging (which was being used on that server) isn't very friendly IMO. So, I had no idea how to remove messages from a qmail queue, like exim -Mrm or postsuper -d. I looked at the qmail man pages and the qmail binaries. Nothing. I looked at the qmail FAQ. Nothing. I asked a LUG IRC channel. Something, but no answer. With some web searches, I found mailRemove.py - why is this not in qmail and not even a FAQ? No clear contact details on the FAQ, either.

1 March 2008

Anthony Towns: Been a while...

So, sometime over the past few weeks I clocked up ten years as a Debian developer:
From: Anthony Towns <aj@humbug.org.au>
Subject: Wannabe maintainer.
Date: Sun, 8 Feb 1998 18:35:28 +1000 (EST)
To: new-maintainer@debian.org
Hello world,
I'd like to become a debian maintainer.
I'd like an account on master, and for it to be subscribed to the
debian-private list.
My preferred login on master would have been aj, but as that's taken
ajt or atowns would be great.
I've run a debian system at home for half a year, and a system at work
for about two months. I've run Linux for two and a half years at home,
two years at work. I've been active in my local linux users' group for
just over a year. I've written a few programs, and am part way through
packaging the distributed.net personal proxy for Debian (pending
approval for non-free distribution from distributed.net).
I've read the Debian Social Contract.
My PGP public key is attached, and also available as
<http://azure.humbug.org.au/~aj/aj_key.asc>.
If there's anything more you need to know, please email me.
Thanks in advance.
Cheers,
aj
-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. PGP encrypted mail preferred.
On Netscape GPLing their browser:  How can you trust a browser that
ANYONE can hack? For the secure choice, choose Microsoft.''
        -- <oryx@pobox.com> in a comment on slashdot.org
Apparently that also means I’ve clocked up ten and a half years as a Debian user; I think my previous two years of Linux (mid-95 to mid-97) were split between Slackware and Red Hat, though I couldn’t say for sure at this point. There’s already been a few other grand ten-year reviews, such as Joey Hess’s twenty-part serial, or LWN’s week-by-week review, or ONLamp’s interview with Bruce Perens, Eric Raymond and Michael Tiemann on ten years of “open source”. I don’t think I’m going to try matching that sort of depth though, so here are some of my highlights (after the break).
Hrm, this is going on longer than I’d hoped. Oh well, to be continued!

Steve Kemp: Where troubles melt like lemon drops

I've been re-reading RFC 2822 again over the weekend, for obvious reasons, and I'm amused I've not noticed this section in the past:
3.6.5. Informational fields
The informational fields are all optional. The "Keywords:" field contains a comma-separated list of one or more words or quoted-strings. The "Subject:" and "Comments:" fields are unstructured fields as defined in section 2.2.1, and therefore may contain text or folding white space.
subject  = "Subject:" unstructured CRLF
comments = "Comments:" unstructured CRLF
keywords = "Keywords:" phrase *("," phrase) CRLF
Now we all know that emails have subjects, but how many people have ever used the Keywords: header, or the Comments: one? It'd be nice if we could use these fields in mails - I can immediately think of "keywords" as tags, and I'm sure I'm not alone. I've looked at multiple "tags for mutt" systems, but all of them fall down for the same reason. I can add tags to a mail, and limit a folder to those mails that contain a given tag. But I cannot do that for multiple folders and that makes them useless :( Has anybody worked on a multi-folder tag system for Mutt? If so pointers welcome. If not I'd be tempted to create one. I guess implementation would be very simple. There are three caeses: The first two are easy. The second could be done by writing a cronjob to scan messages for Keyword: headers, and writing a simple index. That could then be used to populate an "~/Maildir/.tag-results" folder, via hardlinks, of all matching messages. Better yet you could pre-populate ~/Maildir/.tag-$foo containing each message with a given tag. Then theres no searching required! (Although your cronjob would need to run often enough when the tag were added to a message it would appear there within a reasonable timeframe. Update: I've written the indexer now. It works pretty quickly after the initial run, and is quite neat! tagging messages with mutt.

Christian Perrier: ITP madness

I'm just back for 45 minutes during this week-end and seeing the ITP madness that currently floods -devel, I'm just getting mad about it. Debian seems to become crazy: we get people popping up and intending to package tons of varous things while dozens of our key packages are rotting in the BTS with bugs piling up over dust because they need new blod to clean them up and keep them alive. Please wake up: what about *maintaining* what we have right now instead of packaging the 42th lightweight HTTP daemon written in <insert obscure programming language name here> while everybody setting up a webserver just installs Apache? :-) PS: I knew I shouldn't have read mail...:-)

29 February 2008

Eddy Petri&#537;or: sarge + cowbuilder = love

Update:
A disclaimer/warning is needed: UNLESS you KNOW what you're doing, you probably are better off building packages for each of the supported Debian distros.


I know it sounds cheesy, but I couldn't find a better name.


At my workplace we are packaging software to work for as many distros as possible at one time. As a consequence the .deb packages we produce should work fine on all Debian distros: oldstable, stable, testing, sid.

To make sure we achieve that, we are building them in an oldstable chroot. OTOH, using pbuilder is very demanding on I/O, especially when entering the chroot and when exiting it. That slows down a lot the build system and is time to change that.


One reliable alternative is to use cowbuilder (part of cowdancer package). What is interesting is that cowbuilder relies on the existance of /usr/bin/cow-shell inside the chroot, so the cowdancer package needs to be installed both in the chroot and the host machine.

But cowdancer was not a part of sarge, so, if you try to create a new sarge cow directory with cowbuilder, it will fail at the end saying it didn't found the cowdancer package. Also trying to login via cowbuilder --login will complain it didn't found /usr/bin/cow-shell.


The fix for this is simple, once you figured it out and saw that cowdancer is available in sarge as a backport:
cowbuilder --create --distribution sarge --basepath /var/cache/pbuilder/sarge.cow --othermirror 'deb http://www.backports.org/debian sarge-backports main'
You may prefer to be sure that the only thing from backports is cowdancer and use a more hands-on approach[1]. Also, this will eliminate the need to correct later the apt sources to exclude backports[2].

Write the same command as before, but omit everything starting with --othermirror. Then install by hand the package in the chroot.
twix:/home/eddy# cowbuilder --create --distribution sarge --basepath /var/cache/pbuilder/sarge.cow
twix:/home/eddy# chroot /var/cache/pbuilder/sarge.cow
twix:/# wget http://ftp.de.debian.org/backports.org/pool/main/c/cowdancer/cowdancer_0.23~bpo.1_i386.deb
twix:/# dpkg -i cowdancer_0.23~bpo.1_i386.deb
twix:/# rm cowdancer_0.23~bpo.1_i386.deb
twix:/# exit
twix:/home/eddy# cowbuilder --update


Since after the bootstrap all .deb packages will be in the apt cache in the chroot, you might want to save some disk space:
twix:/home/eddy# cowbuilder --login --save-after-login
twix:/# aptitude clean
twix:/# exit

That's it!


If anything is broken somehow, missing or whatnot, cowbuilder --login --save-after-login is your friend.

[1] the initial bootstrap does not pull from backport anything else but cowdancer
[2] since you want to compile for plain sarge, not sarge+backports ;-)

28 February 2008

Andrew Pollock: [debian] It's all Bob's fault (or 3 years of maintaining dhcp3)

So today is the third anniversary of my first upload of the ISC DHCP v3 package to Debian. It all started back in the days of the linux.conf.au 2005 organising committee. Bob Edwards, who ran the ANU Department of Computer Science computer labs (which ran on Debian at the time), was constantly complaining about bugs like #286011, once he'd found out I was a Debian developer. So I figured I'd try and do something about it, so I think I emailed the maintainers, who had been fairly inactive (the last upload before mine was in July the year before), and asked if they'd like me to NMU the package. I think Matt Zimmerman emailed me back and told me to knock myself out, and add myself as an uploader while I was at it, and well, the rest is history... I've had fun fixing bugs, trying to clean things up, deal with a pretty archaic upstream build system and get the package up to current Debian standards compliance. One of the highlights was being able to finally get rid of Debian Installer's dependence on the v2 DHCP client package, so we could finally jettison the v2 packages for Lenny (which reminds me, I still have to figure out how to handle the transition from Etch with respect to that). I've been working hard to try and get as many of the patches in Debian's DHCP packages incorporated upstream. Unfortunately, they have a totally unpredictable release cycle, and they have feature releases and bug fix releases. The feature releases are very few and far between, and they won't introduce new features into a bugfix release. Speaking of patches, my personal philosophy is that distribution packages shouldn't differ radically in behaviour or functionality from their upstream source, so I've resisted incorporating some of the more deviant patches from Ubuntu, instead forwarding them directly upstream. There's still a bit of work to be done with the package. The ISC released version 3.1.0 a while ago, and that's the version I'm trying to standardise on for Lenny. It's got new support for a domain-search option, which means people can stop abusing the domain-name option to set a domain search list in their clients. The domain-search option is also honoured by Mac OS X (Leopard), and I dare say Windows Vista probably supports it as well, but I haven't checked. Unfortunately the client-side support for the domain-search option is a bit flaky in 3.1.0, so I'm hoping the ISC will release 3.1.1 real soon now, as I believe most of the flakiness issues are addressed in it. Of course, for Lenny to do the right thing consistently with this new option, #460609 and #465158 need to be resolved also. The last thing I'm trying to sort out for Lenny is the reasonably in-demand LDAP patch. It's been floating around out-of-tree for longer than I've been maintaining the package. Jos L. Redrejo Rodr guez has been kind enough to clean up the patch for me, so that rather than bastardising the standard DHCP package to build a dhcp3-server package that has LDAP support, it basically builds DHCP twice, once with the patch and once without, and the dhcp3-server-ldap package just diverts /usr/sbin/dhcpd3 out of the way and plonks in the LDAP-enabled binary in its place. I hope to upload a new revision of the package that builds this new binary package within the next week (hopefully this weekend). After that's done, and hopefully 3.1.1 has been released, and Lenny is out of the way, I'm going to focus on transitioning away from a versioned set of DHCP packages. The whole "3" in everything was to allow the v2 and v3 packages to coexist. I've sought advice from the release team about this, and they said not to bother, but it feels really gross to have the version 4 package (4.0.0 has been released by the ISC for a while now as well) be still called dhcp3, and to install into /etc/dhcp3 and other such versioned directories. The final thing I want to look into is collaborative maintenance. I've been wanting to do this for a while, but I wanted to get the package into a revision control system (shock horror, it's not currently) and I've been baulking at how to do it the "right" way. I'm pretty sold on using Git for the revision control system, I just haven't figured out the right approach yet. Martin Krafft's articles about it have been interesting, but feel a bit overly advanced, and don't quite suit my situation. I've been hesitant to start using Git, then discover I've done it all wrong, and have to start again. I need to just bite the bullet. My upstream also doesn't use Git, and doesn't make their revision control system publicly available, so I just get the tarballs when they're released. Speaking of upstream, I made the discovery last year that they're just down the road from me in Redwood City, so I've been trying to improve relations by getting the main folks who work on DHCP at ISC to pop up to Google for lunch every now and then, which so far has happened twice, and been good a opportunity to have a chat. In fact, they're keen for Debian to join the DHCP Forum (Debian is already a member of the BIND Forum) and I think they've started talking to the Debian folks responsible for our BIND Forum membership about extending that to cover the DHCP Forum as well. So that's about it. I think after three years of being the sole uploader, I'll formally put myself in as the maintainer and Eloy as an uploader until I get around to implementing collaborative maintenance.

27 February 2008

Roland Mas: GForge in Debian, February 2008

Quick status update: not much happened due to a variety of reasons, but there is still some progress to report. The most important piece of news is that the Mediawiki plugin should be on its way to Debian sid by the time you read this, as the new gforge-plugin-mediawiki binary package (it'll have to go through NEW, but that seems to be rather fast these days). Testing and reporting and bugfixing are most welcome, of course. I also went through a round of cleanups in the packaging. No more Lintian overrides, far fewer Lintian errors and warnings, and some fixes for PostgreSQL 8.3 compatibility.

25 February 2008

Sylvain Le Gall: planet.ocamlcore.org

Since 4 hours, the planet of ocamlcore.org is online. This is the first service provided by ocamlcore.org to the OCaml community. In fact, ocamlcore.org team has decided to release it today, because Erik Castro de Lopo ask a question about another OCaml planet in China. The one in China seems to be gathered through google search... Putting online the planet is also the occasion to test a little application to manage feed subscription: ocaml-planet. This script is quite trivial but it was a good first experiment of managing CGI/sqlite through OCaml. The application should help us to control subscription of feeds. I think this is a better way to subscribe than letting people commit changed planet.conf in some kind of SCM (like we do for planet debian). Once the forge of ocamlcore.org will be online, we will publish the source code of this application. I hope that this planet will be of some help for the OCaml community... http://planet.ocamlcore.org

Sylvain Le Gall: Back from FOSDEM

I have spent one day and a half this week-end at FOSDEM. This was not as great as expected, but mostly because i don't have the time to stay the whole sunday. Next year, I will stay the whole week-end in order to have time to attend all the speak i should be interested in. The beer event was overcrowded, but all the beer i found there was great (in particular the Floris Pear). It was also a great time to have a demonstration of the XO OLPC laptop. This little thing is funny, but i don't get the way the UI should be used. Another bad point, is that the first console allow to login as root by pressing "Enter" (at least on the one i try). I suppose this kind of device is not intended to be secured. I also have time to talk with some Debian people and some other people -- in particular one who was thinking that Windows 2000 is the best ever OS. At least, it means that there were people from different horizons -- and this is a good thing. During Saturday, i spend half of the day in the big amphitheater (Janson). The talk about Tux with Shades (Linux in Hollywood) was impressive, regarding the trailer they show us... The talk about FreeBSD was interesting -- but not impressive as a trailer. I spend Saturday afternoon in the Debian devroom, following all the different talks. I miss the one from MadCoder about managing packages with git... That's a shame because i really want to see this one. Since my train was at 12am on Sunday, i choose to only pay a visit to the different booths. I have the pleasure to have a demonstration of the EeePC on the Debian booth that really please me. I found the UI more easy to understand than the one from XO. Speaking with the person demonstrating the laptop, she explained me that EeePC is more "standard desktop" and XO more "creative desktop". Conclusion: i am not creative ;-) Also talking about everything around talks and the meeting, i think Bruxelles is a really nice city for this kind of events. ULB is not near the center of Bruxelles but there are enough transportation. There was really a lot of people attending FOSDEM, and this is a good thing. I also have the pleasure to find some people from the OCaml Meeting.

24 February 2008

Jaldhar Vyas: The 2008 Things Jaldhar Discovered Last Year That Everyone Else Knew About Already Awards

And the Golden Sombrero goes to... Another awards show took place today but nobody is paying any attention to that. All of Hollywoods elite can be found at the King Plaza Buffet in Jersey City for the 80th annual Things Jaldhar Discovered Last Year That Every Else Knew About Already Awards. (Known in the industry as "the Golden Sombreros") Here is a list of the winners. Game: Hungry Hungry Hippos This game is awesome! But don't play with three year olds. They cheat. Book: Discworld series by Terry Prachett When The Color Of Magic came out in 1983, I dismissed it as merely "The Hichhikers Guide to Mordor" but last year I read it again and this time it grew on me. Since then I've been steadily reading the whole series since June at an average of one a week. Music: Rammstein Smell the umlauts! I have no idea what they are actually going on about but this is what Metal is supposed to sound like. Mental Condition: Oedipus Complex All of sudden last October or so, my son started screaming and crying whenever I got anywhere near my wife and he would cling to her like the proverbial limpet. Then three months later, just as suddenly, he stopped. Very strange, not to mention creepy. Linux command: grep --color=auto Everyone knows GNU ls can be colorized but did you know the same is true of GNU grep? I didn't. Why wasn't I informed of this earlier? L. Ron Hubbard Lifetime Achievement Award: Coke Zero I used to drink way more Coke than was good for me so I decided to give it up. Diet sodas don't taste very good so I was resigned to not drinking soda at all. Luckily for me Coke Zero has no calories or sodium but does have caffeine and a taste like actual Coca-Cola. Perfect!

Sam Hocevar: Bits from the DPL: FTP assistants, marketing team, init scripts, elections

Not going to FOSDEM Hello, dear developers. I suppose many of you are currently at FOSDEM, but unfortunately I could not attend the event this year. Here are some news for you anyway! FTP assistants I am very pleased to let you know that yesterday Peter Palfrader (weasel) added Kalle Kivimaa (killer) and Thomas Viehmann (tviehmann) to the list of FTP assistants. I still hope that more people can be added soon to this team, but this is definitely good news. Marketing team At the various conferences I attended I have paid much attention to how other distributions and FOSS projects were promoting their work, and despite us often having t-shirts, stickers and posters like the others, we really miss a few things which would make Debian as appealing as other, dynamic projects. I would like to set up a Debian Marketing Team, whose work would be to organise all the promotional stuff (logos, t-shirt designs, wallpapers, etc.) so that the project can officially endorse good designs, and to make the ultimate decision on visual stuff such as CD covers, splash screens, etc. This team would have official DPL delegation, but I hope that it can also work with non-Debian-developers, as many packaging teams already do, because the non-DDs know better than us how to draw people to Debian. So please let me know if you are interested, even if you are not a DD, and especially if you are not a programmer! I also would like to spend some Debian money on a contest, similar to the FreeBSD logo contest, to create a friendly mascot for the Debian project (in a similar way to the Linux penguin or the GNU gnu) that we can use where the logo is not enough. More on this in a few days. Development news Last month Petter Reinholdtsen (pere) gave some news about his project of improving the init system. This is almost as simple as adding LSB headers to your init scripts, and work is advancing towards this goal, though not as quickly as desirable. If your packages have init scripts, or if you wish to help, I urge you to have a look at the proposal so that we can have it in Lenny. DPL elections The new DPL term is in almost 2 months, but campaign starts next month. I have already stated that I would not run again, and haven't changed my mind. As many, many Debian developers are attending FOSDEM, I hope you can use some real-life meeting time to discuss the people you think would make good DPLs and tell them. Maybe they haven't thought of running (or re-running). Being DPL does have an impact on your real life. If you are still wondering whether to run, or have any personal questions, feel free to ask me, I'll gladly share my experience.

22 February 2008

Sebastian Harl: collectd 4.3.0 uploaded to unstable

Yesterday, collectd 4.3.0-1 has been uploaded to Debian unstable. The most important changes since 3.x are (in chronological order): See the changelog for details. About collectd:
collectd is a small daemon which collects system information periodically and provides mechanisms to monitor and store the values in a variety of ways. It is written in C for performance. Since the daemon doesn't need to startup every time it wants to update the values it's very fast and easy on the system and allows very fine-grained statistics.

Bastian Blank: Broken DVDs

Today I got another broken DVD. It is the special edition of The Shawshank Redemption. It is rather new and libdvdread just chokes on it. At least the old one does, while the version in sid is able to read them, thanks to a small patch. The DVD exploits a feature of the standard. The filesystem on it (UDF) provides a size for the info files (VTS_XX_0.IFO) and the corresponding backup file (VTS_XX_0.BUP). This sizes are void, only the offsets within the files matters. The sizes are just too small and libdvdread checked that while reading them. Thanks to the patch, libdvdread now updates its internal knowledge while parsing the file. With the fix it is possible to play the DVD, at least with mplayer. But I want to play it on my machine without optical drive. I used dvdbackup to read other DVDs but it simply failed this time. This DVD also have broken backup files. They have different sizes, sometimes they even look empty, and contents than the real ones. With the corrent amount of force (just ignoring them) and some magic (#467075) dvdbackup copies something to disk which is playable with mplayer (libdvdread) and totem (libdvdnav). Okay, nothing is complete. This DVD contains another title set which seems to be never referenced. It have a completely bogus info file and a 1GB menu VOB. As I have a copy now, I'm away, watching a really great movie.

Benjamin Mako Hill: Credit Card Numbers

Every since I found out that the first digits of any credit card denote the issuer identifier (i.e., folks can tell who issued a credit card and what type it is just from the first digit or two) I've been annoyed almost each time I have to input credit card information on the web. Any decent credit card system knows that if a sixteen digit credit card number starts with 4, it's a Visa. And yet, each time anyone buys anything on the web, they must select "Visa" from the drop-down box. On a certain level we all know this; People in stores and restaurants never have to select the type of card before swiping. /copyrighteous/images/amazon_cc_selectbox.png When I'm feeling generous, I imagine this is so that the credit card companies can give an extra reminder that they only accept certain credit cards -- not being able to select a card type in an "essential" input field constrained to multiple choices is a pretty strong reminder. When I'm feeling less generous, I suspect it might be so that the companies can subtly remind us that they have their own brand credit cards that we might like to acquire.

21 February 2008

Tore S. Bekkedal: A very cute bug

Today, in a fit of fool-Hardy-ness, I upgraded one of my computers to the most recent Ubuntu development release, codename Hardy Heron. Amongst the several other bugs I encountered (the kernel not booting was a rather noticable one…) was this adorable little bug in tracker. (Some background info: Tracker is a file alteration monitor - like Apple’s Spotlight, and …whatever the Vista knockoff is called. ImageMagick is an image processing utility, invoked with the command “convert”.) So - picture this situation: Tracker is searching along, and encounters a graphics file. Being a graphics file, Tracker realizes it wants a thumbnail. Tracker calls convert. Convert creates a temporary file. Tracker notices a file has been created. It notices that this file is an image file, and therefore wants a thumbnail. Tracker calls convert… You can guess what happens from here on. :) This lovely bug reminds me quite a lot of a story I read a while ago which had been uploaded by Eric Smith to his wonderful PDP-6/PDP-10 resource and folklore website, “I/O Deja Vu, A Farce in One Act“. Worth a read. Update: Within ten minutes, the very helpful Saleem Abdulrasool (”compnerd” on IRC) helped me debug it and comitted a change to upstream, so it’s fixed in the next release (expected in a few days). Filed a bug on the Ubuntu package. I love FOSS. :)

Davide Viti: Font tips #2: comparing fonts

Being able to compare images can be really useful sometimes; I found it extremely helpful when I wanted to know what changed between two releases of the same font. Imagemagick does the trick via a set of really powerful command line tools. Here's a very simple demonstration:
  
pango-view --font="DejaVu Sans Mono" -t "Hello World" -w 180 -q -o a.png
pango-view --font="DejaVu Sans Mono" -t "Hello world" -w 180 -q -o b.png
compare a.png b.png hello_diff.png
which results in the following output: We can now apply the previous tip to something more useful; let's say we want to know how the glyphs in a font changed from a release to another. In a previous post I've explained how to render all the glyphs into a nice PDF using fntsample; we just need to create PDFs for both releases and compare them... ain't that easy?
# Let's suppose you have already created PDF files inside the following dirs
a=dejavu-2.22
b=dejavu-2.23

vsdir="$ a _vs_$ b "
mkdir $vsdir

for f in $(find $a -name '*.pdf') ; do
f=$(basename $f)
apng=$ a /$ f/.pdf/
bpng=$ b /$ f/.pdf/
mkdir $ apng $ bpng

echo "*** $ f ***"

# pdf -> pngs
convert $ a /$ f $ apng /$ f/.pdf/ .png
convert $ b /$ f $ bpng /$ f/.pdf/ .png

# compare pngs and, if different, show whre they differ in a png
for p in $(find $ apng -name '*.png') ; do
p=$(basename $p)
meas=$(compare -metric AE $ apng /$ p $ bpng /$ p $ vsdir /$ p 2>&1)
if [ $ meas -eq 0 ] ; then
rm $ vsdir /$ p $ apng /$ p $ bpng /$ p
else
echo " - $ p "
fi
done
done
This is what you get when a glyph was modified: In case of newly introduced glyphs you get the following:

19 February 2008

Jeff Licquia: Its Not Like You Care About Your Documents

Recently, as part of the many antitrust/anti-competition legal actions they’re suffering under, Microsoft released specifications for the old Office binary file formats. As expected, they’re big and complex. Joel Spolsky (a former member of the Excel team) had some thoughts on their size and complexity:
With a little bit of digging, I ll show you how those file formats got so unbelievably complicated, why it doesn t reflect bad programming on Microsoft s part, and what you can do to work around it.
The digging turns up reasons that make some sense: the limitations of older computers, feature creep, a complete lack of attention to the future. But it’s hard to see some of these reasons as “why it doesn’t reflect bad programming on Microsoft’s part”. Carelessness is common, sure, but we don’t call it a virtue because everybody does it. And these are problems that should have been on someone’s radar at Microsoft. It’s one thing for a grunt programmer to hack a feature to meet a deadline; it’s another for the management to simply go along with it, or to not order a rethink when the problems come to light. When you read about hacks like the following, everything sounds nice and reasonable, until you remember what the end result is: that Microsoft Excel doesn’t have a standard format for storing and manipulating dates!
There are two kinds of Excel worksheets: those where the epoch for dates is 1/1/1900 (with a leap-year bug deliberately created for 1-2-3 compatibility that is too boring to describe here), and those where the epoch for dates is 1/1/1904. Excel supports both because the first version of Excel, for the Mac, just used that operating system s epoch because that was easy, but Excel for Windows had to be able to import 1-2-3 files, which used 1/1/1900 for the epoch. It s enough to bring you to tears. At no point in history did a programmer ever not do the right thing, but there you have it.
It may not have been the wrong decision, in the sense that it enabled them to ship, and shipping is everything in some circles. But as a design decision, how can anyone defend such inconsistency? Business information technology was able to move forward in the early ’90s because older document formats like 1-2-3 and WordPerfect were simple enough to import easily into Microsoft Office. Today, when we talk about moving to open-source suites like OpenOffice or online systems like Google Docs, detractors left and right cite the pain of document conversion as a reason to hold back. But if Joel is right about the old binary formats, the pain of transition is like the pain of changing your oil: you can pay now, or you can pay a lot more later. Even Microsoft is having trouble opening its own files from long ago, with “long ago” being a period measured in years, not decades. Maybe you didn’t write anything a decade ago you’d care to read again today; maybe you can’t imagine any of your stuff being worth reading a decade from now. Do you want to take that chance? Thankfully, I was a geek, and kept most of my documents in plain text. Today, I take care to save important documents in formats and encodings designed for the long haul, like Unicode, ODF, and PDF. It helps that I avoid Microsoft software like the plague. (If you think they’ve changed since the bad old days, just surf the web in Firefox on Linux sometime, and see how many badly-rendered pages look much better when you switch their text encoding from Unicode to “Windows-1252″.) If you have a lot of Office documents, even if you’re happy with Office, you might consider whether you care about opening those documents ten years from now, and whether you’d rather take the time to future-proof them while you still can.

18 February 2008

Michal &#268;iha&#345;: Network manager not working?

For a long time I had problems on my work computers with Network manager still thinking that it is not connected. And I was really lazy to debug it. But as more and more application take online/offline settings from it, this became more and more annoying. After some googling I found out that the problem might be in /etc/network/interfaces file, which is parsed by Network manager. Some "complex" things might confuse it. Well in my case the complex thing was calling of some script in post-up. Commenting this out magically fixes everything. Moving script to /etc/network/if-up.d/ also is not a big problem, but why the hell the Network manager thing does not tell where the problem is?

Next.

Previous.