Search Results: "rra"

20 November 2006

Ben Armstrong: Towards a Debian Jr. Live CD

Debian Jr. development revived Recently there has been some lively discussion on the Debian Jr. list about how to arrange an account for a child of 1 to 3 years of age. Suggestions included using set-top box software like Freevo, tailoring DEs with panels and large buttons, using simpler WMs like fvwm, or using an “activity centre” app like Gcompris. Now, I respect those parents who hold that a child this young should interact more with the “real world”. While I wouldn’t go so far as to outright prohibit my young ones from computer use, I can see the wisdom in keeping it to a minimum. But, for better or worse, our family is one of several who have some experience helping our youngest members use our Debian systems. We would like to share what we’ve learned through the Debian Jr. project. Getting started with live.debian.net To that end, last week I was inspired to follow the Debian Live ISO Howto to produce my first rough draft of a Debian Jr. live CD built from scratch on Etch. For the final product, we’ll want to use a local partial Debian archive mirror, as it not only optimizes fetching packages for several build iterations, but also can be kept stable, which is important as we near release. But for this draft, I ran into trouble building the complete package list to populate the partial mirror, as cdebootstrap, which make-live uses, has no handy --print-debs switch like debootstrap does. So for now, I rely on approx to cache packages for optimization only. A straightforward process to create a working live CD The rest of the process was straightforward: using live-package, I created a package list1 containing Gnome and the Debian Jr. metapackages, I configured /etc/make-live.conf to point at my proxy, and then I ran the make-live script on the package list. The end result was ./debian-live/binary.iso, which successfully booted under qemu. At this stage, there is not much to show. To be truly useful, the live CD needs to be set up so that children and their guides can immediately find and use the material intended for them. We will need not only one live CD user, but four, varying in age range and role. (More about this in a future article.) However, it is an encouraging start, and shows that we may be able to produce something usable by the time Etch releases.

1 For this exercise, I simply combined /usr/share/make-live/lists/gnome with the junior-* metapackages in Etch, and added mozilla-firefox-gnome-support to satisfy Gnome’s web browser dependency and cut down on redundancy, resulting in the following list.

junior-art
junior-doc
junior-games-card
junior-games-gl
junior-games-net
junior-games-sim
junior-games-text
junior-gnome
junior-internet
junior-kde
junior-math
junior-programming
junior-puzzle
junior-sound
junior-system
junior-toys
junior-typing
junior-writing
mozilla-firefox-gnome-support
eject sudo
console-common locales
gdm gdm-themes gnome-desktop-environment gnome-cups-manager gnome-screensaver
gnome-themes-extras
rhythmbox synaptic
x-window-system-core

19 November 2006

Jos Parrella: Elections in Venezuela

In two weeks (Dec 3rd) there will be presidential elections in Venezuela. This will be the third time where Hugo Chavez, the current President, will be participating in the elections. The first time, in 1998, he won by 62%, then dropped to 59% in 2000 and currently some polls are giving him between 50 and 60 percent of vote intention. Since 1998, we’ve got a very active electoral movement and controversial situations which have raised very diverse opinions about our electoral system. If I recall correctly, in 1998 people voted using optic forms. In that moment, spanish Indra was the company in charge for the machines and most of the technology used in the elections. That was the time where the Supreme Electoral Council depended on the Executive power, i.e., the President. In 1999, Chavez proposed to rewrite the Constitution, and the National Electoral Council became an independent power. This Constitution was approved in two referenda in 1999, where touchscreen machines were used. In 2000, after the new Constitution was approved, new presidential elections were made. The same touchscreen machines were used and we made a transition between Indra and a multinational holding named Smartmatic. In 2004, after two millions and a half of signatures were gathered to recall Chavez presidency, the revocatory referendum was made, using the Smartmatic machines. Almost six million people voted to maintain Chavez in power. Of course, after eight years of the same party in the power, as well as other problems (namely a national strike and a Coup d’Etat in 2002), several ideas arised regarding the legitimacy of the election process.
Today, the National Electoral Council released a flyer in the press, where they try to issue these topics. I must recognize that, being a newbie voter, I was unaware of several of the things they published today. For example, 8 of every 10 venezuelans over 18 are signed for voting in the elections. That’s one of the higher percentages of public awareness about elections in Latin America, higher than, for example, Colombia. That means 16 million people are able to vote, and we’re used to get around 60 percent of participation. We do vote with touchscreen machines, and the results are completely computerized. The military guards all the equipment, and provides security to the randomly elected civilian which work as temporary personnel. Members of every involved party are present in all the election centers, as well as national and international observers. After you’re checked to vote, you have to give your fingerprint in a special biometric device. This is transmitted live, were possible, avoiding two people voting in the same day. After you vote, your finger is marked with silver nitrate, which goes away after two days or so. Of course, you’re only allowed to vote if you don’t have the mark in your fingers. The touchscreen machines prints a paper which you put into the traditional box. After the voting has concluded, more than half of the boxes will be opened and checked against the information in the machine. The boxes subject to this check are randomly selected, as well. A brief thought about the software used in the machines. In 2004 or so, we (the Free Software Community in Venezuela) struggled and made pressure to the National Electoral Council to reveal the code and publish it wide open. This has been achieved until some point, since every interested person or organization is allowed to take a peek at the code. Dozens of organizations have already done so and are impressed by the features that are now present in the code. Before the first vote is registered, the machine prints a zero-vote confirmation, and then subsequently randomizes the order of the votes registered in memory. Only after all the election centers are closed, the machines start transmitting information. This year, three hours past the closing time we’ll have the results. The final and most important, from my point of view, argument held to support our election system is the random queue organization at the election centres. The registry is sorted by ID number, the votes are randomly stored in the memory and the biometric device is used in a per-arrival basis. Therefore, since nobody takes the same time to vote, the queues will be unarranged therefore making it quite difficult to determine a possible vote sequence. This has been certified lately by the European Union, the Organization of American States and other organizations. Whoever wins this election, I’m quite confident about our election system. I just hope that other institutions in our Country start using reliable systems (for example, the national ID office) in order to give at least the feeling of being in a rightful State.

17 November 2006

Joerg Jaspert: Call for Papers for DebConf7

So, after a lot of work to get the system up and running (and then changing it until others from the team liked it) we finally sent out the Call for Papers and Registration informations for DebConf7. Now, only about one hour later we already have 37 registered users in that system. Thats fast. A nice detail about the new system we use (except the complete change it means for everyone :) ) is that accounts you create now get re-used for all future DebConfs. No need to reenter your data every year. Additionally we (as in DebConf) can offer other Debian related events the ability to use this system for their stuff. That means - if you organize a Debian related conference and want to keep track of attendees, events/talks, manage a schedule, or just parts of this - contact me, it can be arranged easily. The advantage for your attendees/speakers is that they only need one account at one system, not one for every conference. And you as organizer get a fully running system for free. :)

16 November 2006

David Moreno Garza: On Jordi s arrival to DebConf7

I simply loved this; on the ways of arriving and reaching Edinburgh, to get to DebConf7 :D
Swimming
Jordi, please tell us when you’ll arrive at Leith, and we can arrange for someone to come and pick you up with a towel and some whisky.
Heh, that’s our ironman. ;-)


Jordi working out to get to DebConf7.

15 November 2006

