Search Results: "codehelp"

14 December 2008

Neil Williams: A Debian morning

A variety of Debian tasks all lined up in the top priority - get it done now or not at all - work queue this morning. Two GR's, one RC bug fix and one long overdue experimental upload.
All I'm saying about the first GR (the "anti-ganeff" vote) is 2212. That was the most ridiculous GR I've come across so far, until vote3 which is just politics gone insane. My own opinion? 7235146 which disagrees quite a lot with bubulle even though I have the same aims as bubulle - that alone indicates the nature of the vote. The options are illogical, the vote is pointless, the subject matter is moot, the initial proposal doesn't have any understanding or relation to the real world and the amendments have been unnecessarily divided in such a way to make it all but impossible to be logical in the vote priorities. The abuse of votes by a vocal minority undermines the process itself. All in all, we desperately need an option that basically says stop being pathetic and get something useful done in all future GR's - as well as making it harder to make a GR in the first place. Over use of referenda is as poisonous to democracy as under use - just ask Ireland.
After all that political spin and muck spreading, I had to just do something useful as a partial compensation. So, after a ping from the MIT BSP I've fixed 507316.
I've also made the tslib experimental upload that has been quietly developing on my own system for a few days.
Right, now I'm getting back to adding more packages to Emdebian Grip - so far, we have enough packages for a basic XFCE/Gtk system with an email client, a blog client, a few GPE games and Thunar as file manager. Now need to add iceweasel and dependencies. Once that is done, I'll be switching my Acer Aspire1 from Debian Lenny to Emdebian Grip unstable and creating a testing repository for Grip. Once I've got some figures from that switch, I'll post some more details to debian-embedded@lists.debian.org.
Sigh. Emdebian Grip was meant to go alongside Debian Squeeze - it looks now as if Emdebian Grip will be released before Debian Lenny - it's even likely to use the Lenny installer and debian-live support. I hope the pedants are happy because I'm not.

Pierre Habouzit: Vote 2008/003

This vote is a joke. It mixes very different questions, among them: And you're supposed to make one single option win. Not all options deal with those three questions at once. So definitely, like Julien states it: It's a TRAP. That's why there is one and only one winning stategy to that vote: This vote is a perversion of our voting system, don't fall for it. Edit (answer to Neil): Neil, you don't get it, if you make anything else than Further Discussion win, you actually let one option of the vote win. As most of the ballot options only answer at most 2 of the underlying questions I cited above, and only one for many of the options, you give the power to the secretary to decide what the option you voted for meant. This is unacceptable, therefore, you have to put further discussion first. We just don't want to let one single man (that showed that he's totally unable to prepare a sane vote, without pushing his agenda at the same time) decide the real issue of the vote.

7 December 2008

Neil Williams: langupdate for Emdebian Grip - borne from edos-debcheck

Whilst building more and more packages into Emdebian Grip, I came across gettext
which depends on libglib2.0-0
which surprised me somewhat. However, this is extremely useful because langupdate - the Emdebian-only utility that I wrote to correlate Emdebian TDebs with installed packages and supported locales - also uses libglib2.0-0 as it is one of my favourite libraries for all my C code. So now there is no need to rewrite langupdate to not use libglib2.0-0 (I wasn't looking forward to that particular task so it's even better).
Secondly, I thought about using reportbug --kudos edos-debcheck but AFAICT that merely sends an email to Stefano Zacchiroli so I thought I'd put the "kudos" into a blog post for more people to read:
If you haven't used edos-debcheck before you probably haven't done any work at all with repositories - edos-debcheck is becoming fundamental to everything I do. Emdebian simply could not function without these checks - it would take hours to identify the missing dependencies. (I know because before edos-debcheck was released, I did spend (s/spend/waste/) hours upon hours on a fruitless chase through the dependency trees in Debian.)
Consider my current task - adding packages to Emdebian Grip in such a way as to retain the smallest possible package set in which all dependencies are met (excluding Recommends that do not apply in Emdebian). edos-debcheck makes it almost trivial:

codehelp@ant:/org/emdebian$ ./scripts/grip-binary.sh libxml2
....
codehelp@ant:/org/emdebian$ edos-debcheck -explain -failures < grip/dists/unstable/main/binary-amd64/Packages
Parsing package file... 0.0 seconds 135 packages
Generating constraints... 0.0 seconds
gettext (= 0.17-6em1): FAILED
The following constraints cannot be satisfied:
gettext (= 0.17-6em1) depends on gettext-base NOT AVAILABLE
Checking packages... 0.0 seconds
codehelp@ant:/org/emdebian$ ./scripts/grip-binary.sh gettext-base

Simple. A second script then goes around behind and ensures that each binary added to the repo has the corresponding source package also added. The key is that Emdebian Grip does not have to have all binaries from that source - we only use the binaries that are needed, either directly or as direct dependencies of others.
Zack - and all the people who worked on edos-debcheck - your code is just indispensable to me.

29 November 2008

Neil Williams: Extremadura and TDebs

Let's start with a caution: this is a work-in-progress and is aimed at Squeeze (for the tools) and Squeeze+1 for the actual TDebs. Nothing about TDebs will happen within Debian any time soon. DebConf9 could be an important step in the work - as long as we've released Lenny by then. ;-)
Various steps and decisions have been discussed and tested during the meeting, to the point where we now have an early draft specification for tdebs.
See also details of the ftpmaster meeting and progress on i18n and tdebs.
The draft spec includes links to the current resources, including links to git repositories for the changes being tested for dpkg and debhelper.
These changes will supersede the existing experimental scripts in the emdebian-tdeb package.
The spec will continue to be updated during the rest of this meeting and I'll continue working on the dpkg and debhelper support.
(A trivial patch for CDBS support is already done, dependent on the debhelper support.)
Next on my ToDo list is Emdebian Grip - including a few tweaks to em_installtdeb.

