Search Results: "Erich Schubert"

2 October 2006

Erich Schubert: More on tagclouds

Tag clouds are usually done by scaling font sizes according to some weight. Actually this is not very precise. For a representative representation (lol, I should get this domain name. representative-representation.com), the tag size - that is the surface area! - should be a representation of the tags weight. The suface however doesn't directly depend on the font size, but is more like font size * length of word (length being appropriate for the font used). So when displaying tags with very different font sizes, "egg" and "Technorati" shouldn't just be scaled by their weight, but also by their word length. OTOH, few users will actually be able to "grasp" the actual difference in size. IMHO it's just about "popular" vs. "obscure" and about making the tool more intersting to use.

Erich Schubert: Folding tagclouds (cont'd)

I've been working a little bit more on the folding tagcloud for Debian packages. I've added closing of folds, and the code for displaying selected tags as well as matching packages is in place, too (you'll need to use a different .json data to actually see results though). To make it truly interactive, i.e. allow the selection of multiple tags until you get some results, I need to add more data files. So I'll have to decide now if I'm going to use a CGI (the "traditional" method), which will likely need to have some caching, or if I'll just precalculate everything into static .json files. I could even store them as .gz on the webserver; any browser with ajax capabilities should be able to do gzip decompression on the fly. This would offer maximum performance and security, but it means I'll need more magic in the javascript (and Javascript is ugly). Or I'll do a combination of both, use a tiny CGI serving the precalculated data; the CGI could then easily be replaced with a dynamic-caching CGI later. SVG rendering for the tag cloud would probably be also very cool. With some smart layouting algorithms, it could become much more cloud-like. And there could probably be a nice animation when "subclouds" are unfolded, pusing away the other folds. However, that would be much slower. Any animation means a slowdown, since it adds extra delays.

Erich Schubert: Release asynchronity

When release draws near, more and more difficult decisions arise. Like: should I still upgrade the package to a newer upstream version? Enigma is a great puzzle game, very similar to Oxyd. Back when still using my trusty old Atari ST, I was a fan of oxyd. Debian unstable currenlty has Enigma 0.92, the latest released version. Experimental contains recent SVN snapshots of the game. Version 0.92 was released in 2005, and there have been huge improvements to Enigma in the mean time, including a new level form (XML-based, while the levels used to be lua scripts), a reorganization of the levels into level packs with increasing difficulty, tons of new levels and graphics for 1024x768. While the new versions are running quite stable, and a new release is expected for end of the year, it will probably be not on time for etch. So should I upload a SVN checkout to unstable (and eventuall etch) - I didn't receive bug reports for the experimental version so far, and enigma has shown before to be of high code quality - or stay with the latest released version? "Life" would be easier if enigma released a new version just in time for etch. ;-) Just kidding. I'd certainly prefer the new version; and while there are some known issues with it (a conflict between C++ exception handling and lua when nesting), these might as well apply to the current version. (For example, the screensaver tends to turn on while playing enigma, but upstream said this is actually a SDL issue, and it should apply to both versions) Maybe some people can test the enigma package from experimental and send me feedback reports. But don't blame me if you lose valueable hours of sleeping time by playing enigma. It can be quite addictive.

Erich Schubert: SELinux on Ubuntu status

In #selinux, we helped a user today to get some SELinux working on Ubuntu. I had posted before that I expect Ubuntu to be rather close to Debian in terms of SELinux support. This is not true. Ubuntu ships rather old versions of the toolchain and SELinux libraries. I doubt that you can use the reference policy with this toolchain; the selinux policy shipped by Ubuntu is no longer supported. Still these would mean that SELinux on Ubuntu would be in the same shape as it is on Gentoo. If it weren't for this critical issue:
sysvinit (2.86.ds1-6ubuntu8) dapper; urgency=low
* Disable SElinux again, nobody gave me a patch to fix the annoying message. -- Scott James Remnant Fri, 3 Feb 2006 17:54:55 +0000 Init. The process supposed to load the policy at boot, is not SELinux enabled on Ubuntu. At least the version in hoary. And edgy comes with upstart, which doesn't have SELinux support either, AFAIK. So to use SELinux on Ubuntu you'll have to build your own sysvinit (sysvinit from edgy might do the job). Or add SELinux support to upstart.

Erich Schubert: SELinux and package install scripts

The horror of providing full SELinux support out of the box are install scripts. Installing files of a package is rather easy. Install them, relabel them. This can be added to the package manager. (And I believe dpkg already does that). However, package install scripts are becoming more and more complex, and they aren't SELinux aware. And there is a lot of stuff that can go wrong here. For example, a package might want to generate a configuration file for the service you just installed. If this configuration file is to have the same context as the directory containing the configuration file, there won't be a problem - but if it's to have a different context, the generated file will be incorrectly labeled. I see two basic solutions to this: Any other smart solution for these problems? Sometimes I wish we could do without turing-complete postinst scripts...

30 September 2006

Erich Schubert: Dancing like crazy

Swing dancing (i.e. Lindy Hop, Balboa, Boogie Woogie) is my big hobby these days. It started with Rock'n'Roll dancing some years ago, and when I was in Berkeley I picked up some Lindy. Since February I've been going to social lindy dancing every couple of weeks. This month I've become a member of Boogie Bären (yes, that is "boogie bears"), a Munich dance club, and started taking classes in Lindy Hop, Boogie and Balboa every week, in addition to my usual lindy social dancing on sunday. Right now I'm right in an "extreme dancing" phase. It started tuesday with the Lindy classes (yes, both of them, over 3 hours), followed by the boogie beginners class on wednesday and the balboa beginners class on thursday. Friday there was a great balboa and swing party in a bar, with top attendees: the teachers of the workshops on saturday and sunday (which I have attended and will continue to attend tomorrow), Andy & Christelle from Lyon and Marty & Valerie from Cleveland. They've been great teachers so far, and their skills are very impressive. And they showed us some really cute moves. After the second half of the workshop on sunday, there will be social lindy dancing in the evening again, monday evening there is swing dancing in another bar in Munich [Update: with live music, Route 66, in addition to the usual singing DJ], tuesday will likely feature a liveband and boogie dancing (it's a holiday, so no regular lindy classes that day), followed again by boogie beginners course on wednesday, balboa class on thursday, maybe balboa and swing dancing in a bar on friday. Maybe I'll then watch the German championships in Boogie Woogie and Rock'n'Roll on saturday, social dancing on sunday and monday again, and so on. It's getting somewhat out of hand, as you can see. I should focus more on my diploma thesis instead... so I'll skip saturday. ;-) [Update: did I mention that Munich has a fantastic Lindy/Balboa scene? Upcoming events include a big balboa weekend 11./12. november, the new years swing ball and the Rock that swing festival in February.]

28 September 2006

Erich Schubert: Folding tagclouds

Folding tag clouds of Debian software packages. I'm trying to make tag clounds workable with a large number of tags (unfolded tag cloud for comparison) by folding them into subtopics. Yay, when we're done with tagging the Debian packages, we'll have a great new way of browsing available Linux software. Linux doesn't lack software anymore, it has so much software, you just don't find what you need. The next version of this will probably allow you to select multiple tags, and update the tag cloud upon selection. So if you choose "GTK" ui toolkit, the "QT" toolkit tag will become quite small, etc.

Erich Schubert: Anti Ubuntu ads by Freespire

Just seen on Google Mail ads:
What is Ubuntu Missing?
Need your desktop Linux to legally play mp3, Windows Media, DVD, etc.?
freespire.org
Apart from the obvious spelling error ("Missing") and the content errors "legally play mp3" - there is a difference between being legal to use and legal to distribute - I think that this is a pretty lame ad.

27 September 2006

Uwe Hermann: Towards a moderately paranoid Debian laptop setup [Update]

I was planning to set up my laptop from scratch for a while now... so I did. Preparation BIOS Installation / Setting up full-disk encryption using dm-crypt
  • Enable shadow passwords. Allow login as root (I feel confident that I won't do stupid things as root).
  • Choose a good root password, and a (different) good user password. Don't enter a full name for the user.
  • Choose the latest kernel (old kernels might have security issues). Do not participate in popcon.
  • Do not install any tasks (no "desktop", no "base system"). We want the smallest installation possible, and add only the packages we really need. Fewer packages means fewer security issues (statistically).
  • That's it. Eject the CD-ROM, reboot, change the BIOS to only allow booting from hard drive.
  • Post-installation tasks Networking, Upgrading and Apt-secure SELinux Now install and set up SELinux. This section is based on notes from Erich Schubert (thanks!), and will soon appear in the SELinuxSetup wiki page, too. Behaviour Further ideas That's it. You can take off that stupid tin-foil hat now. Update 2006-09-29: Fixed typos. Mentioned sxid. Added two-factor authentication.

    Uwe Hermann: Towards a moderately paranoid Debian laptop setup

    I was planning to set up my laptop from scratch for a while now... so I did. Preparation BIOS Installation / Setting up full-disk encryption
  • Enable shadow passwords. Allow login as root (I feel confident that I won't do stupid things as root).
  • Choose a good root password, and a (different) good user password. Don't enter a full name for the user.
  • Choose the latest kernel (old kernels might have security issues). Do not participate in popcon.
  • Do not install any tasks (no "desktop", no "base system"). We want the smallest installation possible, and add only the packages we really need. Fewer packages means fewer security issues (statistically).
  • That's it. Eject the CD-ROM, reboot, change the BIOS to only allow booting from hard drive.
  • Post-installation tasks Networking, Upgrading and Apt-secure SELinux Now install and set up SELinux. This section is based on notes from Erich Schubert (thanks!), and will soon appear in the SELinuxSetup wiki page, too. Behaviour Further ideas That's it. You can take off that stupid tin-foil hat now.

    Erich Schubert: My favourite name: Freefox

    Apparently, the firefox logo and name have to be considered "non-free" by Debian. The mozilla foundation only allows use of the firefox brand for "official" builds, and Debian tends to add patches to applications to fix bugs without waiting for upstream to do this. So Debian packages aren't an unmodified firefox build. (Mozilla Foundation trademark policy) Of course the Mozilla foundation won't object to the kind of modifications Debian did, probably not consider them "serious"; but Debian is meant to be used by others (e.g. Ubuntu) to build their own distributions. These in turn will probably not be tolerated in the same way (and might want to do "serious" modifications). Anyway, Debian has been using a plain "world" icon for firefox for some time, now it seems we'll have to change the name, too. A couple of names has been proposed, including "iceweasel", "firechicken" and "freefox". I definitely like the last one best, since it's very clear about being related to firefox, but more free. I wonder if we can use "Firefox" at least in the User-Agent string. Other browsers have been using "Mozilla" there for a long time, too.

    25 September 2006

    Erich Schubert: SELinux support in Debian

    ... actually isn't that bad. Apparently we are the only distribution shipping a modular policy and doing some smart policy module autoconfiguration and having an upgrade helper tool. Fedora, having undoubtedly the best SELinux support, only started with Core 5 to actually ship a modular built of the reference policy. Target comes with around 5 policy modules, the other stuff is either in the base module, or more likely, running unconfined. Strict however comes with the extensive set of policy modules in the reference policy. Upon installation of the policy package, all available modules will automatically be installed; judging from the package I downloaded changes in the module selection are not preserved. Gentoo is still shipping the last officially released toolchain, which can't to modular builds and can't compile the current reference policy. So they are also shipping the old policy (as in the selinux-policy-default package, we might actually remove soon). Ubuntu is probably waiting for us to do most of the work. ;-) I havn't heard of any SELinux progress with Ubuntu for half a year. So all in all, SELinux support in Debian is rather good. We just need more people to use it and fine tune it. There are a couple of differences among distributions especially in the init scripts, that require policy changes.

    23 September 2006

    Erich Schubert: GPL verified in german court

    Harald Welte (of gpl-violations.org and netfilter fame) won in court against D-Link. Apparently D-Link had already agreed to fulfill the GPL by offering the source code on their FTP server; the lawsuit was about them having to pay the costs of Harald Welte (buying their product, reverse engineering, legal costs). Don't emphasize D-Link here much - they did comply with the GPL quickly after being notified of their violation (apparently). They have to pay 3500 Euro for his costs and give him some numbers on sales of the product. It's not a "bad, bad thieves" result, but basically a "comply with the license right away, or pay for the enforcement". J rg Schilling, the upstream of cdrecord - which has now been replaced by "wodim", "write optical disc media" - has frequently been claiming that Debians interpretaion of the GPL is incorrect, or even that 2 of the GPL doesn't hold. And he claims that this judgement still didn't verify the GPL. (Just as everybody expected, he trolled in the heise newsticker article on this). Seems he's really trying to make a bad impression with everybody. To me, the judge did do some pretty clear statements: he said that 2 is an integral part of the license, so while you might be able to debate its validity, it will render the whole license invalid, so you're then infringing on the authors copyright. If you want to use it, you have to obey the full license as is, or obtain a different license. There is no "the license is broken, so I can use it just as I'd like to". And by dsitributing it without having obtained a different license, you are accepting the license as is.

    Erich Schubert: Meme time: top 10 shell commands

    Note: the script posted originally had a bug in sorting, as seen here. I used history 1 awk ' print $2 ' awk 'BEGIN FS=" " print $1 ' sort uniq -c sort -nr head -10 (this is for zsh history; the fix is the -n flag to sort)
        254 ls
        141 cd
        131 vim
         86 svn
         77 grep
         70 apt
         65 sudo
         60 ssh
         51 rm
         45 dpkg
    
    Boring meme. I work on files, edit files, use subversion, grep and eventually run apt-get or dpkg. "apt" is a small script of mine which will call apt-cache search or "sudo aptitude" as appropriate; somewhat merging the functionality of these into one command). Followers up:
         45 cat
         43 man
         33 debuild
         28 apt-cache
         18 dch
    
    debuild, dch - yeah, I have been doing some Debian work recently. Mostly SELinux, like a week ago or so. [Clint, I didn't invent that double-awk pipeline. I just fixed the sort issue. I'm currently more annoyed by awk because it uses isatty() on regular files, which in turn does ioctl, which in turn triggers SELinux audit errors...]

    22 September 2006

    Erich Schubert: What takes the fun out of Debian

    Current #1: Postings like this, Proposals like this ("recall the project leader") and the way the whole situation is handled by certain people, especially joey and Denis. Not high on the list:
    #n-1: That some more people might be paid for their work on Debian, but this time from a DPL-affiliated entity named "Dunc Tank", instead of companies like Credativ, IBM or HP. So what would be your opinion when AJ steps down from the dunc tank board? Is it then still this evil, volunteer-eating monster? Sure, you're entitled to your own opinion. I just don't like the way you voice (and try to enforce) your opinion.

    Erich Schubert: Why closed source drivers suck: ATI cancels support for many older Radeons

    With the latest driver "update", ATI removed support for the following graphics cards: This is why closed source drivers suck. My Mobility FireGL 7800 is also not supported by the official ATI driver. Well, ATI obviously only cares about new sales, not about users. (Except that users like me will not but ATI anymore, but go for e.g. Intel) Fortunately, there are some opensource drivers for these cards. They also have 3D acceleration. Let's just hope ATI releases the documentation needed to support the newer cards (9600+, X300+) before they also discontinue support for these. (Or at least allows redistribution of the existant 2D drivers that have already been written for some of the newer ATI cards) So don't buy any newer radeon, because there is no long-term-support for them. In a few years, you won't be able to use them anymore!

    16 September 2006

    Erich Schubert: SELinux is like TPM

    To a certain extend, SELinux is like TPM. On one hand, it can be used to increase security of your system a lot. On the other hand, it can be used to lock you out some more. Like from your Linux-running Motorola phone. (Note: this phone is not running SELinux, but some other LSM) The combination of both of course increases security even more. I was wondering if I should maybe starting using these on the next server I install. Make a mini boot system with an SSHD and use the TPM module to secure this boot system. Then whenever the system is booted, I connect via SSH to type in the passphrase to unlock the encrypted disks. So when some police decides to seize a TOR server, they'll not be able to read any of the data, even when they seize the complete hardware. The only attack vector (apart from breaking crypto) I see is that they use the TPM to decrypt the boot systems sshd key, and then setup a modified boot system to capture my passphrase. They'll probably need more time to set that up than me to be informed the server was seized (or wonder why it's down). They're not exactly prepared for such defensive measures, I guess. OTOH, I'm not planning to setup any server anytime soon, and for a laptop using an encrypted harddrive should be enough. Maybe add some extra SELinux policy to defend against software bugs and maybe keyloggers. Uwe Hermann just measured the overhead and to me this doesn't look very bad. I mean... it will still be much faster than my current laptop, and this laptop is fast enough for me 99.9% of the time.

    Erich Schubert: Is your mail reader SVG-enabled?

    From the debian changelogs:
    thunderbird (1.5.0.5-2) unstable; urgency=low
      * new package: thunderbird-dbg
        + enable svg
    
    Whoa, when will we start seeing SVG spam?

    13 September 2006

    Erich Schubert: SELinux in etch progress

    Just a quick update for SELinux in etch. With Manoj picking up work on it again (you might have noticed the large influx of new SELinux related packages these days, bringing our toolchain up to date again), and rjc having setup a SELinux development box for me, we're actually making some progress on SELinux for etch now. Uwe Hermann also blogged about SELinux on Debian recently. There are tons of small nuisances with SELinux on Debian left. I've started filing bugs and tagging them with the "selinux" usertag. It's in the details. For example mawk and gawk both try to ioctl any file they read as if it were a serial terminal. Which of course causes SELinux to log an audit error, since the init script or whichever was calling awk didn't have the permissions to ioctl a config file. Then there is /dev/xconsole - it's created by the syslogd init script (shouldn't maybe this be handled by udev), it's barely used by anyone, and SELinux policy upstream wants to keep it in the xserver policy, and claims its main use is to be able to feed it the output from programs started by the window manager (instead of .xsession-errors). Which is a seriously broken design, since it's not multiuser capable. Anyway, our current options are to Of course I was quickly flamed for filing a bug against exim stating that there currently is no SELinux policy for it, and people thus will have to use postfix or sendmail instead. But heck: people trying out SELinux on Debian will run into this problem, you know. I'd certainly prefer people to use exim instead of sendmail (I'm more of a postfix guy), but unless someone writes a policy for exim, people can't use it with SELinux. I have no idea how exim works (where its queues live, expected behaviour and so on), so I can't write a policy. Now to start a real flamewar - how about making postfix the new default MTA for Debian with etch? /me runs and hides.

    11 September 2006

    Ross Burton: Python Decorators

    Decorators in Python are just fantastic. Here are a few I've used in Postr. Update: the wonderful James Hensbridge expanded the decorators, so I've updated this post.
    def threaded(f):
        def wrapper(*args, **kwargs):
            t = threading.Thread(target=f, args=args, kwargs=kwargs)
            t.setDaemon(True)
            t.start()
        wrapper.__name__ = f.__name__
        return wrapper
    
    This decorator (stolen from O'Reilly) calls the method in a new thread, so execution returns straight away. I use this for long-running tasks that cannot be handled in an asynchronous manner (such as the photo uploading in Postr, which currently uses urllib). The main thread returns straight away so the interface doesn't block, and the uploads continue in the background. Of course this new thread cannot just call GTK+ methods, as GTK+ itself isn't threadsafe. So, I have another decorator that causes a method to be always executed in the main loop by scheduling an idle handler that calls it.
    def as_idle(f):
        def wrapper(*args, **kwargs):
            event = threading.Event()
            ret = []
            def task():
                ret.append(f(*args, **kwargs))
                event.set()
                return False
            gobject.idle_add(task)
            event.wait()
            return ret[0]
        wrapper.__name__ = f.__name__
        return wrapper
    Erich Schubert requested return values, so James added those too. The calling function will block until the idle handler has called the decorated function. I've split the decorators out into a separate file in Postr, so you can view the latest version online. Magic stuff!

    Next.

    Previous.