Russell Coker: economics of a computer store (why they don't stoc...


In some mailing list discussions recently some people demonstrated a lack of knowledge of the economics of a shop. Having run a shop for a few years (an Internet Cafe) I have some practical knowledge of this. I will focus on small businesses in this article, but the same economic principles apply to large corporations too.

When running a shop the main problem you have is in managing stock. There are two ways of getting stock, one is to have wholesalers give it to you for a period in which you can try to sell it and you pay for it when it's sold, this is probably quite rare (I don't know of an example of it being done - and probably no retailer wants to talk about it in case they lose it). Often retailers consider themselves to be privileged if they are permitted to pay for hardware one month after they receive it! The more common way of getting stock is simply to buy it and hope you can sell it in a reasonable period of time (often the wholesaler will offer to buy the stock back at a 10% discount if you can't sell it).

To buy stock you need money, this can come from money that has accrued in the business account (if things are going really well) or from a mortgage taken out by the business owner if things aren't going so well. For small businesses things usually don't go so well so the money used to buy stock is borrowed at an interest rate of about 7% or 8% (I'm using numbers based on the current economic conditions in Australia, different numbers apply to different countries and different times but the same principles apply). The ideal situation is when there is money in the company bank account to cover the purchase of all stock, this means that the cost of owning stock is that you miss out on the 5.5% interest that the money will get in a term deposit.

Almost all stock has a use-by date of some form. Some items have a very short expiry (EG milk used to make hot chocolate in an Internet cafe, some have a moderate expiry date (computer systems become almost unsellable in about 18 months and lose value steadily month after month), but in the computer industry nothing has a long expiry date.

Let's assume for the sake of discussion that you want to run a small computer store that is open to passing trade (this means that you must have stock for an immediate sale). Let's assume that all items of computer hardware lose half their value over the period of 20 months at a steady rate of 2.5% of the original price per month (I think that most computer hardware loses value faster than that, but it's just an assumption to illustrate the point).

The next major issue is the profit margin on each sale. If you can make a 20% profit on a sale then an item that has lost 10% of it's value while gathering dust in your store will still be profitable. However the profit margins on computer sales are very small due to having a small number of major manufacturers (Intel, AMD, nVidia, ATI, Seagate, and WD) that have almost cartel positions in their markets and there being little to differentiate the stores apart from price. I have been told that 3% profit is typical for retail computer hardware sales by the small companies nowadays! Now if the stock will lose 2.5% of it's value per month, you pay 0.5% interest per month and you make a 3% profit then if an item remains in stock for a month then you lose money. So on average (by value) you need to have stock spending significantly less than a month in your store. Cheap items such as low-quality cases and PSUs can stay in stock for a while. More expensive items such as new CPUs and the motherboards to house them must be moved quickly.

What's the first thing that you do to reduce stock? You can keep stocks low, but there is a limit to how low you can go without losing sales. The next thing to do is to not stock items that customers won't often buy or items where there is a similar item that you can stock as a substitute. The classic example of this is hard drives, a customer will want a certain capacity for a certain price - if their preferred brand is not in stock they will almost always take a different brand if it has the same capacity at the same price. Stores often advertise prices on multiple brands of hard drive in each capacity, but often only try to keep one brand in stock.

Of course this is a problem for the more fussy buyer. If you want to buy two identical parts from the same store on different days you might discover that they don't have the stock on the second day and that they instead offer you something equivalent. Not only do retailers have issues with managing their investment in stock but wholesalers have the same problem. So if a retailer runs out of WD drives and discovers that their preferred wholesaler has also run out of WD drives then they just buy a different brand - most customers don't care anyway.

There are some companies I deal with that have a business model based on services. One of them sells hardware to customers at cost, but charges them for the time spend assembling them, transporting them, etc. The potential for a 3% profit on the hardware isn't worth persuing, they prefer to just charge for work and also save themselves the sales effort. Another company I know operates almost exclusively on the basis of ordering parts when customers request them (but still make a small profit margin on the sales), this means that the customer can be invoiced as soon as the hardware arrives. The down-side to this is that wholesalers have the same stock issues and they sometimes have excessive delays before the wholesaler can deliver the hardware.

Dell is the real winner out of this. As they operate by mail-order they don't need to have the stock immediately available, they have a few days to deliver it which gets them time to arrange the supply. They can also have a central warehouse per region which reduces the stock requirements again. A 3% profit on items that rapidly decrease in value makes it almost impossible to sustain a small business. But an organization such as Dell can sustain a successful business at that level.

Of course the down-side for the end-user is that Dell doesn't want to have too many models as that just makes it more complex for the sales channel. Also they have deals with major suppliers which presumably give them deep discounts in exchange for not selling rival products (this is why some brands of parts are conspicuously absent from Dell systems).

10 years ago there used to be a small computer store in every shopping area. Now in Australia there are a few large stores (which often only have a small section devoted to computers) and mail-order. There seems to be much less choice in computer hardware than there was, but it is much cheaper.


PS I've attached a picture of day 39 of the beard.

Biella Coleman: Stuck on the technology of yesterday

So I am in Alberta, Canada but I decided not to get a local phone number mostly because I have a VOIP phone that works fine and it lets me call Puerto Rico for free, and allows my sister call me for free too. But not having an Alberta 780 area code can be quite problematic at times and the latest chapter in the confusion has come from trying to get the IBM warranty folks to accept that you can call from Alberta with a non Alberta area code and realze that even if they accept that, the computer is the one wearing the pants and thus making the decision…So even if you convince them that new technologies make this possible, the transaction is still sabotaged because in the end, they rely on computer to get the actual service repair person to call you and the computer relies, and can only rely on the area code., who can only see that an area code 773= USA, so then it gets a US rep to contact you back after the initial phone call. Here is an IRC transcript discussing the confusion, which I think is pretty amusing: m: they are so confused
m: the guys says “what province are you in?” I say “Alberta”
m: and then he gets my number and he says “You aren’t in Alberta, sir”
m: and I say “Yes I am, my phone number is a US phone number, but I assure you, I am in Edmonton, Alberta right now”
m: and he says “Are you a canadian citizen?”
m: and I say ‘no, do I need to be, in order to be in Alberta?” and he says “The problem is, you are actually in the US right now”
m: I AM NOT IN THE USA
biella: heh
m: so I had to say “You realize that cell phones and voip technology allow you to roam outside of the USA and still use the same phone number?!”
b: and then what?
m: well he said I needed a canada number or their system would send it to the states
m: regardless if thats where my address is
m: their computer is too smart
micah anyways
biella: or not smart enough Well, we are now using my office number so hopefully all will be OK.

MJ Ray: Business: Email, sigs and signing

Ian Rawlings wrote in an article in uk.comp.os.linux that:
"There was a legal precedent set in the UK a little less than a year ago, in which the company's name and contact details in an email signature were taken as sufficient identification of the company for the contents of the email to be acceptable as a contract [...]"
and then helpfully provided some references about it. The headline on Disclaimers could make emails into contracts [The Register] seems a bit off. Even the article ends:
"The end result of this could be that people who include a signature and disclaimer at the bottom of their emails might actually be making themselves more liable than people who just send one line emails."
Note the might there. It's quite a leap, isn't it? Mehta v J Pereira Fernandes SA [2006] EWHC 813 (Ch) (07 April 2006) appears to have ruled that headers were not a sufficient signature, rather than that a plain text signature block (sig) is sufficient. Have I missed a key point here? AFAICS, the ruling contains the following key general points:
"28. I have no doubt that if a party creates and sends an electronically created document then he will be treated as having signed it to the same extent that he would in law be treated as having signed a hard copy of the same document. [...]"
"30. [...] if a party or a party's agent sending an e mail types his or her or his or her principal's name to the extent required or permitted by existing case law in the body of an e mail, then in my view that would be a sufficient signature for the purposes of Section 4. [...]"
I doubt that a sig is quite the same as a hand signature, as it doesn't necessarily 'serve as a method of authentication' as required by the Digital Signature Directive ( 1999/93/EC, Electronic Signatures Regulations 2002), but there are times when it could bind one to things. Essentially, using a sig is like using headed paper, not like hand-signing. Parts of the ruling (para.19) seem to argue that automatic insertions make things carry less weight AFAICT - does that hint at how futile those forced stupid disclaimers would be if relied upon in court? Does the same automatic-or-decision point also mean that using a electronic signature tool (gpg or whatever) selectively helps it carry more weight than signing everything automatically? I don't agree it ... signs death warrant for Digital Signatures [Financial Cryptography] Interesting questions. Anyone know if the answers are decided yet?

13 November 2006

Jonathan McDowell: I ain't dead

Well, I've survived my stag weekend. I did have some fears I might not. TFM did a great job of arranging it; 15 of us ended up in 2 cottages at Park Farm Barns (most of us for Friday and Saturday, with a handful of us there until today). Paintball was played at Skirmish. Much meat was eaten (possibly the largest piece of beef I've seen up close). Much alcohol was consumed. And my arteries are going to take a while to recover from 3 mornings in a row of fried bacon for breakfast. All good though. Thanks to everyone who managed to make it.

12 November 2006

Adam Rosi-Kessel: Toto, I Don't Think We're in Wikipedia Anymore

The last time I made any serious contributions to Wikipedia was back in 2001 or 2002. The community was exciting, friendly, and welcoming, and I enjoyed spreading the word as most non-technical people I knew had never heard of wikis or Wikipedia. Since then, I may have corrected the occasional typo or fixed a legal error, sometimes anonymously and sometimes under my account (apparently I “clarified the 13(c) protective arrangement issue” in the Urban Mass Transportation Act of 1970 back in the Fall of 2003, although I have no recollection of having done so), but I hadn’t started any new entries since the early days. At a recent presentation I attended by Sun’s Hal Stern, I learned that his eating club (Colonial Club) at Princeton University has a Wikipedia entry (as do all the other eating clubs). On further investigation, I learned there were no entries for any of the student cooperatives or other upperclassman eating options. To the uninitiated, it may be hard to understand why this matters beyond the insular Princeton community, but — suspend your disbelief just for a moment — the eating clubs have been called Princeton’s “peculiar institution” (a side-long reference to slavery) and have a storied and controversial history going back at least to the 1870’s (see, for example, this summary of the historical record from 1888-1993). It seemed to me that omitting the student cooperatives was akin to having a Wikipedia article on political parties that includes links to both the Republican and Democratic parties but leaves out any mention of the Green Party. Of course, the Green Party doesn’t wield the influence of either of the main parties, but its existence provides insight both into the American political system and the character of the two main parties. If no mention of the Green Party were included in Wikipedia, a foreign researcher attempting to learn about the American party system would come away with an incomplete and misleading understanding. The fact that the Green Party has not been particularly successful nationwide is, itself, interesting, useful, and relevant information. Although I wouldn’t pretend Princeton is as important or interesting as the American political system, it’s still a subject of scholarly investigation, and a topic that a fairly significant number of people are interested in learning about. I thought I would start basically a stub article for the Two Dickinson Street Co-op and spend a couple of days building it out and asking knowledgeable experts to contribute and add sources. Within a few seconds after I created the article, however, it was “speedily” deleted. A bit surprised, I tried to start an explanation as to why the entry warranted at least consideration for inclusion, and the article was deleted again and I found this message on my “talk” page:
This is your last warning.
The next time you vandalize a page, you will be blocked from editing Wikipedia. Diez2 14:55, 9 November 2006 (UTC)
I had gone from citizen to felon in two minutes flat! There then ensued several attempts to at least allow a debate on the deletion, but the article was unilaterally speedily deleted several times by several different editors. Even after one admin restored the article as not appropriate for “speedy deletion,” another admin stepped in and speedily deleted it again. I received some fairly acerbic retorts to my attempts — e.g. this: “We don’t have a page for every club in the world. If you want free web-hosting check out Myspace or usenet. Also anonymous postings do not make a topic notable or important.” (I’m not sure why he accused me of posting anonymously — I didn’t. Also, does “usenet” offer “free web-hosting?”) Finally, the deletion of the article was converted from a “speedy deletion” to a nomination as an “article for deletion” (‘AfD’), which allows at least for some discussion on the topic. The debate is ongoing — see it here — and some of the comments continue to be fairly corrosive. For example, one editor wrote:
Another editor called the debate a “pointless waste of time” over a “vanity article,” although I can’t find that comment any longer. I admit that I created the article without knowing much about the process, and certainly with little understanding of the numerous acronyms, flags, and the several different ways an article can be killed. Apparently, I didn’t contest the speedy deletion properly, although it wasn’t clear to me from the deletion notice exactly what I was supposed to do, and I assumed the restoration of the article by another admin meant that it would persist for at least a few days. I thus deserve some of the blame for not doing more pre-posting diligence, but I was relying for the most part on my 2001-2002 experience where you could create an article, spend a few days improving it, invite others to contribute, etc., and articles with a colorable argument for inclusion would generally stay in. It seems the new Wikipedia is a much less kind and less gentle Wikipedia. As another participant in the process wrote to me:
This whole situation is so strange. It makes me feel like I just stumbled into somebody else’s trench warfare. The defenders of notability! I wonder how long the constant vigilance of volunteers will hold out…
Of course, a similar phenomenon has occured with many open source projects. Initially, the doors are wide open and everyone’s contributions are, if not welcome, then at least tolerated. I suppose it is a sign of Wikipedia’s success that the front gates are locked so tightly. Still, I wonder how many potential good faith contributors are now permanently alienated by an initial bad experience such as this one, and whether Wikipedia will ultimately suffer from it. Low barriers to entry have traditionally been a key element to attracting participants to peer production efforts, but they seem to break down in direct relationship to the project’s external importance. Incidentally, Stern’s edit to the Colonial Club entry, mentioning F. Scott FitzGerald’s characterization of the club, was quickly reverted by another editor as “nonsense.”

11 November 2006

Russell Coker: more about securing an office

My post about securing an office received many comments, so many that I had to write another blog entry to respond to them and also add some other things I didn't think of before.

One suggestion was to use pam_usb to store passwords on a USB device. It sounds like it's worth considering, but really we need public key encryption. I don't want to have a USB device full of keys, I want a USB device that runs GPG and can decrypt data on demand - the data it decrypts could be a key to unlock an entire filesystem. One thing to note is that USB 2.0 has a bandwidth of 30MB/s while the IDE hard drive in my Thinkpad can sustain 38MB/s reads (at the start - it would be slower near the end). This means that I would approximately halve the throughput on large IOs by sending all the data to a USB device for encryption or decryption. Given that such bulk IO is rare this is feasible. There are a number of devices on the market that support public-key encryption, I would be surprised if any of them can deliver the performance required to encrypt all the data on a hard drive. But this will happen eventually.

Bill made a really good point about firewire. I had considered mentioning it in my post but refrained due to a lack of knowledge of the technology (it's something that I would disable on my own machines but in the past I couldn't recommend that others disable without more information). Could someone please describe precisely which 1394 (AKA Firewire) modules should be disabled for a secure system? If you don't need Firewire then it's probably best to just disable it entirely.

To enable encryption in Fedora Core 6 you need something like the following in /etc/crypttab:
home_crypt /dev/hdaX /path/to/key
swap /dev/hdaX /dev/random swap
Debian uses the same format for /etc/crypttab.

The Peregrine blog entry in response to my entry made some really good points. I wasn't aware of what SUSE had done as I haven't done much with SUSE in the past. I'm currently being paid to do some SUSE work so I will learn more about what SUSE offers, but given the SUSE/MS deal I'm unlikely to use it when I don't have to. Before anyone asks, I don't work for SUSE and given what they have just done I will have to reject any offer of employment that might come from them.

I had forgotten about rsh and telnet. Surely those protocols are dead now? I use telnet as a convenient TCP server test tool (netcat isn't installed on all machines) and never use rsh. But Lamont was correct to mention them as there may be some people still doing such things.

The Peregrine blog made an interesting point about Kerberised NFS being encrypted, I wasn't aware of this and I will have to investigate it. I haven't used Kerberos in the past because most networks I work on don't have a central list of accounts, and often there is no one trusted host.

I strongly disagree with the comment about iSCSI and AoE "Neither protocol provides security mechanisms, which is a good thing. If they did, the additional overhead would affect their performance". Lack of security mechanisms allows replay attacks. For example if an attacker compromises a non-root account on a machine that uses such a protocol for it's root filesystem, the victim might change their password but the attacker could change the data back to it's original values even it if was encrypted. Encryption needs to have sequence numbers embedded to be effective, this is well known - the current dmcrypt code (used by cryptsetup) encrypts each block with the block ID number so that blocks can not be re-arranged by someone who can't decrypt them (a weakness of some earlier disk encryption systems). When block encryption is extended to a network storage system I believe that the block ID number needs to be used as well as a sequence ID number to prevent reordering of requests. CPU performance has been increasing more rapidly than hard drive performance for a long time. Some fairly expensive SAN hardware is limited to 40MB/s (I won't name the vendor here but please note that it's not a company that I have worked for), while there is faster SAN hardware out there I think it's reasonable to consider 40MB/s as adequate IO performance. A quick test indicates that the 1.7GHz Pentium-M CPU in my Thinkpad can decrypt data at a rate of 23MB/s. So to get reasonable speed with encryption from a SAN you might require a CPU which is twice as fast as in my Thinkpad for every client (which means most desktop machines sold for the last two years and probably all new laptops now other than the OLPC machine). You would also require a significant amount of CPU power at the server if multiple clients were to sustain such speeds. This might be justification for making encryption optional or for having faster (and therefore less effective) algorithms as an option.

I believe that the lack of built-in security in the AoE and iSCSI protocols gives a significant weakness to the security of the system which can't be fully addressed. The CPU requirements for such encryption can be met with current hardware even when using a strong algorithm such as AES. There are iSCSI accellerator cards being developed, such cards could also have built in encryption if there was a standard algorithm. This would allow good performance on both the client and the server without requiring the main CPU.

Finally the Peregrine blog entry recommended Counterpane. Bruce Schneier is possibly the most widely respected computer security expert. Everything he does is good. I didn't mention his company in my previous post because it was aimed at people who are on a strict budget. I didn't bother mentioning any item that requires much money, and I don't expect Counterpane to be cheap.

Simon noted that developing a clear threat model is the first step. This is absolutely correct, however most organizations don't have any real idea. When advising such organizations I usually just invent a few possible ways that someone with the same resources and knowledge as I might attack them and ask whether such threats seem reasonable, generally they agree that such things should be prevented and I give further advice based on that. It's not ideal, but advising clients who don't know what they want will never give an ideal result.

One thing that I forgot to mention is the fact that good security relies on something you have as well as something you know. For logging in it's ideal to use a hardware security token. RSA sells tokens that display a pseudo-random number every minute, the server knows the algorithm used to generate the numbers and can verify that the number entered was generated in the last minute or two. Such tokens are sold at low prices to large corporations (I can't quote prices, but one of my clients had prices that made them affordable for securing home networks), I will have to discover what their prices are to small companies and individuals (I have applied to evaluate the RSA hardware). Another option is a GPG smart-card, I already have a GPG card and just need to get a reader (this has been on my to-do list for a while). The GPG card has the advantage of being based on free software.

One thing I have believed for some time is that Debian should issue such tokens to all developers, I'm sure that purchasing ~1200 tokens would get a good price for Debian and the security benefits are worth it. The use of such tokens might have prevented the Debian server crack of 2003 or the Debian server crack of 2006. The Free Software Foundation Fellowship of Europe issues GPG cards to it's members, incidentally the FSFE is a worthy organisation that I am considering joining.

6 November 2006

Wouter Verhelst: From 2 to 5

One thing about being an m68k porter is that you get to play with hardware a lot. And I mean a lot. Ska, jazz, newwave, and barok had all died during the last few weeks to months; so I was back to two working m68k machines that I could somewhat work with (quickstep, a 25Mhz 040 that I own, and arrakis, a 50Mhz (or so) 060 owned by Ingo Juergensmann). Which was not enough. To make matters worse, arrakis had actually died last week, but that was fixed quickly enough (thanks, Ingo). Which had left me with non-working jazz, barok, ska, and newwave. It isn't the first time that newwave dies on me, and it isn't the first time that a simple power-on again fixes it, after a few weeks of downtime. I can only conclude that this isn't a box which likes being powered on all the time, and that I'll have to leave it powered off for a few weeks every now and then. That's not a big issue, since the machine isn't very high on RAM anyway, so not very useful (apart from testing EMILE on, and other similar things). Barok had died a few weeks ago with a kernel oops that it couldn't even print out entirely. If that sounds like hardware failure, that's because it is hardware failure. Luckily, it's nothing too bad; removing the expansion cards one by one and replacing them afterwards revealed that it's the cache RAM which is the culprit. That's good news and bad news at the same time; good, because a Macintosh IIci can work without this cache RAM (it was sold without those things after all; the cache expansion was an option); bad, because it already is the slowest machine I have, and losing the cache doesn't make it speed up. But at least that one works again—if any of you have some IIci cache lying around that you don't need anymore, feel free to send it my way. Jazz had only paniced, like it does every time. It's a Quadra 950, and those have never been very well supported by Debian. I just needed to reboot it, which I forgot about every time I got near it. It's working again now, compiling away at the next EMILE version, which will fix a few bugs and should make it into etch. Or, well, at least it would be, if not for the b0rken debian/rules file, which I will now have to fix, I guess. Not that this isn't anything I can't handle. Leaves Ska, which needs a new hard disk. That's not a big problem, I just need to get around to flinching me one out of the old unused RAID array at the office, low-levelling it, and placing it in ska. Which I have been planning to do for only, eh, three months or so. Whoops.

Biella Coleman: I would rather be a member of the other AAA

I just got back from 4S, which happens to be one of my favorite of the large professional association conferences. Ok, 15 minutes to deliver talk is the equivalent of being treated as canned sardines, and thus totally unpleasant, but I feel like I can go to most any talk and find it relevant or interesting to my own work. I t is certainly more manageable too in terms of size than something like the AAAs which also gives you a paltry 15 minutes to present and worse, the association has been treading in some ethically problematic territory lately, so much so, I would rather throw my money to the other AAA. While in Vancover, my Internet access was near to nothing (I was staying with a friend who I have not seen since the summer of 2002, but alas, thanks to chatting we have been in pretty consistent contact). When I came back I came across some discouraging but not so surprising new news on the AAA and their cowardly decision to fight the FRPAA that would mandate open access for articles derived from federally funded research… The cherry on top of the cake was they dissolved the AnthrSource Steering Committee formed precisely to figure out how to open up access, no less! Alex Golub, a Savage Minds blogger, and a now ex-member of AnthroSource committee has written an excellent roundup of the story (link above) and Peter Suber, also has two very nice summaries, including links to the appropriate documentation. This year since I am curtailing my time on the conference circuit, I decided not to go to the AAA conference because frankly I am totally annoyed with the professional organization. I am usually quite proud to be or at least amused after I tell folks that I am am anthropologists (most react as if I had decided to embark on some real courageous path) but I am quite embarrassed about the association that is supposed to represent my interests and the profession at large. The links on SM point to and flesh out the problems with AAA’s refusal to jump on an exciting opportunity to free up some knowledge but I want to just emphasize three of the most problematic parts of their decision: 1.The most offensive part is that in reality the proposed bill is quite conservative in so far as it only asks for what should already be (a) given. That is, if the government is using tax dollars to fund research, it has every right to demand the fruits of such scholarship is made available to tax payers. Right? Given the neoliberal moment we are in, in which the government is retrehcnhing on all sorts of supports, this bill is admirable and I am afraid that if it does not pass it can be easily used by conservatives to justify future cuts of such funds. And given the very uncontroversial nature of the bill, it is not surprising that so many of the social science and humanities associations did not protest the bill… Anthropology sticks out as a sore sore thumb in fact. 2. The AAAs deployed FUD tactics to justify their position saying that open access would jeopardize peer review… Sigh. That is just so off the mark and the AnthroSource steering committee letter addressed this point well. 3. Many anthropologist know first-hand how appalling access outside of Europe, US, Australia, Japan etc, can be, even for academics and thus, AAA’s lack of support for this is also implicitly sanctions the North South Division that have plagued the field and all of academia so long. And for a field that has often been very thoughtful about these power/knowledge dynamics, it is doubly even more stinging… Is there really such a strong disconnect between the association and discplinary ethical currents?

3 November 2006

Michael Janssen: The waiting is the hardest part

Exercise is hard work. It is hard to keep going to the exercise room every day, and getting on that machine and doing the exercise. It is only loosely assuaded by the fact that I can listen to music or read a magazine while I am doing it. The saddle on the stationary bike is uncomfortable, and the treadmill is annoying when it asks for my heartrate. Don't get me wrong, I am comitted to my exercise regimen and will be keeping it up for the forseeable future. I really do believe that I am improving my overall health and wellbeing doing it. Walking down the hall back to the apartment is a good feeling, and it's strangely satisfying to be all sweaty and gross. This week was fairly erratic with respect to exercise. I ended up taking saturday off mostly by accident, completely filling up my schedule with other things. Other days I would start early -- around 7pm instead of my normal 10pm, or would start an hour late. Tuesday was a particularly crappy day as half of the exercise room was tripped on the breaker and I had to resort to the horrible stepping machine and some weightlifting to get my 30 minutes in. Hopefully this week I will be able to get a better schedule going.

I am frustrated. Two weeks of dieting and exercise, and I don't seem to be losing weight. This bothers me because in the past I would have received at least a little bonus on the scale just for dieting, and I don't seem to be getting that this time. I tend to weigh myself after my workout, because there is a fairly nice physician's scale which I can use to weigh myself, and doing after every exercise is a good way to remember. This causes a problem however because I usually exercise at the end of the day. One day I may eat more and then weigh more, and another day I may eat less (or ahem, output more) and weigh less that night. It doesn't deal a good hand to my psyche to sometimes weigh more than I did the day before. I do seem to be getting a hang of guessing when I will weigh more though. I am thinking of switching to weighing only once a week, but I am afraid that I will forget, and the hacker in me wants as much data as possible on this.

This week (Oct 27 - Nov 2):
Minimum: 338.5 (Oct 31)
Maximum: 341.0 (Nov 2)
Average: 339.8 (139.8 to goal)
Total Exercise Calories: 2562
Average Exercise Calories: 427

2 November 2006

Gunnar Wolf: Oaxaca on fire

Before anything else: Please excuse some grammatical mistakes I've made in this post. You should understand the topic is really upsetting, and typing while searching for links, listening to news, and gathering the basic information for a five month old conflict is not exactly compatible with me spewing out proper English ;-)
Just to re-state the obvious: Mexico is, once again, on fire. This posting is mainly written with the Debian people in mind - An important number of them, after Debconf 6, went to visit Oaxaca - In late May, during the first weeks of this incredible, stupid and scary conflict we are now facing.
I've written in my blog every now and then about our political situation. Many of us had high hopes on our current government. We thought that the authoritarian regimes were a thing of the past, we hoped for real democracy, we hoped for a government that would honor human rights and solve long-standing topics for our society - Yes, we all knew president Fox came from a right-wing party, and didn't expect much advance in the social agenda -which many of us perceive as the real problem in Mexico- but still, hoped for openness and reconciliation with the past.
I won't repeat what I've extensively said over and over - The thing is, Fox's government continues to amaze us with its stupidity, with its near-sightedness, with its hypocresy. Fox's term is really close to an end - In one more month, the govt. will change hands to the first de-facto president since Carlos Salinas (going over another story we hoped to forget).
As some of you wittnessed, there was a popular protest taking place mainly in Oaxaca - Basically, the State's public elementary school teachers demanding better payment for their work. Such a protest is already a common occurrence in Mexico, as public school teachers are among the worstly paid workers (no wonder, then, our country is still undeveloped - Make public education worse, and you have the warranty of an unprepared, ignorant population). The teachers went on strike in early May, briefly returned to classes on late June to properly close the 2005-2006 lective year, but went back on strike afterwards.
Of course, the local government (Mexico is a federative republic, each state is autonomous and makes decisions independently) took a very long time to act - and acted the worst way possible: By sending policemen to forcefully throw the teachers from their camps in the downtown streets, with no negotiation, no answer, not a drop of common sense.
That led to the formation of the (pleonasmicaly named) APPO: Popular Assembly of Oaxaca's People - A group of people, partly formed by the unhappy teachers, mainly demanding the Oaxaca state governor to step down, after he proved he is inept for his office. And yes, I'm oversimplifying here, but I don't want to dig too much - There is fortunately plenty of available information in this regard.
That happened over four months ago. APPO kept control of the city. Nobody denies that this has caused Oaxaca, a city that attracts national and international tourism like few others in the country, a great deal of economic damage - Oaxacan people are, however, still sympathetic to APPO's demands. Governor Ulises Ruiz (from PRI, the party that ruled the country for over 70 years) has not been able to be seen in public in his state for some months already. The legislative power has also been unable to work properly, and the judicial power is half-dead, doing only its most basic tasks. Renowned jurists, such as Miguel ngel Granados Chapa, have repeatedly stated that this is enough for the Federal Senate to declare the governing powers in Oaxaca have disappeared - This would put an end to the conflict, leading to immediate elections, but the Senate has denied taking this course of action. Not only that, but the Federal government took the command of the local security forces, tacitly recognizing the local government is unable to coherently excersise their authority. After almost five months, last week they issued an unanymous -but mild- exhort, asking Ulises Ruiz to consider stepping down.
So far, 15 people have been killed in the different represive actions taken, first by the local police under local command, later by the local police under federal command, and starting last week, by the federal police. Today, it seems the army is getting in the conflict as well, despite promises of not doing so by the federal authorities - Of course, they have become masters in the art of breaking promises.
Why is the federal government upholding Ulises Ruiz? Simple: After the undeniable electoral fraud we had some months ago, there are too many indicatives pointing out that our (supposedly) elected president Felipe Calder n (FeCal, as he is better known as) will have a hard time becoming the president, and many people doubt he will be able to hold the authority for the six years. So far, he has shown no better aptitude as a statesman than Vicente Fox: Instead of boldly facing the claims of fraud, he just chickened out and has spent many months hiding from the public, appearing only for selected, friendly audiences. For many months already we have heard "Ulises ya cay , le sigue Calder n" (Ulises has fallen, Calder n is next). This country has not been so badly shaken in decades - Of course, Great Statesman Vicente Fox insists the country is in peace and there are no red spots. Fox even was stupid/blind enough to state that the problems in Oaxaca would be dealt with easily and successfully, just as the problems in Chiapas and Atenco were doing his term. During Fox's campaign, he promised to solve the centuries-old Chiapas problem (that resulted in the EZLN uprising in 1994) in just 15 minutes - He just has not had time to do so. Atenco? Yes, in 2002 an angry people made him step back from the most important project of his term (a new airport for Mexico City). In May 2006, Atenco sprang again to the news because of a massive repression - I'm not going into details on Atenco right now, as it would be off-topic, but you can look at my article in FeCal.org.mx or watch a very strong video by Canal Seis de Julio (both in Spanish only) for further details.
Last Friday, however, something was different. In a repressive action, a USA citizen, the Indymedia reporter and cameraman Brad Will was killed by a paramilitary group. Even more, he was killed while doing his work, and we can clearly see this evidence on his last tape. Of course, the US ambassador issued a warning, asking the US citizens not to go to Oaxaca. And, as Lorenzo Mayer says, hay de muertos and muertos - There are different categories of dead people. A highly visible US citizen is more important than the other 14 dead Mexicans, and now the Federal Preventive Police is clashing in Oaxaca.
What should be shocking, but is not so much to those of us who know this beaten country, is the attitude of the authority when taking the city. After five months of occupation, the Oaxacan people have got used to living with APPO - be it for good or for bad. Tourism has diminished, but the people's living sources have not been attacked. Of course, as soon as the Federal Police took the downtown areas, all sorts of reports of looting have been reported. The policemen are robbing even sodas and chips, and up to TVs and microwaves. As many people state, this is a very Kafkian country.
Of course, we don't know what will come next. Most of the city has been "freed", and the APPO is holding at the University. The University is autonomous, and the PFP commands have promised not to break its autonomy - but we don't believe that. There are fights very close to the University. The Rector himself spoke a couple of hours ago at Radio Universidad, the main broadcasting point for real news on this subject (I am following on the news thanks to KeHuelga, 102.9MHz FM in Southern Mexico City, or at their webpage, from where they link to many other underground or Internet radio stations joining in the broadcast), and the reports are dramatic. Dramatic, as well, is the way all of the commercial news sources are ignoring the facts.
I want to keep you updated, as one of the very few reasons things are not worse is the public opinion and, even more, the international pressure. I'm sorry I'm not giving more links right now, but I will soon. I don't want, of course, to flood people that read my blog through the different syndications with a technical profile, so updates via my blog will be quite sparse. If you can read Spanish, we have posted many articles at FeCal, and many other individual sites are also joining in. A couple of links, and I'm off for now.

Daniel Stone: automake beautification

(Please note, I didn't write this: I just fixed a couple of bugs and put it in a patch. All credit to the original author, Tommie Gannert.)

Tired of the sucktitude of automake command lines? Find it incredible that people could seriously claim to prefer command output so verbose that you actually miss all the warnings?

if /bin/bash ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../../GL/mesa/swrast -I../../../include -I../../../include -I../../../include -I../../../include -I../../../include -I../../../include -I../../../include -I../../../include -I../../../include -I/home/daniels/x/mesa/Mesa/include -I../X -I../array_cache -I../glapi -I../main -I../math -I../shader -I../shader/slang -I../shader/slang -I../swrast -I../swrast_setup -I../tnl -I.. -I../../../../hw/xfree86/os-support -DHAVE_DIX_CONFIG_H -DXFree86Server -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I../../../../include -I../../../include -I../../../../Xext -I../../../../composite -I../../../../damageext -I../../../../xfixes -I../../../../Xi -I../../../../mi -I../../../../miext/shadow -I../../../../miext/damage -I../../../../render -I../../../../randr -I../../../../fb -g -O2 -MT s_masking.lo -MD -MP -MF ".deps/s_masking.Tpo" -c -o s_masking.lo s_masking.c; \
then mv -f ".deps/s_masking.Tpo" ".deps/s_masking.Plo"; else rm -f ".deps/s_masking.Tpo"; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I../../../../GL/mesa/swrast -I../../../include -I../../../include -I../../../include -I../../../include -I../../../include -I../../../include -I../../../include -I../../../include -I../../../include -I/home/daniels/x/mesa/Mesa/include -I../X -I../array_cache -I../glapi -I../main -I../math -I../shader -I../shader/slang -I../shader/slang -I../swrast -I../swrast_setup -I../tnl -I.. -I../../../../hw/xfree86/os-support -DHAVE_DIX_CONFIG_H -DXFree86Server -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I../../../../include -I../../../include -I../../../../Xext -I../../../../composite -I../../../../damageext -I../../../../xfixes -I../../../../Xi -I../../../../mi -I../../../../miext/shadow -I../../../../miext/damage -I../../../../render -I../../../../randr -I../../../../fb -g -O2 -MT s_masking.lo -MD -MP -MF .deps/s_masking.Tpo -c s_masking.c -fPIC -DPIC -o .libs/s_masking.o


Prettify Automake finally fixes this. I've put up a deb that at least works on Edgy (but has some pretty shady changes; getting it to build was, um, interesting) here; re-autoreconf with that, then run configure with --enable-pretty-cmds to get much more sensible output:

  [C ] fbbits.c
  [C ] fbblt.c
  [C ] fbbltone.c
../../fb/fbbltone.c: In function "fbBltOne":
../../fb/fbbltone.c:354: warning: left-hand operand of comma expression has no effect
  [C ] fbbstore.c


Warnings! Visible! Amazing!

28 October 2006

Daniel Burrows: Things that Don't Suck and Things that Do

Since I sometimes worry that my blog is turning into a gripelog, I'd like to highlight a very positive experience I recently had with a company. I wanted to buy some decent desk chairs for my apartment, and due to getting a higher-than-average computer desk, I needed chairs that were fairly tall (seats around 30" from the floor).

I finally converged on a lab-stool that I found at office-chairs-discount.com and placed an order for two instances of it. They arrived a few weeks later in boxes with fairly simple assembly instructions. Unfortunately, and here's where it gets interesting, one of the chairs was broken -- the ring of plastic that was supposed to secure the foot-rest to the chair's main support was broken. After I sent an email describing the problem to their support address, they said that all I needed to do was take a picture of the broken part and they'd mail out a replacement. A few weeks later, the replacement arrived and I was able to assemble the second chair. They even were very polite when I bugged them about why the part hadn't arrived when it already had (UPS apparently didn't leave a notice for me). All in all, I was quite impressed with this company and I'd definitely buy from them again if I needed more chairs.


So, now on to less happy things. People with a mathematical background are familiar with the principle of transitivity; basically, this says that if A is less than B and B is less than C, then A is less than C. This isn't just an arcane mathematical property, though; it has important practical consequences. For instance, if you want to quickly find a word in a list of words, having the words in sorted order is a huge benefit. You can do this because, among other things, the "less-than" relationship between words is transitive (without transitivity, even the idea of a "sorted order" is somewhat peculiar).

Why do I mention this? Well, because in C#, the following inequality holds:

"Y-" < "Y'" < "-Y-" < "Y-"

That's right: by default, Microsoft's C# implementation compares strings in a non-transitive manner, contrary to all expectations that any sane programmer would have. This bit me yesterday, when I was trying to sort a rather large array of strings and then perform searches in the array. Words that I knew perfectly well were in the array (I could even see them in the debugger!) weren't being found by the search. Why? Because the list wasn't in sorted order, even after calling Array.Sort() on it. Why? Because (see above) there is no such thing as a sorted order using the default C# comparator!

At first, I hoped this might just be a bug. But in the manual, I found a nice little explanation that the default sort doesn't perform a standard lexicographic comparison, in an attempt to provide a more "human-friendly" sorting. (they give the example of sorting "coop" next to "co-op", which confuses me since those two sort next to each other in any even. But whatever.) Instead, you have to use a method which is confusingly called "CompareOrdinal" instead of "DontSuckCompare".

Of course, after reading this, I guess nothing Microsoft does can really surprise me any more. Interestingly, Mono doesn't seem to have copied this particular "bug" (although I only tested one case with it). I don't know if this is good or bad: after all, it's probably only a matter of time before a piece of software that unintentionally depends on .NET's weird string comparisons comes into being.

27 October 2006

Scott James Remnant: Upstart can now replace sysvinit

Today I reached another milestone in the development of upstart, the packages in universe can now replace the existing sysvinit package. Before trying this, make sure your installation is up to date as we’ve had to split out some parts of sysvinit into a new sysvutils package. If you’re up to date, and want to try it out, install the upstart and upstart-compat-sysv packages from universe. Note that the first reboot after you’ve installed the packages (from sysvinit to upstart) will be a little tricky … use reboot -f. If your system boots and shuts down normally, everything’s working just fine. Note that both will be somewhat more quiet than you’re used to, unless you have usplash running. Throughout the rest of this entry, I’ll try to answer some of the questions and comments that I’ve received since the last post. Events As I talked about previously, upstart is an event-based init daemon. Events are the primary force for having your services and tasks started and stopped at the appropriate time and in the appropriate order. So what are events and where do they come from? (Note that this part is under development, so may change in later releases). Events are just simple strings that may be sent by any process when something it is tracking the state of changes. They have no state or longevity, and if, when queued, they do not cause any job state changes, then they have no effect unless they are sent again. Jobs can list which events cause them to be started if they are not already running and which events cause them to be stopped if they are running. Multiple start and stop events may be listed, in which case the first to occur changes the job until the next one occurs. upstart itself generates the following system events: The shutdown tool included in the package also causes one of the following events to be sent once the “shutdown” event has been handled: Jobs also generate events whenever they change state, this is the primary source of events for ordering: And as mentioned, any other process on the system may send events through the control socket or just by using initctl trigger EVENT. For now this is just the event string, however it’s intended that the event may include other details including environment variables and even file descriptors. Typical example To clarify how it all hangs together, here’s an example (using fictional names) of how the tasks and events can be arranged to provide race-free mounting of filesystems. By breaking this job into these small tasks, we can see how the pieces fit together. Because everything is now done on events, there are no race conditions; we know that any filesystem listed in /etc/fstab will be checked and mounted. The only reason they wouldn’t be is if there’s an error of some kind, and that means you have larger problems anyway and the system administrator would have a shell to fix it. Of course, the moment they finish checking the filesystem and mount it, the boot process would carry on. There’s no reason that any of these events need to be generated by the upstart daemon itself, it can receive them from any other daemon on the system such as udev, acpid, etc. This keeps the focus of the init daemon narrow. A large part of the future development will be working out exactly what kinds of events we want init itself to generate, what kinds we want to come from elsewhere, and what the contents of an event can be. Getting Involved If you want to get involved with trying to nudge the direction of upstart development, you can join the upstart-devel mailing list at http://lists.netsplit.com/ Or if you just want to grab the source code, tarballs are published at http://people.ubuntu.com/\scott/software/upstart/ and the bzr archive is at http://bazaar.launchpad.net/\keybuk/upstart/main

Scott James Remnant: Upstart in Universe

upstart is a replacement for the init daemon, the process spawned by the kernel that is responsible for starting, supervising and stopping all other processes on the system. The existing daemon is based on the one found in UNIX System V, and is thus known as sysvinit. It separates jobs into different “run levels” and can either run a job when particular run levels are entered (e.g. /etc/init.d/rc 2) or continually during a particular run level (e.g. /sbin/getty). The /etc/init.d/rc script is also based on the System V one (and is in the sysv-rc package), it simply executes the stop then start scripts found in /etc/rcN.d (where N is the run level) in numerical order. Why change it? Running a fixed set of scripts, one after the other, in a particular order has served us reasonably well until now. However as Linux has got better and better at dealing with modern computing (arguably Linux’s removable device support is better than Windows’ now) this approach has begun to have problems. The old approach works as long as you can guarantee when in the boot sequence things are available, so you can place your init script after that point and know that it will work. Typical ordering requirements are: This worked ten years ago, why doesn’t it work now? The simple answer is that our computer has become far more flexible: We’ve been able to hack the existing system to make much of this possible, however the result is chock-full of race conditions and bugs. It was time to design a new system that can cope with all of these things without any problems. What we needed was an init system that could dynamically order the start up sequence based on the configuration and hardware found as it went along. Design of upstart upstart is an event-based init daemon; events generated by the system cause jobs to be started and running jobs to be stopped. Events can include things such as: In fact, any process on the system may send events to the init daemon over its control socket (subject to security restrictions, of course) so there is no limit. Each job has a life-cycle which is shown in the graph below: The two states shown in red (“waiting” and “running”) are rest states, normally we expect the job to remain in these states until an event comes in, at which point we need to take actual to get the job into the next state. The other states are temporary states; these allow a job to run shell script to prepare for the job itself to be run (“starting”) and clean up afterwards (“stopping”). For services that should be respawned if they terminate before an event that stops them is received, they may run shell script before the process is started again (“respawning”). Jobs leave a state because the process associated with them terminates (or gets killed) and move to the next appropriate state, following the green arrow if the job is to be started or the red arrow if it is to be stopped. When a script returns a non-zero exit status, or is killed, the job will always be stoped. When the main process terminates and the job should not be respawned, the job will also always be stopped. As already covered, events generated by the init daemon or received from other processes cause jobs to be started or stopped; also manual requests to start or stop a job may be received. The communication between the init daemon and other processes is bi-directional, so the status of jobs may be queries and even changes of state to all jobs be received. How does it differ from launchd? launchd is the replacement init system used in MacOS X developed as an “Open Source” project by Apple. For much of its life so far, the licence has actually been entirely non-free and thus it has only become recently interesting with the licence change. Much of the goal of both systems appears initially to be the same; they both start jobs based on system events, however the launchd system severly limits the events to only the following: Therefore it does not actually allow us to directly solve the problems we currently have; we couldn’t mount filesystems once the “filesystem checked” event has been recived, we couldn’t check filesystems when the block device is added and we certainly couldn’t start daemons once the complete filesystem (as described by /etc/fstab) is available and writable. The launchd model expects the job to “sit and wait” if it is unable to start, rather than provide a mechanism for the job to only be started when it doesn’t need to wait. Jobs that need /usr to be mounted would need to spin in a loop waiting for /usr to be available before continuing (or use a file in a tmpfs to indicate it’s available, and use that modification as the event). This is not especially surprising given that Apple have a high degree of control over both their hardware and the actual underlying operating system; they don’t need to deal with the wide array of different configurations that we have in the Linux world. Had the licence been sufficiently free at the point we began development of our own system, we would probably have extended launchd rather than implement our own. At the point Apple changed the licence, our own system was already more suitable for our purposes. How does it differ from initng? Initng by Jimmy Wennlund is another replacement init daemon intended to replace the sysvinit system used by Linux. It is a dependency-based system, where upstart is an event-based system. The notion of a dependency-based system is interesting to talk about at this point. Jobs declare dependencies on other jobs that need to happen before the job itself can be started. Starting the job causes its dependencies to be started first, and their dependencies, and so on. When jobs are stopped, if running jobs have no dependencies, they themselves can be stopped. It’s a neat solution to the problem of ordering a fixed boot sequence and the problem of keeping the number of running processes to a minimum needed. However this means that you need to have goals in mind when you boot the system, you need to have decided that you want gdm to be started in order for it, and its dependencies, to be started. Initng uses run levels to ensure this happens, where a run level is a list of goal jobs that should be running in that run level. It’s also not clear how the dependencies interact with the different types of job, a dependency on Apache would need the daemon to be running where a dependency on “checkroot” would need the script to have finished running. Upstart handles this by using different events (“apache running” vs. “checkroot stopping”). Again while interesting, Initng does not solve the problems that we wanted to solve. It can reorder a fixed set of jobs, but cannot dynamically determine the set of jobs needed for that particular boot. A typical example would be that if the only dependency on the job that configures networking is the mount network filesystems job, then should that job fail or notbe a goal (e.g. because there are no network filesystems to be mounted) the result is that network devices themselves will not be configured. You could make everything a goal, and just use the dependencies to determine the order, however this is less efficient than just ordering the existing sysv-rc scripts (which can be done at install time). Another example is that often you simply don’t know whether something is a dependency or not without reading other configuration, for example the mount network filesystems may be a dependency of everything under /usr or may just be a dependency of anything allowing the user to login if it just mounts /home. The difference in model can be summed up as “initng starts with a list of goals and works out how to get there, upstart starts with nothing and finds out where it gets to.” How does it differ from Solaris SMF? SMF is another approach to replacing init developed by Sun for the Solaris operating system. Like initng it’s a dependency-based system, so see above for the differences between those systems and upstart. SMF’s main focus is serive management; making sure that once services are running, they stay running, and allowing the system administrator to query and modify the states of jobs on the system. Upstart provides the same set of functionality in this regard, services are respawned when they fail and system administrators can at any time query the state of running services and adjust the state to their liking. Will it replace cron, inetd, etc? The goal of upstart is to replace those daemons, so that there is only one place (/etc/event.d) where system administrators need to configure when and how jobs should be run. In fact, the goal is that upstart should also replace the “run event scripts” functionality of any daemon on the system. Daemons such as acpid, apmd and Network Manager would send events to init instead of running scripts themselves with their own perculiar configuration and semantics. A system administrator who only wanted a particular daemon to be run while the computer was on AC power would simply need to edit /etc/event.d/daemon and change “on startup” to “on ac power”. What about compatibility? There’s a lot of systems administrators out there who have learned how Linux works already and will not want to learn again immediately, there’s also a large number of books that cover the existing software and won’t cover upstart for at least a couple of years. For this reason, compatibility is very important. upstart will continue to run the existing scripts for the forseeable future so that packages will not need to be updated until the author wants. Compatibility command-line tools that behave like their existing equivalents will also be implemented, a system administrator would never need to know that crontab -e is actually changing upstart jobs. Does it use D-BUS?
“To D-BUS people, every problem seems like a D-BUS problem.” —Erik Troan
The UNIX philosophy is that something should do just one job, and do it very well. upstart’s one job is starting, supervising and stopping other jobs; D-BUS’s one job is passing messages between other jobs. D-BUS does provide a mechanism for services to be activated when the first message is sent to them, thereby starting other jobs. Some people have taken this idea and extended it to suggest that all a replacement init system need do is register jobs with D-BUS and turn booting into a simple matter of message parsing. This seems wrong to me, D-BUS would need to be extended to supervise these services, provide means for them to be restarted and stopped; as well as deal with being process #1 which means cleaning up after children whose parent’s have died, etc. It seems far simpler to arrange for D-BUS to send an event to init when it needs a service to be started, and focus on being a very good message passing system. The IPC mechanism used by upstart is not currently D-BUS because of various problems, however it’s always been expected that even if init itself doesn’t communicate with D-BUS directly, there would be a D-BUS proxy that would ensure messages about all init jobs and events would be given to D-BUS and D-BUS clients could send messages to init to query and change the state of jobs. What is the implementation plan? Because this is process #1 we are changing, we want to make sure that we get it right. Therefore instead of releasing a fully-featured daemon and configuration to the world, we’re developing it in the following stages:
  1. Principal development; at the end of this stage the daemon has been implemented and can manage jobs as described.
  2. Replacement of /sbin/init while running the existing sysv-rc scripts. This is the shake-down test of the daemon, can it perform the same job as the existing sysvinit daemon without any regressions?
  3. /etc/rcS.d scripts replaced by upstart jobs. These consitute the majority of tasks for booting the system into at least single-user mode, and contain many of the current ordering problems and race conditions. If the daemon solves the problems here, it will be a success.
  4. Other daemon’s scripts replaced by upstart jobs on a package-by-package basis; this will be an ongoing effort during which upstart will continue running the existing sysv-rc scripts as well as its own jobs. During this time the event system may be tweaked to ensure it truly solves the problems we need.
  5. Replcement of cron, atd, anacron and inetd. This will happen alongside the above and result in a single place to configure system jobs.
  6. Modification of other daemons and processes to send events to init instead of trying to run things themselves.
The current plan is that we will be at least part of the way into stage #3 by the time edgy is released, with that release shipping with upstart as the init daemon and the most critical rcS scripts being run by it to correct the major problems For edgy+1 we hope to have completed stage #5 and be at least part of the way into the implementation of stage #6. From the start of development of edgy+2, no new packages will be accepted unless they provide upstart jobs instead of init scripts and init scripts will be considered deprecated. What state is it in now? The init daemon has been written and is able to manage jobs as described above, receiving events on the control socket to start and stop them. This has now been uploaded to the Ubuntu universe component in the upstart package for testing before it becomes the init daemon. We welcome any experienced users who want to help test this; install the package and follow the instructions in /usr/share/doc/upstart/README.Debian to add a boot option that will use upstart instead of init. If your system boots and shut downs normally (other than a slightly more verbose boot without usplash running) then it is working correctly. Other types of events will be added as required during development and testing. Currently only a basic client tool (initctl) has been written, compatibility tools such as shutdown will be written over the next week or two before it replaces our sysvinit package.

25 October 2006

Evan Prodromou: 3 Brumaire CCXV

I&aposve been dawdling and delaying writing about our trip to wt:Halifax (Nova Scotia) two weeks ago for some reason, but I&aposm bound and determined to get some info down on, uh, electrons about it right now.

Hella facts about Halifax We flew out of Trudeau airport eeeeearly on a Friday morning; I&aposd shopped a bit on the Air Canada site and got $99 each-way tickets from Montreal on their wp:Air Canada Tango program, but they required that we be on the 7:50AM flight. Air Canada used to be one of my favorite airlines, but they have been getting continuously disproportionately high prices and conversely worse amenities (pillows and blankets now cost extra, thank you very much). Discount flights in Canada are pretty sparse these days, with the collapse of Jetsgo in 2005 and the recent repositioning of CanJet for charters only. So, you just have to take what you can get. The flight to Halifax was quick and painless; Amita June slept most of the way there. The airport there is pretty small (yay small airports), so we buzzed through baggage claim. Cabs into town were a pricey flat-fee of $52, which got our hackles up, so instead we waited half an hour and took the Airporter shuttle ($16/person) into Halifax proper. We got to see a lot of the Nova Scotia countryside from the shuttle -- lots of leaves turning and conifer forests. We had reservations at the pretty and historic Lord Nelson Hotel, well away from the waterfront, but still in the downtown area, near Dalhousie University. The Lord Nelson is in the "Splurge" section of Halifax hotels on Wikitravel, but since this trip was for my birthday and our 2nd wedding anniversary I thought it&aposd be nice to stay there for one of the 4 nights we were in town. But when I called to make a reservation, I was able to get a very competitive rate, mostly due to a healthy 40% CAA discount, and I booked us for all 4 nights. I&aposd asked for early check-in, but our room wasn&apost ready at noon, so we tried the Lord Nelson Pub for lunch and a beer. The food was tasty and the atmosphere was, uh, pubby. We pawed through the stack of tourist-info documentation that we&aposd picked up at the info desk at the airport, then went up to our big and well-lit room for a mid-afternoon nap. Yes, all three of us. When we woke up, Maj and Amita June went for a walk across the street to the pretty wp:Halifax Public Gardens. It&aposs a very nice Victorian-era public park with disturbingly large geese roaming about. When they got back, the three of us headed down to the waterfront for an early dinner. Halifax&aposs streets are very steep -- they virtually plummet into the water. But we walked straight down to Water Street then meandered along looking at the sights. Our intention was to eat at the Privateer&aposs Warehouse, a building with a bar and two restaurants stacked on top of each other. It&aposs part of the Historic Properties on Upper Water Street, a collection of restored buildings with shopping and food. But the Warehouse turned out to be too rambunctious for us on a Friday night, so we instead went around the corner to Salty&aposs for a slightly more sedate meal on the water. We had good food; Maj had some very nice crab cakes and I took on a large seafood salad. Amita June chomped on really tasty fish and chips. The walk back up the hill was a bit tough, so we stopped in the Rogue&aposs Roost brewpub on the way home for a little strengthener. Unfortunately, as it was after 8:30PM, the baby wasn&apost allowed into the pub. So, we had to leave her tied to a parking meter while we had a... just kidding. We retired to bed after a long day, all three. tags:

California Dreamin&apos All the leaves are brown, red, orange, chartreuse and saffron here in Montreal, yet we&aposre off to wt:San Francisco tomorrow morning (early) to visit friends and family. I love going to see my parents and brothers and sister-in-law and nieces, but I also like going back to see the wt:Bay Area (California). It hasn&apost always been like this. It used to be that when I went back, it felt like I&aposd never left, and that the life that we&aposve made here in Quebec was just a story I told myself. San Francisco seemed real; Montreal seemed distant. San Francisco was where I was supposed to be; Montreal was where I stubbornly and irrationally insisted on staying. (The fact that I stayed in a room in my parents&apos house didn&apost help with the stepping-backwards feeling.) But it&aposs been a few years, and Maj and I have been married here, had a baby, and made a business for ourselves. Even though we don&apost own a house (yet), we&aposre putting down roots. Now when I return to California, it feels like a visit -- like traveling to just another destination. And you know what? California is a fabulous place to visit. Northern California even more so. San Francisco is a spectacular place on the edge of the ocean with music, art, redwood trees, organic food, and a sense of humor about itself that no other town quite has. It will be good to get back to SF for a while. It will be nice to take the baby around to see people and things that she hasn&apost ever seen before. We&aposll be in wt:Palo Alto to stay with my folks, visit my brothers in wt:San Francisco, up to wt:Petaluma and wt:Oakland to visit friends, and maybe even down to wt:Big Sur for a campout next weekend. I&aposve got the Web 2.0 Conference that I&aposm covering for LinuxWorld. And I&aposm sure there&aposll be more in there; we need ot dip the baby&aposs toes in the Pacific sometime soon. tags:

Alexis Sukrieh: WTF The Webapps Task Force strikes back!

We created the “Debian Webapps” alioth project a couple of months ago in order to write a Webapps Policy. Today, that team takes more responsability: it now maintains a couple of packages like, for instance, bugzilla which I find complex, rich and volatile enough to warrant a collaborative maintenance (long life to Subversion). TinyMCE - which can dynamically transform any textarea element into a rich-text area - will also be maintained by the team and is currently in the NEW queue (uploaded this morning).

Next.

Previous.