Search Results: "tg"

23 January 2007

Erich Schubert: DBus inspector

I've been working a bit more on DBus inspector. Python is so much fun and PyGTK just rocks. I love you, guys. :-) Ok, not everything is working right yet. I tried making the app multithreaded, and putting the DBus handling into a second thread, but failed at that so far. Getting threading work right with Python and GTK and DBus is just too much, I guess. :-) Here's a screenshot: DBus inspector screenshot You can grab the code temporarily from this location. It's rather crude, undocumented (fortunately Python code is quite easy to read) and still lacks some interesting parts (e.g. icons to differentiate between services, interfaces, methods, signals, ... and of course actually displaying method signatures or even allowing you to invoke them...) - but it's a start. Note that DBus using applications support introspection at varying levels - NetworkManager doesn't have a useful introspection description, and gaim goes the other way by apparently exposing every single method during DBus, so you can do the craziest stuff (but it's hard to find the method you are actually looking for).

21 January 2007

Enrico Zini: avoid-flamewars

Fourteen ways in which you can avoid starting a flame war on a Debian mailing list On an IRC brainstorming on what talk I should give at FOSDEM, liw suggested:
"Fourteen ways in which you can avoid starting a flame war on a Debian mailing list".
In the end I went for something more technical, but I've never stopped thinking about liw's challenge. I ended up writing talk notes about such a potential talk. Here they are. The classics The radicals The radicals, applied selectively The From tricks The naggers The conscience ticklers The subtle The subtle, 1 week later

19 January 2007

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!

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!

15 January 2007

Enrico Zini: latex-beamer

Some latex-beamer tips Using with source-highlight source-highlight's latexcolor output uses colors that are not available in latex-beamer. Normally one would have to include them with \usepackage[usenames,dvipsnames] color , but under latex-beamer it does not work. One solution is to include the relevant colours from /usr/share/texmf-tetex/tex/latex/graphics/dvipsnam.def:
%% For source-highlight's output
% This unfortunately does not work
%\usepackage[usenames,dvipsnames] color 
% Therefore, I will copy them from /usr/share/texmf-tetex/tex/latex/graphics/dvipsnam.def
\DefineNamedColor named Blue            cmyk 1,1,0,0 
\DefineNamedColor named BrickRed        cmyk 0,0.89,0.94,0.28 
\DefineNamedColor named Brown           cmyk 0,0.81,1,0.60 
\DefineNamedColor named ForestGreen     cmyk 0.91,0,0.88,0.12 
\DefineNamedColor named Purple          cmyk 0.45,0.86,0,0 
\DefineNamedColor named Red             cmyk 0,1,1,0 
\DefineNamedColor named Black           cmyk 0,0,0,1 
\DefineNamedColor named RoyalBlue       cmyk 1,0.50,0,0 
After this is done, including a source is just a matter of:
# In the shell
$ source-highlight -f latexcolor filename.ext
# In the latex-beamer frame
\input filename.ext.tex 
Proportional columns In the latex-beamer documentation I have only seen columns with fixed sizes. \textwidth luckily works:
\begin frame 
  \frametitle Correzione dei compiti 
  \framesubtitle Il programmino da Fortran. 
  \begin columns 
  \column .5\textwidth 
   \tiny
  \input fortran/01-inizio.f77.tex 
   
  \column .5\textwidth 
   \tiny
  \input fortran/02-inizio.py.tex 
   
  \end columns 
\end frame 

12 January 2007

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

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

11 January 2007

Manoj Srivastava: Mail Filtering with CRM114: Part 2