25 November 2008

Neil Williams: Unexpected functionality

Following from unexpected results, I can't make up my mind why Gtk+ supports rotated labels.
Try it, load Glade3, create any normal Gtk window and add or select a standard GtkLabel, add some text. In the properties of the label, there is a spin button for Angle:. Why is that? Which applications have need for this? I can't think of any examples that I've seen in Debian. Does anybody use rotated labels?
I could possibly understand rotations in increments of 90 degrees but this supports rotation at an precision of two decimal places! I mean, why support a rotation of 89.27 degrees?
Even if this was a version of a progress bar, why is it supported for every GtkLabel anywhere?
Weird.
P.S. Off to Extremadura tomorrow, hopefully I'll have a chance to get a better hackergochi too.

5 November 2008

Neil Williams: Componentisation of Debian/Emdebian

OK, I know I've been very quiet on the blog for weeks now but I have my reasons and all will become clear, eventually. I'm principally waiting for the Lenny release before being able to start full discussions about certain ideas that have been consuming a lot of my time recently. I continue to do what I can to get Lenny out of the door because the wait is driving me nuts. (Fixed another RC bug yesterday, yippee!)

Anyway, something I can talk about is Emdebian Grip. Emdebian has always wanted to support "in-between" devices that don't need the full-on cross-build everything approach of the current Emdebian packages for ARM but don't quite have room for a full Debian install either. Until I had at least a basic package set available via the cross-building system, I didn't want to start working on an intermediate system, for reasons of simplicity mainly, but also because I knew that getting a cross-building package set would involve changes to the tools needed for the intermediary set.

Bah, I'm waffling again. For the background, see Emdebian, Squeeze, Grip and Crush.

The good news is that Emdebian Grip, once running, will take far, far less time (for everyone) than the full-on cross-building malarkey of Emdebian Crush. Grip can be 99.9% automated by breaking Debian into discrete package sets or 'components'.
Componentising Debian for Emdebian
Emdebian Grip is about a smaller Debian, nothing more. No changes in functionality, no changes in dependencies; only changes in final installation size and Packages.gz size. It means using the code from dpkg-cross to unpack packages, remove unwanted files and repack the .deb. Yes, yes, this can be done one package at a time at a trivial level. Emdebian Grip seeks to bring a standard method for this operation that will work for all packages on any architecture for any architecture from any suite, creating and maintaining repositories of "gripped" packages for use in devices like my Acer Aspire1 where you just don't need documentation, manpages and the rest. Squeeze is the obvious target release but any release supported by the current version of dpkg could be "gripped" too, like oldstable.

The componentisation comes in at the level of the Packages.gz file. If the device cannot realistically be expected to run CAD software or has no fancy graphics or other power-hungry hardware, why should packages that need such resources clutter up the apt-cache list? This data isn't just slowing down searching for packages you do want, it slows down every installation process (that bit about 'Reading database . . . . . '), it slows down the process of getting the updated cache data in the first place because there is more of it, it wastes space on your device in several different places when the whole point of Emdebian is that disc space is not cheap and it wastes your precious battery power if you need to do simple package management stuff away from the mains. What is needed is a mini-repository, a mini-mirror that just contains the parts of Debian that your machine needs - a "well-trimmed" mirror with sources and all dependencies satisfied, a mirror that can be automatically updated but which doesn't keep getting NEW packages that you won't use. New dependencies will be added, yes. New packages unrelated to what you currently use? Absolutely not. You could even keep a mini-mirror on your home network, updating and "gripping" while you sleep, because a mini-mirror should be a lot, lot smaller than a standard Debian mirror.

