Search Results: "ag"

20 January 2007

Andrew Pollock: [life] On catproofing

Hi Amaya, Yes, we trim their nails. We even got Soft Claws to prevent them from scratching the furniture - once we'd discovered the damage they were doing (here's Stumpy modeling them). Oh, and I can assure you trimming their nails is a walk in the park compared to trying to glue vinyl nail caps on all of their claws... Sure, furniture is replaceable, but I'm talking about the nicest piece of furniture we've ever owned, and it's less than two years old and already trashed. Its like I'm incapable of having nice things and looking after them properly. That's what makes me angry.

Andrew Pollock: [life] Christmas in Vegas

(almost caught up on the blogging backlog) We had five days off over the Christmas period, from Christmas Eve on the Friday through to what we call Boxing Day (America doesn't do it, but Google gave us the day off). We spent the time in Las Vegas with our friends Craig and Sarah and their daughter Kes, in their "fifth wheel" trailer, as we had previously in Glamis. The drive was good. We stuffed around getting away on Friday, so didn't leave Mountain View until around 10am, so Craig and Sarah beat us there, when we were expecting to beat them (they couldn't leave until the end of business on Friday). It took us something like 9 hours to drive there. I think the thing I love the most about California is the diversity you get. We've seen snow, forests, beaches, desert. All without having to leave the state. One of the highlights of the trip was going through Bakersfield, which had heaps of oilwells all over the place. We also drove past one of the commercial aeroplane dumping grounds in the Mojave desert. Vegas itself was something to behold. It had a reality distortion field around it that made Google's pale into insignificance. The strip was great to walk up and down to just take in the architectural wonders that are the casinos on it. The adult industry is incredibly in your face. People are on the sidewalk handing out "calling cards" for what I thought were hookers, but I'm told are technically strippers, with catchlines such as "nude to your door in 15 minutes". What would normally dispense newspapers in any other city gave out free catalogues of what the adult industry had to offer. I thought all of that was a bit seedy. The casinos themselves where all much of a muchness inside. Far too smokey for my liking. I'm not a big gambler. I think blackjack is about the only game I can wrap my head around, and even then you can lose too much money too quickly on the tables, so I mainly played video blackjack with 25 cent bets. It's not a bad way to blow five bucks. The second hand smoke was a great deterrent against staying inside for too long. We caught Zumanity at New York New York, and had a humungous buffet lunch for Christmas Day at Mirage. We were staying in the trailer park attached to Circus Circus. It's pretty cool that there's a trailer park right on the strip. The one thing that I hadn't associated with Las Vegas was the shopping. Every one of the casinos on the strip had a massive shopping mall associated with it, and I mean massive. Paris' in particular took forever to escape from. The Forum Shops in Caesars Palace also felt like they went on forever. I initially thought how they painted the sky with clouds on the ceiling was quite clever, until I discovered that every mall did the same thing. Then it got a bit old. You could go to Vegas just for the shopping and the day spas, and never have to set foot in a casino gaming room. I'd like to make one more trip, and this time stay in a hotel, just for the hotel experience. I think Venice was my favourite looking casino (from the outside). Photos from the trip are here.

Josselin Mouette: Making upgrades faster

Improving the speed of upgrades is a never-ending process. Last year, I worked on GConf schema registration which was painfully slow. Today, the introduction of apt-delay, which compensates for the absence of hooks in dpkg, paves the way for further improvement: single call for gconf-schemas (although we wouldn't gain much now), but also more recently widespread dog-slow stuff like update-mkinitrd and fc-cache. However this approach doesn't work for ldconfig, as this command must be launched before considering the package as configured. Therefore, you can't hook it into apt-delay and hope everything installs fine before running ldconfig. The ldconfig case can be solved by itself, as it is possible to use the simplest caching method by simply looking at the timestamps of the directories it scans. This patch (for glibc 2.5) adds simple checks to see whether the directories actually need to be rescanned before regenerating the cache. The improvement is visible as soon as you upgrade two libraries together - and generally, unstable users upgrade them by packs of ten, if not more. As Aur lien Jarno seemed to agree with the approach, I hope to see it included soon, at least in experimental.

Pierre Habouzit: apt-delay, or stop beeing tired waiting for apt beeing so slow !

The discussion about hooks in dpkg able to run some kind of commands (ldconfig, update-menus, ) occured more than once on the list. I've grown tired of many of the packages upgrades that wanted to rebuild my initrd's three time in a round, or to the incessant fc-cache runs, and so on. So I've hacked a tool called apt-delay, that achieves that, through some hacky $PATH manipulations, diverts some commands to very small ones that just record that they have been called, and then an apt DPkg::Post-Invoke command lists all of them, and run them at the end of each dpkg round. Even it may look ugly, it's very small, sloccount says:
   ansic:          548 (91.79%)
   sh:              49 (8.21%)
It now only deals with update-initramfs, ldconfig and update-menus, as a proof of concept. You can try it yourself, you just need to:
   $ git clone git://git.madism.org/apt-delay/
   $ cd apt-delay
   $ debuild # only needs debhelper
   $ sudo dpkg -i ../apt-delay_0.0.1_$ arch .deb
and that's all. You may want to tweak /etc/apt/apt.conf.d/99apt-delay and use /usr/lib/apt-delay/post-invoke -d that will enable some debug output, so that you can see at each apt run what has been delayed or not. Please remember that this is a proof of concept (even if it should not harm your computer, it may have problems, or even be broken sometimes ;P) Comments, thoughs, ideas are obviously welcomed.

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:

Daniel Baumann: Package Maintenance

For the nearly last 3 years, I was investing all of my spare time into maintaining packages in Debian. I tried to do it as good as I can. However, since about half a year, I got constantly flamed purely for the fact of having about 150 packages in the archive. I never have expected to get any positive feedback or even something like a thank, we all are doing our Debian work on a volunteer basis, because we are able to do it and especially because we want to do it. I can even life with it, when people like to only point to the single two not good things I ever did, reducing me to them to make me look bad, and I also accept that some people are not able to forgive as I do, to forgive when others are making uniquely (unimportant) failures. Today, I decided that I do not longer have the energy to resist those people and to give up that struggle now. In the next few days, I am changing my commitment to Debian by orphaning about the half of my packages. I hope that at least those people who are constantly against me no matter what I do, are confident know: You are the winners and I have failed. Fortunately, I am completely unimportant for Debian and thus easy replaceable by any random other human beeing. I am looking forward to see better times now, having more time for Debian Live, where the fun is, and where the people all are friendly and respectful towards each other.

Christian Perrier: Junichi is my hero

Really. After MJ Ray summarized very useful information about building methods, I finally reconsidered my method for building packages. I usually use pbuilder but I'm pretty much annoyed with its slowness when unpackaking the base.tgz file. As a consequence, when I'm in a hurry, I sometimes just "debuild" packages on my live system. Booooo. Of course, this often leads to errors (two, recently, with samba. Booooo). On the other hand, using pbuilder is a very clean way to build packages...but is very slow, which is a pain when working on the "blitz NMU" uploads which I blogged about a few days ago. So, discovering cowdancer which is able to dance fast along with the safety of pbuilder was exactly what I was needing. Thanks, again, Junichi for that nice piece of work...and MJ for blogging about it!

Biella Coleman: Internet Radio Under Threat

Probably one of my favorite things about the Internet (and high speed connections) is Internet Radio. My favorite stations are: Space Station, Secret Agent and Tag’s Trance Trip on soma fm out of SF, John in the (weekday) morning on kexp out of Seattle and the The Terrordome and
Asiko Africa Phantom Pyramid
hosted by the simply amazing (really, check out his shows) Minister Faust out of Edmonton. But thanks to witless senators, all this awesomeness is under threat (and most of your probably already know). So support the effort to stop the shenanigans and let’s keep Internet Radio alive… And if you know of any other awesome radio shows or music, please do pass along. I am looking for a good salsa station, classical music and more dance music.

Erich Schubert: Preinstalling Linux

I read today that Ubuntu is working on an "install.exe" for Ubuntu. Which apparently will install an Ubuntu image into C:\UBUNTU so you can boot that. It's not meant to wipe out or replace windows, but live alongside on the existing partition. (I'm curious how well that works with NTFS...) I'm looking forward to that - and crazy people bringing this Ubuntu.exe along on a CD whenever they go into some computer store and install Ubuntu on all the laptops on display. If the manufactures don't preinstall Linux, why shouldn't we help them out? We're not installing a virus there or deleting preinstalled software... Would be fun for a flashmob, too. Go into the shop with a dozen people, a few to distract the employees (asking difficult questions, eventually even buying something; since there is no reason to do any harm to the shop!) and others using CDs to preinstall Ubuntu. Of course it would be even more fun if the laptop booted Ubuntu the next day... All laptops looking different, but welcoming and friendly and with lots of powerful applications. Maybe one or another will think "whoa, did microsoft upgrade them to vista overnight?" :-)

Benjamin Mako Hill: Digital Citadel

The solution to a crypto puzzle I helped solve during the MIT Mystery Hunt was "ALMOST PLAGIARIZE DAN BROWN WORK." Seth Schoen did this beautifully with an extremely humorous parody of Dan Brown's Digital Fortress. His story, Digital Citadel is extremely funny if you are marginally familiar with Dan Brown and his writing style -- and probably even if you are not. I have not seen a copy of the prize winning entry in the hunt -- a story called The Ikea Code -- but the excerpt I heard was also hilarious.

Julien Danjou: mod_defensible 1.1

Hopla, a new version of mod_defensible. I added a custom page in order to explain to the client why it is forbidden to access to the page. In the mean time, my webserver load dropped to somewhat 20% less than without this module.

Uwe Hermann: Second Life client GPL'd - two weeks later...

A nice recent example of the benefits of open-sourcing software is Second Life, the well-known online virtual world. The Second Life client was released under the terms of the GNU GPL (version 2) roughly two weeks ago. Since then a lot of community activity has been observed: Most of these things (and others I might have forgotten) would certainly not have happened with the closed-source client anytime soon...

Julien Danjou: sysrqd 9

I just released sysrqd 9th version. This version include a little page for Neil McGovern: never go in swap and allow to bind to a specific IP address.

Adam Rosi-Kessel: Streaming Netflix

Via DRM Watch, Netflix to Offer Streaming Movies Online. My initial reaction: eh.
Netflix’s streaming service will differ from existing online movie services like those from Amazon, Movielink, and Apple iTunes. Those services offer rentals of movies for a fixed time period (e.g., 24 hours) or downloads-to-own, known in Hollywood jargon as ESL for Electronic Sell-Through. In contrast, Netflix will let users pick from a catalog of available films and let users watch any of them for up to a fixed number of hours per month, according to their subscriber level, such as six hours per month for entry-level subscribers. The service will launch with a catalog of about 1,000 titles, the same number as are available on Movielink’s rental service. The video delivery scheme that Netflix is using is a streaming-only technology that senses the user’s Internet bandwidth and adjusts the video quality accordingly; thus it is analogous to RealNetworks’s Rhapsody music service.
Limiting the catalog to 1,000 titles undermines Netflix’s key selling point: enormous selection and a long-tail business model. I could probably find those same 1,000 titles at any Blockbuster Video. So all I’m saving is a trip down the street? In return, I get something I can only watch on my computer (with Windows) for a limited number of hours? Apparently, if I want to watch the same scene a few times, or with the director’s commentary (is that even available?), I’m using up my six hours per month.Even cable movies-on-demand is a better service. Don’t get me wrong — I love Netflix as a DVDs-by-mail service. I also think the Netflix web interface and collaborative filter is pretty great, although the third-party Netflix Queue Manager Bookmarklet is a definite improvement. Based on this initial announcement, I can’t think of a single reason why I would prefer the online streaming version of Netflix. Usually I have the foresight to figure out what I want to say 24 hours in advance (the delivery time for Netflix-by-mail) and having three DVDs at once gives me sufficient options in case I’m unsure. Ultimately, I suspect Netflix just wants to send the message that it’s in the Internet-delivery market, which ultimately of course will decimate its existing business model. I just wish it had a more impressive first offering.

MJ Ray: Debian: Fun with no builder 4: pbuilder fans to the rescue

Sven M ller commented:
"Well, if pbuilder slows you down too much, perhaps cowbuilder is the right one for you. I haven't tried it myself yet, but it is supposed to eliminate the worst delay pbuilder introduces: The unpacking of the base.tgz minimal chroot archive."
Nelson A. de Oliveira asked:
"Have you tried cowdancer + pbuilder? It makes creating packages really fast (there is no more need to uncompress the tarball, for example)."
I looked for cowbuilder, but there's no package called that, so I was quite glad for the second comment. I'll backport cowdancer and give it a go. Thanks!

MJ Ray: The storm: how was it for you?

niq commented:
"FWIW, in the real westcountry (West Devon, near the cornish border) we've missed the storms. A bit of wind in the morning, and some drizzle, but nothing substantial."
Yes, seeing what happened further north - roofs ripped up in Manchester - and east - house collapse in King's Lynn (pic 9) - then it seems we got off lightly this time. I hear that Germany declared it a hurricane, but I haven't confirmed that online. Euronews coverage. As far as I can see, there's snapped aerials and all the windows look like someone has sneezed over them, but damage mostly stopped after the fences were ripped to bits. I heard that the sea overtopped the wall in Weston, but I can't find pictures. I'll see myself what town is like later today. Update: niq, you didn't get an email notice because your mailserver is cocked-up:
"550 Error: 23Your subject line looks like spam"
Damnit, it's your phrase in the subject line!

MJ Ray: Bad Tech: Billing: standing charges, meter readings and privatisation

Chris Cunningham commented:
"Errr, standing charges on gas are pretty rare now. British Gas abolished them years ago, for instance. Standing charges for electricity are generally a good idea if you use any reasonable amount of electricity though. The single best piece of advice I can hand out for saving money on utilities is to take meter readings every month. Not only does this make it much easier to negotiate re-estimation of poorly-calculated start/end reads, it also gives you an immediate idea of how much you're using. I'm rather surprised that you didn't take the opportunity to rail against the evils of privatisation which led to this situation. Deregulated utilities are a bit of a nightmare in the UK, speaking from experience working for one."
Standing charges may be pretty rare, but they are still allowed and npower put them on so-called deemed contracts. I can see why that makes sense to a company like npower. It seems a good way to make sure you can bill a customer who hates you. Reading your own meter is a good idea. Doesn't really help if you've only just moved in, though. npower still argue that the absurdly low meter reading they're using for your start value (which would mean a bigger bill) was the final reading given by the previous occupier. I can't really comment on the evils of privatisation: I never interacted with the public utilities. Interestingly, the "deemed contract" problem seems to come from the regulations. Gas Act 1995 Schedule 2B section 8 creates the deemed contracts and doesn't explicitly handle the situation where someone moving in has an existing gas contract and doesn't want the deemed contract at all. This seems a misregulation bug as much as a deregulation one.

Miriam Ruiz: More about my analysis of usplash

After my post from yesterday, I’ve been able to find out what my problem with usplash is about, although I’m stiill working in a proper solution to it. It seems that when the root filesystem is changed, programs must react accordingly. The proposed sequence for the usage of pivot_root is something like the following: To be able to analyze the exact starting sequence of the system stored in the initrd.img, we must expand its contents to a directory using cpio. Some time ago, initrd.img used to be a filesystem that used cramfs, minix or ext2 filesystems, but not anymore for the newer Debian systems. The script that is responsible for setting up the system at start is called init and is currently a shell program. Having a look at it, I found out that a temporarily environment variable is set, designing the place in which the real root filesystem will be temporarily mounted before switching it to the root filesystem: rootmnt=/root At some point later, /sys and /proc filesystems, that were mounted in their respective directories at the beginning, are moved to $ rootmnt /sys and $ rootmnt /proc to be set in their final destination directories: mount -n -o move /sys $ rootmnt /sys, and later mount -n -o move /proc $ rootmnt /proc At the end of the script, the system switches to the real root filesystem: exec run-init $ rootmnt $ init “$@” $ rootmnt /dev/console >$ rootmnt /dev/console I’ve changed my code so that /proc/… files I used are open from the very beginning, and kept open until the end of the execution of usplash, and it seems to work. I’ve also been able to write a debug log for it, storing it in /dev/.initramfs/, which is a directory that is kept in that place all the time, so that whatever is stored there is available after the soot switch. That is the directory that usplash uses to store its FIFO nodes: usplash_fifo and usplash_outfifo. Maybe I can find a way to store core files there after a SEGFAULT error, setting the proper parameters with ulimit and /proc/sys/kernel/core_pattern. All I need to find out now is how to be able to reach the contents of /etc/… after the final rootsystem is mounted. I’ll tell you when I’ve solved that.

Christian Perrier: Storm

Nothing really worth noticing here, the Paris area being southward enough and not hit by this major storm over northern Europe. Many people still remember Dec 26th 1999 and have been very careful, indeed. I'm just listening to the morning news and am Seeing that UK, Belgium, Netherlands, Germany, Denmark and a part of northern France have not been as lucky as us here (this doesn't seem to be finished and more Eastern parts are still to be hit). The damages seem to be pretty high and so is the number of casualties. I hope that all you people are safe and well with no damage to your lives or belongings. Happy global warming...:-(... Please spread the word around: we are all responsible for this with our daily attitude with regards to the respect of our environment. Environment respect is no more (and has never been) a joke. This is a matter of survival for us and our children. Do us a favor: break one SUV a day...:-)

18 January 2007

Simon Richter: This is Munich.

There's a storm outside, and people are securing everything they hold dear. This being Munich, and specifically a part of Munich that got parking meters just a week ago, the most valued possesion is parking space. At least that is the best explanation I can give.

Next.

Previous.