Or, Cleanliness is next to godliness The last time when I blogged about Spam fighting Mail Filtering With CRM114 Part 1, I left y'all with visions of non-converging learning, various ingenious ways of working around a unclean corpus, and perhaps a sinking feeling that this whole thing was more fragile than it ought to be. During this eriod of flailing around, trying to get mailtrainer to learn the full corpus correctly, I upgraded to an unpackaged version of crm114. Thanks to the excellent packaging effort by the maintianers, this was dead easy: get the debian sources using apt-get source crm114, download tghe new tarball from crm114 upstream, cp the debian dir over, and just edit the changelog file to reflect the new version. I am currently running my own, statically linked 20061103-Blame Dalkey.src-1. Cleaning the corpus made a major difference to the quality of discrimination. As mentioned earlier, I examined every mail that was initially incorrectly classified during learning. Now, there are two ways this can happen: That the piece of mail was correctly placed in the corpus, but had a feature that was different from those learned before; or that it was wrongly classified by me. When I started the chances were almost equally likely; I have now hopefully eliminated most of the misclassifications. When mailtrainer goes into cycles, retraining on a couple of emails round after round, you almost certainly are trying to train in conflicting ways. Cyclic retraining is almost always a human's error in classification. Some of the errors discovered were not just misclassifications: some where things that were inappropriate mail, but not Spam; for instance there was the whole conversation where someone one subscribed debian-devel to another mailing list, there was the challenge, the subscription notice, the un-subscription, challenge, and notice -- all of which were inappropriate, and interrupted the flow, and contributed to the noise -- but were not really Spam. I had, in a fit of pique, labelled them as Spam; but they were really like any other mailing list subscription conversations, which I certainly want to see for my subscriptions. crm114 did register the conversations as Spam and non-Spam, as requested, but that increased the similarity between Spam and non-Spam features -- and probably decreased the accuracy. I've since decided to train only on Spam, not on inappropriate mails; and let Gnus keep inappropriate mails from my eyes. I've also waffled over time about whether or not to treat newsletters from Dr. Dobbs Journal or USENIX as Spam or not -- now my rule of thumb is that since I signed up for them at some point, they are not Spam -- though I don't feel guilty about letting mailagent squirrel them away mostly out of sight. A few tips about using mailtrainer:

9 January 2007

David Pashley: Reason 82973 why MySQL is a toy

MySQL cleverly maps
CREATE INDEX foo_bar ON Foo(Bar);
to
LOCK TABLE Foo WRITE;
CREATE TEMPORARY TABLE A-Foo ( .... INDEX foo_bar (Bar));
INSERT INTO A-Foo SELECT * FROM Foo;
ALTER TABLE Foo RENAME TO B-Foo;
ALTER TABLE A-Foo RENAME TO Foo;
DROP TABLE B-Foo;
If you have a very large table, expect this operation to take a) a lot of disk space, b) a very very long time and c) block any writes to the table in the process. I don't recommend adding indexes or altering any very large tables that are in production on MySQL, because you won't be in production for quite some time. Update: Tom Haddon asked me if this applied to recent versions of MySQL or to PostgreSQL. Looking at the docs, it appears to still apply to 5.1:
  • http://dev.mysql.com/doc/refman/5.1/en/create-index.html
  • http://dev.mysql.com/doc/refman/5.1/en/alter-table.html
    In some cases, no temporary table is necessary:
    • If you use ALTER TABLE tbl_name RENAME TO new_tbl_name without any other options, MySQL simply renames any files that correspond to the table tbl_name. (You can also use the RENAME TABLE statement to rename tables. See Section 13.1.16, RENAME TABLE Syntax .)
    • ALTER TABLE ... ADD PARTITION creates no temporary table except for MySQL Cluster. ADD or DROP operations for RANGE or LIST partitions are immediate operations or nearly so. ADD or COALESCE operations for HASH or KEY partitions copy data between changed partitions; unless LINEAR HASH/KEY was used, this is much the same as creating a new table (although the operation is done partition by partition). REORGANIZE operations copy only changed partitions and do not touch unchanged ones.
    If other cases, MySQL creates a temporary table, even if the data wouldn't strictly need to be copied (such as when you change the name of a column).
  • http://dev.mysql.com/doc/refman/5.1/en/alter-table-problems.html
As far as PostgreSQL is concerned, it doesn't mention anything about doing the same thing, but does mention that it does a full sequential scan of the table. During this time writes are blocked. You can use the CONCURRENTLY keyword to allow writes to happen, but it does two scans and will take longer, but you can still use your database. http://www.postgresql.org/docs/8.2/interactive/sql-createindex.html