I now have a script that will do the work, what I've lacked is the idea on how to "feed" packages to the Gripper. :-)

So, I'm going to be exploring this method:
  1. An arbitrary package set - say the output of 'dpkg -l' from the target machine setup by an expert, or 'dpkg --get-selections' or just the packages from a normal debootstrap - the basic idea is to start with only the packages you absolutely must have for your target device.

  2. A very small wrapper for some debootstrap code that downloads those .debs from the Debian mirrors - debootstrap can cope with choosing the mirror, the architecture, the suite etc. (already written, landing in Emdebian SVN soon).

  3. Parse the list of packages (.debs) and use 'apt-cache showsrc' to convert into a list of source packages. (Script done).

  4. 'apt-get source' to match the source package to the binary. At this point, we have what amounts to a partial mirror but with very well defined limits. There are other ways of doing the same thing so anything that gets you to this point is as equal as the steps above, as long as the .debs exist alongside the .dsc and all associated source package files. What you need is full control over the list of packages at this stage, we'll worry about dependencies later.

  5. Simple scripting parses the .dsc to create suitable debian/files content (done).

  6. dpkg-genchanges regenerates the .changes file - critical for keeping the Gripped packages with the correct source packages in the final Grip repository

  7. Now run 'emgrip' against the .changes file to convert the .debs, update the .changes file with the new, smaller, .deb details and copy everything into a suitable incoming/ directory.

  8. point your repository software (tested with reprepro) at the incoming/ directory and generate your Gripped repository - which only contains the packages you listed at the start, just smaller. reprepro has a neat way of allowing foobar-1.2.3-2 to be included even if foobar-1.2.3-1 does not exist in the repository, as long as foobar_1.2.3.orig.tar.gz exists somewhere that reprepro can find and even though foobar-1.2.3-2.dsc does not mention the .orig.tar.gz. Neat! (Tested and working.)

  9. Run 'edos-debcheck' against the repository and "catch-up" with whatever packages are needed to make the repository as a whole "trimmed" (no unresolved dependencies).

  10. Keep the update script running as a cron task to pull updated packages from incoming.debian.org, run the .changes through emgrip and update your repository.

  11. Clean out the .debs, leave the source packages and restart the process for another architecture. (Crafty!)

  12. Possibly, to support those who can afford to do a small amount of compilation on their Emdebian Grip device, add a second repository that provides the Build-Depends that may be missing from the initial package set - stuff like automake and pkgconfig. Depending on how that works out, it might not be many packages and it may be easier to fold them into the mini-mirror anyway.

  13. Instead of 20,000 packages, I'm expecting something closer to 2,000, per mini-mirror.

  14. The process of "gripping" a package also drops numerous control fields (like Homepage and VCS*), as well as Recommends, Suggests and Enhances as well as truncating the long description at a maximum of four lines - all in the name of reduced package data sizes.

  15. The end result is that each mini-mirror contains a component package set for Emdebian Grip, using Debian packages. Mini-mirrors are still "well-trimmed" (no unresolved dependencies) because you get to choose which packages you include and if a particular package tries to bring in both Gtk and KDE dependencies, you can choose to omit that package and use a different one.

  16. Whether Emdebian Grip will or should support dropping certain binary packages from the repository is a difficult issue - Emdebian Crush is probably the preferred route if you need to start optimising an Emdebian Grip mini-mirror that harshly.

  17. Another wrapper will be needed to clean out cruft (old dependencies, outdated packages etc.) - that one may be harder to achieve by automation.


The first Emdebian Grip repositories will be for ARM, armel and i386, based on an XFCE environment package set.

"Gripping" all the packages in my /var/cache/apt/archives (about 1Gb) took about 30 minutes on a fast laptop that was doing other things at the time - the real packages will be "gripped" on the Emdebian server and for multiple architectures in sequence. It's certainly conceivable that any number of mini-mirrors can exist with any number of package sets (components), all with "gripped" packages. You can choose to "grip" .debs upon download from a normal Debian mirror but that wastes time if there is more than one device, it wastes space in /var/lib/apt/lists and /var/lib/dpkg/ and wastes bandwidth. For portable devices that you want to be using, not updating, I think that a mini-mirror is a worthwhile bonus.

Expect a 20% reduction in installation size (for more, you'll need the cross-building, functionality-modifying Emdebian Crush shebang) but a large decrease in the size of all the apt-cache data and dpkg status data. I'm hoping to push towards 30% reductions but most of these figures are guesswork right now.

And beyond the mini-mirrors? Debian-Installer, of course. I really need to set some time aside to prepare an Emdebian Grip installer using current D-I. Simple things like:

It really, really annoys me that I have to spend ages getting devices like the Acer Aspire1 working properly under Debian and that I have to take particular care during the installer to change the Debian default to something more sane for that kind of device. For Debian to be The Universal Operating System, the installer needs to be as smooth on an NSLU2* as on a standard desktop, a fast server and a cluster. This isn't just an architecture thing, there are big and small devices in all architectures, it needs to be a machine:variant thing. Mini-mirrors of single components are a start and part of the bigger answer is to support machine-specific configuration packages in these mini-mirrors. Packages that only exist in a specific mini-mirror and are specifically designed to setup a host of machine-specific settings, blacklist certain modules and enable others, set sensible settings in /etc/fstab and other places based on results from things like powertop, turning off features for some devices and turning them on for others. The whole point of such packages is that what they do would be insane on what would currently be considered a "typical Debian machine".

*(I'm not talking about an NSLU2 with an external hard drive here, I'm talking about fitting Emdebian Crush into the 6.4Mb of space on the NSLU2 itself so that external hard drives can be hot-plugged, as well as devices like the OpenMoko and iPAQs etc.)

Don't get me wrong, D-I does a fantastic job for the kinds of devices Debian currently supports but there are a host of other devices out there that need customised solutions where a mini-mirror and a machine-specific configuration package can remove huge amounts of hassle from the actual installation process. Emdebian Crush already uses machine:variant specific packages and the current Emdebian packages repository is, itself, a mini-mirror, albeit not well trimmed.

Let's make the most of "Debian Squeeze" - let's squeeze it onto more devices and make it even easier to get Debian onto anything.

1 November 2008

Francois Marier: Preventing accidental deletion of important files using safe-rm

Some weeks ago, I accidentally deleted half of my /usr/lib. I didn't lose anything important and was able to restore everything (thanks to my Ctrl+C'ing the process in time) but that user error did strike me as too easy to make (apparently, I'm not alone). So I started thinking about how I could prevent something like that from happening again.

I realized one thing: there is no way I would ever want to delete /usr or /etc for example. I figured that "rm" should, by default, refuse to delete certain critical directories (or files). Of course, that would be a very controversial patch to "rm" itself and the chances of this approach succeeding were pretty close to zero.

So instead, I decided to build a wrapper around "rm" which prevents the deletion of important files by checking each one against a blacklist. Anything you add to the blacklist will not be deletable using "rm" unless you override this protection by calling "rm.real" directly.



This tool, safe-rm, ships with a default system-wide configuration file (/etc/safe-rm.conf), but each user can supplement that list of "protected" directories and files by adding lines to ~/.safe-rm.

Debian and Ubuntu packages are available from the usual places.

There are of course different approaches to preventing these kinds of problems...

9 October 2008

Nico Golde: getting to know new debian.net domains

Since quite some time I am exporting a list of all registered debian.net domains from our LDAP directory.
It is available at: http://people.debian.org/~nion/net-domains.html.

Reading that Neil didn't know about manpages.d.n and there is currently no easy way to get new interesting domains I thought I'd add an RSS feed to get informed about changes.
It is available at: http://people.debian.org/~nion/net-domains.rss

The feed is quite big though as it includes all aliases that are currently set.

7 October 2008

Andrew Pollock: [debian] manpages.debian.net

Neil:
$ host -t txt manpages.debian.net
manpages.debian.net descriptive text "Javier Pen~a <jfs@debian.org>"
manpages.debian.net descriptive text "PGP D6 91 BB 89 88 7A F7  A0 BA E4 27 FD 7A 6A FE DA"
manpages.debian.net descriptive text "PGP 86AA DB04 D2F5 CC55  3A4D 940F B1A9 DD82 DC81 4B09"

Neil Williams: I didn't know about . . .

It's really quite strange to come across a tool that is incredibly useful, does exactly what I need but of which I was completely unaware. This time it is manpages.debian.net - how long has this been around and why hasn't it been announced somewhere?
The best part is that if a manpage uses a See also section, the references to other manpages get turned into HTML links to the relevant manpage on the site.
Getting a manpage is now as simple as:
http://manpages.debian.net/cgi-bin/man.cgi?query=%s

which makes it trivial to put this onto the epiphany smart bookmark toolbar.
The site supports:

Thanks to Patrick Schoenfeld for inadvertently leading me to the site - I couldn't find who created the site so step up and be known.
Update
To those making comments on this entry, please note:
I have nothing directly to do with the site, I just found it and blogged about it so don't use my blog as a bug list. Ta. Such comments have been deleted and further comments are now disabled for this entry.

2 October 2008

Neil Williams: Time pressures

It's been really strange coming back from DebConf then Extremadura and having to fit my code time around paid work and housework and general stuff again. I keep wondering why I'm not getting things done and then realising that I've only got so many hours a week nowadays compared to the entire week during the worksessions. What makes it worse is the short gap between the conferences. I misjudged the length of time without income and didn't make any days available for paid work between DebConf and Extremadura. OK, it was only about a week but it was a further week without income followed by the week getting to and from Spain.
I'm now doing extra days to recover from the extra time without income and it makes the contrast even more noticeable. The tiredness from the extra work then makes it hard to get started on what I thought I'd get done. I've done a little bit on emdebian-tools and apt-cross, I've done a little bit on a few RC bugs and I've not done a load of stuff I thought I would have done by now.
If you're wondering why something I said I'd do has not been done, file a bug and I'll get to it. (The bug lists for buildd.emdebian.org or emdebian-tools are my main ToDo lists, if it appears in that list of bugs, I'll not forget. If it appears in an email, I probably will forget.)