6 January 2007

Martin F. Krafft: Skycon in Limerick, this February

I've been away from this blog for a long time, and I have a bad conscience, having promised Laura, the Skynet president, that I would spread the word about the conference Skynet is organising: Skycon. The conference will take place at the University of Limerick on the weekend of 16-18 February 2007. I am going to be there, and so will a few vastly more important people, including at least one other Debian(-related) person. I haven't yet decided how to contribute to the programme (I know, Laura; sorry!), but the choice is between an overview of what's new in Debian etch, our forthcoming (slightly-delayed) next stable release, or an introduction into my Ph.D. research. I am leaning towards the former, but I'd really prefer to have etch out when I give such a talk, and of that we cannot be sure until it's ready. Anyway, it looks like a good event, and having met many of the Skynet folks, I am convinced it'll be successful. I am not sure how accomodation is handled, but if you're wanting to come to this conference, give me a shout. First, I can probably offer floor space (subject to approval by my landlady), and I can definitely offer advice on how to best get to Limerick. Update: The #skycon channel has been set up on irc.freenode.org to support the conference. NP: Opeth / Blackwater Park

Stefano Zacchiroli: ocamlnet 2.2 in experimental

Ocamlnet 2.2: test it by yourself from experimental A couple of days ago I finally managed to complete the packaging work of Ocamlnet 2.2. This upstream version is a (r)evolutionary release in which it aggregate in a single source package libraries who used to be distributed separately, namely: equeue, ocaml-rpc, netclient, and ocamlnet itself. I've been quite surprised to discover that upstream is explicitly nice with us packages and provides guidelines on how to split the various libraries in binary packages addressing both dependency and licensing problems (e.g. for nethttpd which is GPL and can't be shamelessly linked with other components which are MIT/X11-licensed). The packages are in experimental but need NEW-processing, as well as cryptgps (a pure-OCaml implementation of some symmetric crypto algorithms, which is a new build-dep of Ocamlnet). Hence to ease testing I set up an apt-gettable repo here:
deb http://people.debian.org/~zack unstable ocaml