14 September 2008

Neil Williams: oh dear - aspire one mail

Linpus Lite (or maybe just aspire one mail) is only going to last a few more days on this aspire1, it's beginning to annoy me:
Update
sylpheed has now replaced aspire mail. OK, I still use aspire mail for calendar and addressbook stuff (for now), but sylpheed is a much better email client.

  1. aspire one mail has no GnuPG support

  2. aspire one mail has no non-HTML composition support. No, really, it doesn't even send plain text alongside the HTML. email sent from the aspire to myself comes in as an attachment in other email clients! (i.e. spam)


So, I would have to investigate a different email client but then there are niggles with Linpus itself:
  1. the aspire default kernel build lacks the pl2303 kernel module so that I can't use the aspire to control my balloon3 board over usb serial

  2. intermittent problem with network manager forgetting WPA passphrases


Testing continues - probably resulting in installing Lenny at the end of this week. Some of these things might be fixable using pages like taoofmac and Reg Hardware.
Unfortunately, the problem with usbserial means that I'll have to take two laptops if I want to demonstrate the balloon3 board in places.
I also don't seem to be able to locate any copyright files which makes me nervous. Maybe it's just a lack of knowledge of Fedora (at least not since FC5).

12 September 2008

Neil Williams: First post from the aspire1

OK, it's still running Linpus Lite and yum but that's enough to get things like drivel and ssh installed. Add in xchat-gnome and it's quite usable. The whole machine bounces around quite insanely when I'm typing this blog entry on my lap, though.
pilot-qof and a bit of XSL from the data-freedom package from the same source, allows easy import of ICS calendar data and VCF contact data.
Aspire Mail is clearly based on evolution.
I'll live with Linpus (sounds freakishly similar to lupus - or maybe that is just my medical bias) for a month or so - I'll get Debian on this sometime before my return to Extremadura.

8 September 2008

Neil Williams: Gobby - collaborative editing for worksession meetings

A few speakers at DebConf8 used gobby during their talks to collate ideas without breaking the flow of the session.
I've just come back from the Emdebian meeting in Extremadura (of which more later) where we also used Gobby - FAI used it too. Once the network setup was working, it was simply a case of clicking Create Session in gobby on my laptop and everyone else clicking Join Session, entering the IP of my laptop (only accessible locally) and choosing a colour.
Gobby is real-time, currently plain-text only but clearly indicates how sections have been edited and has an integrated IRC box for each session. At the end of the meeting, every gobby user has a copy of every document they opened in every session they joined. updated to the moment they quit the session.
Based on using gobby in events like this, I'd strongly recommend that someone at each worksession-type meeting starts a gobby session and maintains that session for the duration of the meeting.
Gobby even does syntax highlighting - depending on how many people join and the colours they choose, this might become difficult so it can be turned off too.
There are only a few minor issues:
  1. The colour bar warning box isn't particularly intuitive - you need to click on what looks like a dimmed progress bar to select a unique colour for yourself.

  2. I initially thought that Gobby had no authentication - in a local meeting, anyone who can connect to the specified IP address is able to edit the document. Since then, I've noticed it does support password authentication and there is mention of fully encrypted connections so it may be possible to use it over public networks.

  3. According to Wikipedia, there is a gobby server that allows non-GNU/Linux clients to run gobby and join any gobby session - I didn't explore this and the Debian package doesn't mention anything about a server option or mixed-OS support.
    • Update - the server is called Sobby and is in Debian.


  4. The right hand side of the window is a bit wasted - maybe some kind of sidebar would be handy, especially docking the userlist into the window so that edits can be identified more quickly.