Please try it and give feedback to debian-ocaml-maint@l.d.o. In all my tests the upgrade from ocamlnet pre-2.2 has been smooth: the (too many) transitional packages I had to create did their dirty job. The only "issue" non-addressed (and I don't know how to actually) is that the nethttpd library used to be distributed in libocamlnet-ocaml-dev and is now distributed in libnethttpd-ocaml-dev. Since the former package is entirely useful without the latter there is no dep among the two and it's possible that upon upgrades an user ends up without a working nethttpd library on the system. I added a Recommends in the hope it's enough, let's see how many complaints I will receive ...

30 December 2006

David Nusinow: Communities

I spent some time playing with haskell over the past month or so. One of the most incredible things about it is the wonderful community that has sprung up around the language. The haskell homepage is a treasure trove of information, excited users throw all sorts of new articles at reddit every day, and the #haskell channel is exactly what you want out of an irc channel. A nice bonus for Debian types is the incredibly close ties the haskell community has with our distro.

Comparing this to Debian is instructive. The haskell community seems to be having a ton of fun using their language. The sense in #debian, or from whatever Debian tutorials I read, is that people aren't using their system to have fun any more. The air of joy and occasional whimsy that traces its way through #haskell (and also very strongly through the ruby community) seems to be somewhat surpressed in Debian, as though we're so big and cool and technically competent that we don't have time for frivolity. It's hard to have fun and create a warm and inviting community with this kind of attitude. Turf wars, protocol, and politics only compound the problem.

Doing something fun for its own sake should be a part of the Debian experience the same way that it's inherently part of the free software experience. It's way too easy to lose that in the mountain of packages, emails, and bug reports. Using Debian makes me happy, and I want to try and let that spirit out to play a little more.

25 December 2006

Isaac Clerencia: Xen + DCOP: automatic screenshots

eBox is growing a lot lately, and updating screenshots is always a cumbersome task, so, prompted by a workmate, I decided to do something to get automatic screenshots. The first step was to get an automatic way to install eBox from scratch to have something to get screenshots from. That was quite easy using the Xen facilities available in Debian. I only had to write a role for xen-create-image and now I can get an eBox up and running in a couple of minutes executing a simple “xen-create-image –role ebox –hostname ebox-screenshots”. Using eBox introspection capabilities and some Perl magic, it was quite easy to autogenerate a list of the URLs that we should take screenshots from. Once we had the URL list and a running eBox all we have to do was to have a browser logging in the eBox web interface and loop through the URLs taking screenshots. To achieve that I resorted to Ruby, Konqueror, KSnapshot and DCOP, and it took less than 40 lines of code to do it. The first problem was spawning Konqueror and KSnapshot instances and getting a DCOP reference for them, but that was easily done using Ruby’s fork, which is quiet convenient:

konqpid = Kernel.fork exec("konqueror --geometry 1024x768+0+0")
ksnappid = Kernel.fork exec("ksnapshot")
konqwin = KDE::DCOPRef.new("konqueror-# konqpid ","konqueror-mainwindow\#1")
ksnapshot = KDE::DCOPRef.new("ksnapshot-# ksnappid ","interface")
The second problem I faced was logging in the eBox interface, I had to enter the password and submit the form. Fortunately Konqueror’s DCOP interface offers a really nice “evalJS” function:

konqwin.openURL("https://# ip /ebox/")
konqhtml = KDE::DCOPRef.new("konqueror-# konqpid ","html-widget1")
konqhtml.evalJS("document.getElementById('credential_0').value = 'ebox'")
konqhtml.evalJS("document.login.submit()")

and we’re in! :D Now we only have to loop through the urls taking the screenshots. I had a little problem because ksnapshot expects you to click the left mouse button before taking the screenshot. Fortunately that could be easily fixed using xte from the xautomation package to simulate the click.

urls.each url
konqwin.openURL("https://# ip /ebox/# url ")
name = "# konqwin.caption.split(/-/)[1].strip.gsub(/ /,'_') "
ksnapshot.slotGrab
system("xte 'mousemove 100 100' 'mouseclick 1'")
ksnapshot.save("# outpath /# name .png")

The code I pasted lacks a bit of initialization and some sleeps I put there to synchronize the stuff, but basically that’s all. I just love Ruby, KDE and DCOP :)

23 December 2006

Gustavo Franco: We have a tree


Santa Claus arriving early.


My tree. I bet that if i start looking around i will find final Etch, Duke Nukem Forever and Chinese Democracy CD's somewhere. =)

19 December 2006

David Pashley: Backing up PostgreSQL

I decided it was probably time that I started backing up my PostgreSQL databases and ended up writing a quick script to do just that. I did have a look at pg_dumpall, but it appears to only write to stdout, meaning I couldn't have a file per database like I wanted.
#!/bin/bash
set -u
set -e
dumpdir=/var/backups/postgresql 
date=$(date +"%Y-%m-%d")
mkdir -p $dumpdir
find $dumpdir -name "*.sql" -mtime +10 -exec rm   \; 
for database in $(su - postgres -c "psql -l -t"   cut -d' ' -f 1   grep -v template0); 
do 
        su - postgres -c "pg_dump $database" > $dumpdir/$database-$date.sql; 
done
su - postgres -c "pg_dumpall -g" > $dumpdir/global-$date.sql
Just stick that in /etc/cron.daily/postgresql-backups and you should end up with 10 days worth of backups. I'm not sure if postgreSQL can have spaces in database names. I'm assuming it can't. The only other issue to deal with is not storing it on the same machine as the database server, let alone on the same physical hardware or even worse, the same partition. Update: Corrected typo and added dumping global objects to the script. Sorry to anyone that got spammed by my change to pyblosxom earlier today. I changed the base url, which changed the link of the entries. I should sort out having proper guids.

12 December 2006

MJ Ray: More on "Micro FM"

Joe Buck commented:
"It's inverse-square. The way to remember the inverse square law is to think of the outgoing signal expanding like a balloon. The surface area of the balloon, if it's a sphere, is 4*pi*r^2, so the amount of power per unit area is the reciprocal of that, proportional to 1/r^2."
Michael Maclean commented:
"A potential fun use - I once used one of those gadgets to replicate the "sorting hat" thing from the first Harry Potter film for a Brownie camp my girlfriend was helping out at. There was a radio hidden in the hat and a transmitter attached to an MP3 player for the samples. Basic, but apparently it worked out quite well."

11 December 2006

Joachim Breitner: DeCaf taking on form

A few month ago, I blogged a way to spread Free Software effectively, especially in developing countries: By deploying Free Software in internet caf s, where most people learn their way around computers. Most of them (and there are a lot, much more than in Europe) have a buisness plan that relies on software for free, but currently they achieve that through pirating Windows and software like Cybercafe Pro. Back than, I wrote this more or less theoretically, but it happend that I ended up having some time to actually start working on it.While Free Software, especially Debian, provides a very good base to build internet caf s from, one key component is more or less missing: Software to hand out these codes ( timecodes ) to the customer, to let them log in and surf for the time they bought. Very recently, Zybacafe was released, but I did not really like it, nor felt like maintaining a Pascal/Lazarus based Debian package. So I went ahead and implemented my own ideas.The Idea is to keep it very simple, very modularized and integrate deeply with normal unix ideas. So what we have now is a PostgreSQL database (one table so far), and all communication just goes via this table, so we don t have to design or implement complicated protocols. A python gtk application for the front desk generates the timecodes that are then, on paper, passed to the customer. The workstations greet the user with standard GDM, but our pam modules authenticates the timecode instead of a username/password pair. While using the system, a small floating window informs the user about the remaining time. If he does not log out voluntarily, a system daemon will kill all his processes eventually.The long term mission is to form that into a Custom Debian Distribution that will install the server hassle-less, and besides being pre-configured for the internet caf s needs, also immediately serves as an automated installation server for the workstations (think FAI), all useing stock Debian packages, as far as possible. Another pam module could, upon login, mount the homedirectory as a copy-on-write overlay of a template user s home directory, and through away the changes afterwards. The goal is to offer easier installation, less maintenance, better robustness and more flexibility than the current common non-free systems.But, of course, this project needs help. First of all: Users! If you have any use for time-limited logins (Internet caf , school surf terminaly, parents with otherwise not to bed going kids), you can be an earliy adaptor. Developers are very welcome as well, and due to the modular structure, cooperation should be quite smooth.The development happens on alioth, where we have the subversion repositry, as well as on the Debian wiki page. Alpha packages for these components can be found on the alioth group s webspace. We do not have a mailing list yet, but feel free to e-mail me. We will set up a mailing list once there is a need for it. Thank s to the KACE for supporting this.

8 December 2006

Biella Coleman: Small Claims Court and the Insurance-Industrial Complex