1 September 2008

Neil Williams: Emdebian, cache files and MIPS

The current method of patching into place a series of ./configure variables as $(DEB_HOST_GNU_TYPE).cache files is becoming a pain - it blocks native builds of Emdebian packages for a start. So, I've been experimenting with a different method of support.
Centralised cache value support
Initially, I've collated all the current cache values needed (i.e. beyond the ones already provided for specific architectures) into /etc/dpkg-cross/cross-config.cache and have a script in emdebian-tools called emcache that will manage the central values by comparing them to the real values used in each build tree.
So, cache values, what are they?
  1. Cross-builds fail if ./configure tries to compile a test program and then try to execute it because it will have been compiled with the cross-compiler - instead, the cross-build passes the value that the test was trying to calculate so that ./configure does not need to try to execute any cross-compiled code.

  2. The values are derived from native builds, written to a $(DEB_HOST_GNU_TYPE).cache file that is passed to ./configure via debian/rules.

  3. The values turn out to be mostly (completely?) architecture-independent, so are eminently suitable for collation into a central cache file.

  4. Quite package-specific. There is some overlap but most are customised for a specific package. This led to a development of the central cache file: package-maintained cache files to support extensibility.

Package maintained cache files
I'm now experimenting with cache files written (and maintained) by packages during normal builds and dropped into /etc/dpkg-cross/cross-config.d/ - which would later migrate into dpkg support. Ideas welcome!
The basic idea will be that IF cross-building, the build process would check for /etc/dpkg[-cross]/cross-config.d/$source_package and, if found, add that to the cache value list for that build.
Cache files are shell scripts so this it be manageable to bring some intelligence to the process.
Where does MIPS come in?
Well, all the builds, so far, have been ARM or armel (where the cache values are likely to be identical) and i386 (which doesn't need a cross-compiler at all and therefore does not need cache files). MIPS is the first chance to check the cache values and ensure that the above criteria really are true.
Now that we have a volunteer looking at MIPS, the current MIPS builds are a suitable test bed.
What does this have to do with Debian?
Once Lenny is released, I'll be looking to implement this support via the long term mass bug filing for cross-build support into the packages themselves. It is possible that the process can be entirely automated - as long as the script knows which values are relevant. A normal cache file, post-build, can be very, very long whereas most cache files for Emdebian are just a few lines long - the longest is about 20 lines.
The current process is outlined on the Emdebian website, including a list of packages that currently need cache files to cross-build.
Oh, and just a note - when I start this phase of the long term mass bug filing, I'll first do delayed NMUs for the existing bug reports - hence the delay until Lenny is released.
In order to speed things along, I have also been doing some RC bugs - downgrading some, fixing others etc. (I've finished 6 since coming back from DebConf, so far, IIRC.) All efforts to get Lenny released will help Emdebian too, so if you want to help Emdebian, then help Lenny get out of the door and let's get to work on Squeeze.
:-)
(Squeeze is a great name for a release with lots of fixes for embedded stuff, don't you think?)

26 August 2008

Neil Williams: Using Zenity to review (RC) bugs

I've written a simple perl script using SOAP to add some useful data to the RC bug list (or any list of bugs). It can easily be extended but right now it supports simple things like the date the bug was filed, short description of the package, the name of the maintainer, the most recent upload data, the debtags for the package, apt-cache policy data and whether the bug is already tagged pending.
Zenity presents this info in a question dialog, clicking OK loads the bug and the PTS in your browser using 'sensible-browser'.
Clicking cancel offers a new zenity dialog asking for the next bug number. (Click Cancel there to end the script.)
Code: http://linux.codehelp.co.uk/rc-zenity.pl (GPLv3 or later)
POD: http://linux.codehelp.co.uk/rc-zenity.html (easily convertible into a manpage using pod2man)
If you like it, use it.
If lots of people like it, maybe it can go into an existing package.
If I've duplicated another script that I just didn't know about, tell me.
:-)
It's not exclusively for RC bugs, it could work with any bug list or be modified to only look for particular severity settings.
Thanks to Don Armstrong for making debbugs so accessible using SOAP. The debbugs SOAP implementation is just so straightforward with a whole load of useful data returned without needing repeated queries, it makes scripts like this really satisfying.

19 August 2008

Neil Williams: Adapting autofs for GPG keys to an SD card

Steve's docs on keys on a USB stick needed a few tweaks for my own systems - first thing I noticed was that I had /dev/loop0 instead of /dev/loop/0. As my configuration needs to use an SDcard instead of a USB stick or pen, I've changed the references from 'pen' to 'card'.
SDcards on my systems come out on /dev/mmcblk0 with partitions having a 'p[0-9]' suffix (p1, p2 etc.) so the DEVBASE setting needed a tweak. (This line needs to be modified for each user case anyway because the size of the partition will vary so the '62390272' value needs to be modified.)
DEVBASE= fdisk -l /dev/mmcblk0 2>/dev/null grep ^Disk.*62390272\ bytes sed 's?^.*/d?/d?g;s?:.*$??g'
A few other notes for those using Sid instead of Etch:
  1. kernel module needed: loop-aes-modules-2.6.26-1 - getting the modules to load requires a reboot. :-(

  2. loop-aes-utils the actual package that provides the diverted mount binaries, instead of just "loop-aes"


Barring a few typos I made in transcribing, the rest of the documentation works fine.

Alternative keys
I have two keys, one is intended to remain on the laptop and has comments to that effect (0xA897FD02). The other key, (0x28BCB3E3), is my Debian upload key so needs to be protected a little more than the ordinary laptop key (which I'll use when signing email on the laptop).
'debsign' does not have a way to specify a different --homedir or secret keyring or any other option that would allow me to have an alternative gpg configuration (maybe it should?). So I've copied debsign into my home scripts directory to create a slightly modified version and then I followed Steve's advice for ~/.gnupg/ to create a duplicate directory with the same permissions and a much reduced public keyring file (just exported my own keys). The secring.gpg file for this alternative homedir is the on the SD card with the autofs symlink (so the only file on the encrypted SDCard is the secret keyring).
Then it is a simple case of manually calling debsign (e.g. after using debuild -uc -us):
~/scripts/debsign -k0x28bcb3e3 /path/to/.changes

+CARD=" --no-default-keyring --homedir=/home/neil/.gcard "
...
- $signcommand --local-user "$2" --clearsign \
+ $signcommand $CARD --local-user "$2" --clearsign \
...
- $signcommand --local-user "$2" --clearsign \
+ $signcommand $CARD --local-user "$2" --clearsign \
...
- $signcommand -u "$2" +clearsig=on -fast "$1" > "$ASCII_SIGNED_FILE"
+ $signcommand $CARD -u "$2" +clearsig=on -fast "$1" > "$ASCII_SIGNED_FILE"

14 August 2008

Neil Williams: po4a - translation support from any format

po4a - or PO for anything. PO is the de facto standard for translations and po4a tries to help maintainers prepare packages for translation.
  1. I18n (internationalisation) is making a package accessible for translators and is an upstream/maintainer action. i18n is done once for all translation support and updated when the content changes (typically during the build).

  2. l10n (localisation) is using i18n support to create an individual translation for a specific locale. l10n is done many times per package, with individual translations being updated each time the i18n content changes. (Tdebs will support this area but are a separate topic from po4a.) PO files that exist when the POT is updated are also updated, tagging modified strings as "fuzzy".

The natural burden, therefore, falls within l10n but without i18n, l10n is all but impossible (it means having to do the i18n "outside" the package).
I'm using po4a and I've been doing various translation-support stuff now for a few years, so I'm going to add po4a into my blog entries as a series to help maintainers make their own packages i18n aware.
This is particularly important for:
  1. all Debian native packages, particularly scripted packages. My example will be based on perlpod documentation often embedded wthin the perl scripts themselves as well as DocBook XML for manpage generation. po4a supports many other formats.

  2. All manpages (or other documentation) created by Debian maintainers

To make things easier, I'll be creating a new category in my blog ("i18n") for such entries. This is helpful for me too because the first time I used po4a (current versions of emdebian-tools) I basically got things wrong and made more work for myself than was necessary. This entry primarily concerns providing i18n support from manpage sources and perl scripts. i18n support in compiled packages is a separate issue. The fixes described here will be included in the next version of emdebian-tools (which will be uploaded to Emdebian but not into Debian until after Lenny).
Terminology

Using po4a
po4a needs a config file where the maintainer keeps all metadata relating to the master documents and the relevant formats. po4a then converts the master documents into a collection of strings for translation and puts those strings into a POT file (a PO template file). The maintainer packages the POT file (and optionally sends the POT file to relevant mailing lists seeking translations to be returned as PO files) and keeps the POT file up to date during the build process. With a config file (e.g. called po4a.config), all the maintainer needs to do is call:
po4a po4a.config

po4a then parses the list of files defined in the config file, generates the lists of strings, collates the lists and identifies where the same string is used in multiple files and writes out a POT file containing references to where the strings are used and the unique strings.
po4a config file
Comments start with '#' in the usual way. Instructions are enclosed in square brackets.
po4a_paths defines where the POT file will be put (it can be extended later but I'm keeping this simple). The name of the POT file is important for compiled packages but can just be the name of the source package for scripted packages and/or manpages.
[po4a_paths] po/emdebian-tools.pot

type identifies *each* master document to be processed by po4a. The syntax is well suited to being generated from some other list within the package but I'll give just a snippet of the final output here:
[type: xml] doc/xml/em_autobuild.1.xml
[type: xml] doc/xml/embug.1.xml
[type: pod] emtargetcmp
[type: pod] emdebcheck


That's it. The complexity of my current script was entirely unnecessary. :-(

Also, po4a is more than capable of handling multiple document types within the same source package and the same POT file which is something that I had missed so far. One more hack that can be removed. :-)

All I do now is use xmllint to "clean-up" the DocBook XML and pod2html and some XSLT to generate HTML documentation for the website. The loops to do those tasks already contain the list of files to be processed by po4a, so a few echo commands is all that is needed to create po4a.config at build time and run po4a to generate a combined POT file for all strings in the package.
#!/bin/sh
CONFIG="po4a.config"
echo "[po4a_paths] po/emdebian-tools.pot" > $CONFIG
for file in ls doc/xml/*.xml ; do
xmllint --format "$file" --output "$file"
echo "[type:xml] $file" >> $CONFIG
done
for file in emdebcheck emtargetcmp emprunecross Emdebian/Tools.pm \
em_installtdeb emrecent emcache; do
if [ "$file" = "Emdebian/Tools.pm" ]; then
pod2html -outfile html/EmdebianTools.html -title $file ../$file
else
pod2html -outfile html/$file.html -title $file ../$file
fi
if [ "$file" = "Emdebian/Tools.pm" ]; then
pod2man ../$file > man/Emdebian::Tools.3
else
pod2man ../$file > man/$file.1
fi
echo "[type: pod] $file" >> $CONFIG
done
po4a $CONFIG

9 August 2008

Neil Williams: Progress at DebConf

First complete day after a full day travelling and I'm just about over the jet lag. Progress so far:

Overall, very good.
(Posting delayed due to network problems.)

It appears that drivel cannot cope with posting to the blog from DebConf.
:-(

28 July 2008

Neil Williams: Emdebian status update

over 96% successful
243 packages built successfully.
8 packages failed to cross build.

Failing packages
  1. cups
    http-addr.c: In function 'httpGetHostByName':
    http-addr.c:464: error: invalid 'asm': invalid operand for code 'w'
    http-addr.c:464: error: invalid 'asm': invalid operand for code 'w'

    history

  2. gtk+2.0 - cairo-directfb problems.
    history
    The cross-build keeps finding /usr/arm-linux-gnu/lib/libcairo.so first so it misses the extra symbols provided in /usr/arm-linux-gnu/lib/libcairo-directfb/lib/libcairo.so. Hopefully, this can be resolved by judicious hackery of LDFLAGS and LD_LIBRARY_PATH.

  3. ncurses

    /trunk/n/ncurses/trunk/ncurses-5.6+20080713/ncurses/curses.priv.h:1417: warning: parameter names (without types) in function declaration
    /trunk/n/ncurses/trunk/ncurses-5.6+20080713/ncurses/curses.priv.h:1418: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_nc_to_widechar'

    history

  4. ntp - same assembly error as cups
    authkeys.c: In function 'authencrypt':
    authkeys.c:445: error: invalid 'asm': invalid operand for code 'w'
    authkeys.c:445: error: invalid 'asm': invalid operand for code 'w'

    history

  5. slang2 - confusing build behaviour - outside a chroot, files are put into a directory called elfobjs. Inside a chroot, files are put into a directory called elfamd64objs (and presumably that would change according to the BUILD architecture with is plain insane.
    history


The assembly errors look spooky and the cairo and slang2 errors could be made much simpler if the upstream builds were sane. (Honestly, why can't we just have /usr/lib/libcairo-directfb.so ?)

Some other packages fail to build, e.g. gcc-4.2, but we don't need those anymore so I'm ignoring those.

Next.

Previous.