I prefer the study of the law over being personally embroiled with the law in the real world, but if indeed Blue Cross Blue Shield does not pony up the money to cover my recent mole surgeries, I think I am going to take them to small claims court, which I know nothing of, except that it is a cheap way to try to get something done when you are getting screwed by a large faceless organization or some facefull twit. So the basic story is that since I had a lapse in my insurance (thanks to good Old Rutgers University!!), when I decided that I should buy my own just in case, I fell into a “pre-existing” clause, which means basically the insurance company can make your life a living bureaucratic hell because they have to review and approve every single procedure or doctor visit for over a year. Super. So of course when I got my mole diagnosis (dysplastic) and then the surgeries (the total cost being almost 3500) they went for review, but of course Blue Cross is taking their sweet time… The derm office has called for me to get involved so I spent the morning talking to a Ms. Flood from Blue Cross/Blue Shield and she explained to me that all the documentation from the doctor’s office was only received November 1st and then they will take 60-90 days to review the case before making the decision. Now, the insurance coordinator at the dermatology office told me that Blue Cross told her that Blue Cross can take up to FIVE years (not months, Years) to make a decision which seems, well just like they type of thing they would do, but somewhat illegal, maybe, no???!!! Anyway, my plan is to wait those 90 days and then if they deny my coverage or keep flip flopping around saying they need more info, I think I am going to proceed to the small claims court option. Honestly I don’t know if this is a realistic option (though I hope my lawyer friends write back soon) and it is a pain in the neck but I refuse refuse refuse to let this go…. because well, my mole condition was not pre-existing! Sure I had them, but they were happy healthy moles… And I even had seen another dermatologist with my Blue Cross Blue Shield insurance about 6 months earlier and all was good!! Yes I am upset :-( Anyone else ever fought the insurance industrial complex along these lines? Or have used small claims courts? This makes me want to stay in Canada… forever.. but actually I am due back in NYC by August for a permanent job but more on that later.

MJ Ray: Free-to-air satellite reception will still be better for radio, music and films after digital switchover

UK media regulator Ofcom released Ofcom sets Digital Switchover related licence conditions about the terrestial broadcast network, including a consultation on self-help relays. Essentially, the public service station multiplexes (BBC Royal Charter, Digital 3 & 4 and Freeview, labelled 1, 2 and B on this list ) will be available from all current public analogue transmitters, but the commercial multiplexes (SDN/itv and National Grid Wireless, which are A, C and D on the list) only need to continue the current coverage. So, free-to-air satellite reception will still be better for radio, music and films in most current poor-DTT areas.

28 November 2006

Matthew Palmer: VLAN adventures

Have you ever had a need for a large number of "real" network interfaces on a Linux box? For security reasons, you don't just want to hook everyone up to a single switch and use virtual interfaces (because it's too easy for one of the connected devices to play silly buggers with his neighbours). Up to a certain point, you can stuff more NICs into a box, and when it fills up you can switch to those outrageously expensive 2- and 4-port NICs. But eventually you're going to run out of space[1] or money. At that point, you need something more interesting. For me, this week, that "more interesting" has been Ethernet VLANs. Linux Journal has a good intro to the technical aspects of how to setup VLANs and Linux. VLANs are some crazy stuff. They're implemented by wrapping a little number around every Ethernet frame indicating which VLAN the packet is "on", and the switch (you need a higher-end device, appropriately configured) makes sure that packets don't roam onto ports they're not meant to be on. For a single switch, this isn't very interesting, and you don't really need an IEEE standard to make it work -- just a lot of little jumpers. However, VLANs are mostly useful on larger networks, which tend to use more than one switch. So you need a way for your VLANs to roam amongst your switches -- hence the packet tagging. You stick the tag onto the packets and fling them off to another switch, and packets coming in with the tag are corraled into their VLAN. Naturally, you don't want end-user devices whacking their own VLAN tags onto packets (untrusted data, and all that), so you define most of your ports as being "untagged". Packets that come in on these ports are treated as regular ethernet frames and tagged with the appropriate VLAN ID, and packets that go out have their VLAN IDs stripped before being sent. (This implies that you can tunnel VLANs in VLANs, and I'm pretty sure that is doable in most switches, modulo some nasty problems that can, and probably will, occur). The ports that aren't designated "untagged" spit out tagged packets -- and this is where my interest lies. Like most every other computer-related standard, Linux can decipher and work with VLAN tags (the 8021q module is what you're looking for). You just load up the module, hook your NIC into the appropriate port on your very expensive switch, define your VLAN tags with vconfig, and suddenly you've got vlanN interfaces, which map to real RJ-45 ports, and you can hang network devices off these and get lots and lots of "real" network interfaces on your Linux router. It's all so simple, right? Nothing ever is, of course. The trials and tribulations I've had over the past two days have included: Thankfully, once all those dramas were done, the whole thing just kind of fell into place, and now I've got a machine which has up to 2048(ish) network interfaces (with huge, glaring caveats on that upper bound, of course). With a bit of luck, the live installation in a couple of days will go smoothly. You can stop sniggering now.
1. In this case, there wasn't a lot of space to begin with, as it's a 1RU box I'm working on, and the 4-port NIC didn't want to place nice with me for some reason anyway.

26 November 2006

Russell Coker: supporting an electrion campaign

Yesterday I handed out "how to vote" cards for the Greens at the state election. It did seem to be a significant waste to have so much paper produced. Slightly more than half the voters who visited my polling booth took cards from all parties, which was obviously of little use. There is some useful information to be gained from reading the cards from all parties, but nothing that you can analyse during the short period spent waiting in line. I expect that most people decide who to vote for before they get anywhere near the polling booth and just accept the cards because they feel that it may be rude to reject them. While ironically some people who didn't like the Greens refused to accept a card from me and told me that they didn't want it with the impression that they would offend me, I'd rather save the trees and not give cards to people who don't want to use them...

I spoke to a representative of the Family First party who tried to convince me that the Greens should be against homosexuality because the Greens are "against unnatural things", he also claimed that people who choose not to have children (being gay is apparently choosing not to have children) are selfish - unless of course they are a celibate priest. He also managed to offend a supporter of the ALP in two different ways which led to an amusing heated debate and then left before I could have any more fun. For the reference of other Family First people, I've pasted in the dictionary definitions of "homo" and "hetero", when used as prefixes those Greek derived words mean "like attracting like" and "opposites attract". An example of such usage is the term "homo-charged electrets" used in electronics.

From The Collaborative International Dictionary of English v.0.48 [gcide]:
Hetero- \Het"er*o-\ [Gr. "e teros other.]
A combining form signifying other, other than usual,
different; as, heteroclite, heterodox, heterogamous.
[1913 Webster]

From The Collaborative International Dictionary of English v.0.48 [gcide]:
Homo- \Ho"mo-\
A combining form from Gr. "omo s, one and the same, common,
joint.
[1913 Webster]

From Bouvier's Law Dictionary, Revised 6th Ed (1856) [bouvier]:
HOMO. This Latin word, in its most enlarged sense, includes both man and
woman. 2 Inst. 45. Vide Man.


The ALP (usually known as Labor) supporters had unfortunately believed the lies of their own apparatchiks. They were convinced that the Greens were directing preferences to the Liberal party, even though in most districts the Greens actually directed preferences to the ALP! The only exceptions were a small number of districts with split preferences (favoring neither Liberal nor ALP). It continually amazes me that while helping the ALP they were attacking us! Once I showed the ALP supporters the cards I was distributing they became quite friendly, as the Greens had a very low chance of winning the lower house in the districts for the polling place in question the preferences would go to the ALP.

It was interesting to talk to a Liberal supporter, he supports the workplace reforms implemented by the Federal government (Liberal) because he was hired for his current job because his employer can easily get rid of him if the business has a down-turn. It is hard to argue with someone who has only got a job because of the policy in question, but I did point out that continuity of employment is a major factor when applying for a mortgage. I recently bought a house and had a significant amount of hassle from the banks due to the fact that I work as a contractor. I had previously enquired about borrowing twice as much money while at my last permanent position and had much fewer problems from the banks.

I mentioned some of the other bad things the Liberal government has done (such as invading Iraq for no good cause), but the Liberal supporter was too sensible to comment on any of the issues where he would only lose. This however left him with not very much to say.

Most of the work of handing out the cards was quite boring and very tiring. Fortunately a friend decided to visit and help out so there were three people handing out Greens cards instead of the scheduled two which made it easier work. The ALP apparently had four people which seems to be an optimal number as there were voters arriving from two directions and no matter where they came from at least two ALP supporters would be able to intercept them.

Surprisingly the work was easier at the most busy times. When the queue stretched out into the street I could stoll along the queue and give the cards to the voters. When the queue disappeared later in the day the voters were walking past at high speed and I had to move quickly to get to them.

Now it's time to start planning for the next Federal election.

Next.

Previous.