Search Results: "rul"

3 October 2007

Michal Čihař: Reinstalling notebook

Man never realizes how much customised distribution he has until he has to reinstall it. Last week hard disk in my notebook died, so I had to reinstall system and reconfigure everything. I fortunately have backups of almost everything (at least I didn't notice that anything would be missing), but I anyway spend two evenings in installing, configuring and restoring from backups and I'm still not done with it, but the system is at least usable for normal work. However there are also some positive things on this: I get more space and faster disk. I finally set up encrypted file system on my notebook. I dropped several old crap that lived (or better was buried) somewhere in my system and which I already forgot why it was there. And I also got rid of very bad partitioning scheme, which was there from times I used together Debian and Windows and wanted to have another partition to test SUSE installation while I worked there. Now there is only Debian to rule them all ;-).

2 October 2007

Chris Lamb: Renaming a Mailman list

This evening I renamed a number of UWCS’s mailing lists for a few reasons, mostly due to the annoying ambiguity of the old names. Mailman doesn’t make this particularly easy - this how you can do it under Etch;
  1. First, define variables to avoid stupid mistakes:
    $ OLD=old-list-name
    $ NEW=new-list-name
    $ set -u
  2. Next, take down Mailman and do a quick sanity check. The MTA should queue any incoming mails when qrunner stops responding.
    $ sudo /etc/init.d/mailman
    $ sudo sh -c "[[ -a /var/lib/mailman/archives/private/$ NEW  ]] && echo '*** That mailing list name already exists. *** '"
  3. Now move the list data and regenerate the archives for that list:
    $ sudo mv /var/lib/mailman/lists/$ OLD  /var/lib/mailman/lists/$ NEW 
    $ sudo mv /var/lib/mailman/archives/private/$ OLD  /var/lib/mailman/archives/private/$ NEW 
    $ sudo mv /var/lib/mailman/archives/private/$ OLD .mbox /var/lib/mailman/archives/private/$ NEW .mbox
    $ sudo mv /var/lib/mailman/archives/private/$ NEW .mbox/$ OLD .mbox /var/lib/mailman/archives/private/$ NEW .mbox/$ NEW .mbox
    $ sudo /var/lib/mailman/bin/arch $ NEW 
  4. You should probably provide legacy aliases:
    $ cp /etc/aliases  mktemp aliases-backup.XXXX 
    $ printf "\n# '$ OLD ' -> '$ NEW ' mailing list rename \n"   sudo tee --append /etc/aliases
    $ echo "$ OLD : $ NEW "   sudo tee --append /etc/aliases
    $ for SUFFIX in admin bounces confirm join leave owner request subscribe unsubscribe; do echo "$ OLD -$ SUFFIX : $ NEW -$ SUFFIX "   sudo tee --append /etc/aliases; done
  5. Now go to the administrator interface and change:
    • General / real_name: NEW
    • General / subject_prefix: “[NEW] ” (or similar)
    • Privacy / Recipient filters / acceptable_aliases: Add OLD
  6. Now, bring everything back online with:
    $ sudo newaliases
    $ sudo /var/lib/mailman/bin/genaliases
    $ sudo /etc/init.d/mailman start
  7. For bonus points, generate yourself Apache redirect for the new name:
    $ echo "RewriteRule ^/([^/]*)/$ OLD ($ (/.*)) /$1/$ NEW $2$3 [R=301,L]"
Ta-da, nice new names. You will need to warn your users as their filtering will have now broken.

29 September 2007

Martin F. Krafft: Uninformed slagger

Scott, I would have expected a little more from you than your previous post on why you chose bazaar! Update: my initial post was offensive towards Scott, so I edited it a little, following a good discussion with Scott via Email. Even though his post didn't make it explicit, his post was meant to be a reaction to someone else praising Git above everything else. Or, in his words:
You're responding with a defence of git because I posted a defence of bzr in response to championing of git.
I decided to leave most of the original post untouched, nevertheless, but please read it in this context. I guess the sensible conclusion is (as always): to each their own. Inline updates are enclosed in [brackets].
Git is less of a version control system than it is a filesystem and a means to communicate among developers, and when used in that sense, it's extremely powerful and intuitive to use. And it is also a version control system, like Bazaar. It's blazing speed isn't the only killer feature. By no means, however, is it "heavily optimised for the 'I only apply patches' development model, at the expense of ordinary development models" [anymore]. It also supports centralised workflows just as well as it supports distributed approaches, and you can switch between them [this is not really true when compared to how Bazaar mimiques CVS/SVN behaviour; Git cannot do that]. Here are the git commands needed to do the same things Scott showed off in your post:
$ cd myproject
$ git init
$ editor .gitignore
$ git add .    # git rm ...
Let's branch before we commit. checkout -b is a shortcut to create a branch (git branch myproject-foo) and immediately switch to it (git checkout myproject-foo):
$ git checkout -b myproject-foo
$ git commit
Git keeps all branches within the same repository and lets you switch between them. Now, that is a killer feature: whether I'm versioning code or stuff like webpages, I often have external pointers to my code. For instance, I may have libfoo as a sibling of foo-ng and the latter refers to libfoo in the Makefile. If I wanted to try a new approach in libfoo, I'd have to change foo-ng's Makefile to point to libfoo-newbranch instead, or juggle directories around. That sucks. With git, I just checkout a different branch in the same space:
$ git checkout master
And even better: if you don't like it, you could just as well copy the repository to create a separate (remote) branch from which you can later pull or cherry-pick changes to the main branch:
$ git remote add foo ../myproject-foo
$ git fetch foo
$ git merge foo/master
Now back to your steps, and I'll stick to the git way of branching. Note how git does not differentiate between pulling and merging in the sense that you do. If there are no local modifications, git just fast-forwards the branch with the commits on the master:
$ git merge myproject-foo
Even better, say you don't want the last two commits:
$ git merge myproject-foo~2
Unless git can fast-forward, it also treats a merge as a single commit and the ancestry information allows you to inspect its component commits just like you would. gitk is another killer feature, which I believe bazaar copied from git, just like the bazaar folks adopted the concept of rebasing, which basically lets you rewrite history quite freely, another killer feature (which can be quite badly abused if you don't know what you're doing). And then there is git bisect and git-svn and git filter-branch and git describe and git stash and gitweb and, and, and So if I compare the git commands I used to the way you used bazaar, I fail to see much of a difference. Do you? It is true that git comes with an astounding number of additional commands, most of which you never have to use, but which are available to the user [but its interface is a huge improvement over GNU arch, nevertheless, and if only because the commands are named more logically and revisions and branches do not have to adhere to one of the strangest syntaxes ever]. I don't deny that their sheer abundance is overwhelming and confusing at first (a general rule for Git for beginners seems to be just to ignore ever command with a hyphen in it). But once you get out of the newbie stage (it took me about two weeks, the duration of Debconf7 to become an acquainted git user; in fact, David Nusinow placed me among the ranks of real git wizards Pierre and Keith before the conference was over) arghs, I hate long remarks in parenthesis; once you leave the newbie stage, you'll appreciate all these commands, which make it really easy to script complex tools with git, making any plugin architecture pretty obsolete. Finally, I found myself trusting git way more than any other version control system I've tried simply because it's so transparent and you are allowed to edit stuff under .git, which is mostly plan text files (and objects, which you [could but] don't have to touch). It's transparent, and it stays true to the Unix way of letting small tools do their jobs instead of the monolithic approach. NP: Enchant: Tug of War Update: Carl Worth has a similar beef with people thinking that Git is too complicated and has ported a chapter from a book on Mercurial to Git to show how that's not the case. It's a good read. Update: Scott replied (quoted with permission), and I include my replies inline:
"I can tell you why you chose bazaar: because you had to, because you are being paid to use it."
Sorry, that just isn't true. I'm paid to lead the Ubuntu Desktop Team; this has nothing to do with version control, except that the various upstreams and packages use different systems.
I am sorry about this accusation. It was low.
You appear to miss my point about Git, or maybe I didn't make it strong enough. It's not that I don't understand it; it's that I had to take time and effort to understand it. And I've noticed that every reply to my post misses out the fact that with Git, you have to take action to ensure your changes are actually incorporated into the commit; either with git add or commit -a. This exactly the kind of anti-social behaviour that I have issues with.
Well, Git people call this a feature and it is very handy, but I see your point. There is no way to configure git-commit to always include -a, so you'll have to work around it:
git config alias.ci 'commit -a'
This creates git ci to do exactly what you want. You cannot overwrite commit that way though. But it could be trivial to add a configuration option to git-commit, if you think that the way that Git exposes the index is an adoption-stopper:
$ file -L =git-commit
/usr/local/bin/git-commit: POSIX shell script text executable
Your post also introduces yet more over-complication by demonstrating about making a branch (in an empty branch) before you commit.
Your post does the same ("A common operation is realising that the commit you re about to make should really go on a new branch for now"), which is why I did it. You don't have to do that at all.
(Side-bar: bzr's design also permits multiple branches within the same repository.)
So I read the manpage and found bzr init-repository, but no way to add a branch to an existing clone, and also no way to switch between branches within a clone. In your original post, you claimed: " Bazaar s command set works the way you do." Well, the way I work is by "switching" between or "checking out" a new branch in-place, but I could not trivially find the command to do this. This is probably because I have not invested enough time into understanding Bazaar, but isn't that what your claim is all about: that "[you] had to take time and effort to understand [Git]" and that Bazaar just works for you?
My post was why I choose bazaar, and why I have rejected other revision control systems that I have attempted to use.
So why did you post it? Surely because you wanted to express your preference over Git. In doing so, you made a couple of claims about Git which are simply untrue, which is why I replied. And the reason I replied is simply because other people who try to make a choice between Git and Bazaar may find your post and take away from it the information that Bazaar is superior to Git, which it is not.
I'm glad that you prefer a different system; but please don't insult me by suggesting that I'm being paid to use the one I prefer, or that I haven't bothered to learn one I'm "slagging off".
But you did slag Git in that you basically present its shortcomings side-by-side to Bazaar's greatness, which is a common PR/marketing thing to do. So just like I failed to create an in-place branch above because I did not bother to learn Bazaar, you did not bother to learn how to do with Git what you showed off with Bazaar, or else I'll have to assume you would not have written up the comparison as you did.
I have to use git as much as I use bzr, and I simply prefer bzr.
That was not the message I took from your original post.

Stefano Zacchiroli: w3-recs

Adopting w3-recs (i.e. experiences in package generation) A week ago or so I decided to adopt w3-recs, a documentation only package aiming to ship recommendations of the W3C in Debian. The previous maintainer (Frankie) step down from w3-recs maintenance since the packaging work was quite boring (add recommendations piecewise as soon as they came out, update them when needed, keep doc-base entries in sync, ...). I didn't want to follow that path and, probably for the first time in my life, the (not so) semantic web has come to the rescue. Starting from the TR automation page, I've found an always up to date index of all Technical Reports published by W3C, enriched with some information about the status of the TRs (draft, candidate recommendation, recommendation, ...) which is in RDF/XML format, and hence machine processable. The final result is that now the w3-recs package is mostly automatically generated via debian/rules target. The get-orig-source target first downloads the RDF index of the technical reports and then downloads all of them via wget (it took me sometime to find the appropriate flags, I've ended up with a award-winning wget command line containing 12 dash switches!). Then, at build time, several derived stuff is generated from the very same RDF index via XSLT: doc-base entries for all the shipped documents (the current grand total is 119 recommendations), a HTML index summarizing the available documents, and other debian/ stuff needed later on in the package build process. The next steps for w3-recs should be automatically split of the package in sub-packages classified according to the corresponding W3C activity, and enrichment of the doc-base entries with abstracts. Unfortunately neither of the 2 kinds of information are provided yet in the RDF index (not so semantic web, after all). Infrastructure deficiencies encountered in the process

28 September 2007

Russell Coker: Swap Space

There is a wide-spread myth that swap space should be twice the size of RAM. This might have provided some benefit when 16M of RAM was a lot and disks had average access times of 20ms. Now disks can have average access times less than 10ms but RAM has increased to 1G for small machines and 8G or more for large machines. Multiplying the seek performance of disks by a factor of two to five while increasing the amount of data stored by a factor of close to 1000 is obviously not going to work well for performance. A Linux machine with 16M of RAM and 32M of swap MIGHT work acceptably for some applications (although when I was running Linux machines with 16M of RAM I found that if swap use exceeded about 16M then the machine became so slow that a reboot was often needed). But a Linux machine with 8G of RAM and 16G of swap is almost certain to be unusable long before the swap space is exhausted. Therefore giving the machine less swap space and having processes be killed (or malloc() calls fail - depending on the configuration and some other factors) is probably going to be a better situation. There are factors that can alleviate the problems such as RAID controllers that implement write-back caching in hardware, but this only has a small impact on the performance requirements of paging. The 512M of cache RAM that you might find on a RAID controller won’t make that much impact on the IO requirements of 8G or 16G of swap. I often make the swap space on a Linux machine equal the size of RAM (when RAM is less than 1G) and be half the size of RAM for RAM sizes from 2G to 4G. For machines with more than 4G of RAM I will probably stick to a maximum of 2G of swap. I am not convinced that any mass storage system that I have used can handle the load from more than 2G of swap space in active use. The reason for the myths about swap space size are due to some old versions of Unix that used to allocate a page of disk space for every page of virtual memory. Therefore having swap space less than or equal to the size of RAM was impossible and having swap space less than twice the size of RAM was probably a waste of effort (see this reference [1]). However Linux has never worked this way, in Linux the virtual memory size is the size of RAM plus the size of the swap space. So while the “double the size of RAM” rule of thumb gave virtual memory twice the size of physical RAM on some older versions of Unix it gave three times the size of RAM on Linux! Also swap spaces smaller than RAM have always worked well on Linux (I once ran a Linux machine with 8M of RAM and used a floppy disk as a swap device). As far as I recall some time ago (I can’t remember how long) the Linux kernel would by default permit overcommitting of memory. For example if a program tried to malloc() 1G of memory on a machine that had 64M of RAM and 128M of swap then the system call would succeed. However if the program actually tried to use that memory then it would end up getting killed. The current policy is that /proc/sys/vm/overcommit_memory determines what happens when memory is overcommitted, the default value 0 means that the kernel will estimate how much RAM and swap is available and reject memory allocation requests that exceed that value. A value of 1 means that all memory allocation requests will succeed (you could have dozens of processes each malloc 2G of RAM on a machine with 128M of RAM and 128M of swap). A value of 2 means that a different policy will be followed, incidentally my test results don’t match the documentation for value 2. Now if you run a machine with /proc/sys/vm/overcommit_memory set to 0 then you have an incentive to use a moderately large amount of swap, safe in the knowledge that many applications will allocate memory that they don’t use, so the fact that the machine would deliver unacceptably low performance if all the swap was used might not be a problem. In this case the ideal size for swap might be the amount that is usable (based on the storage speed) plus a percentage of the RAM size to cater for programs that allocate memory and never use it. By “moderately large” I mean something significantly less than twice the size of RAM for all machines less than 7 years old. If you run a machine with /proc/sys/vm/overcommit_memory set to 1 then the requirements for swap space should decrease, but the potential for the kernel to run out of memory and kill some processes is increased (not that it’s impossible to have this happen when /proc/sys/vm/overcommit_memory is set to 0). The debian-administration.org site has an article about a package to create a swap file at boot [2] with the aim of making it always be twice the size of RAM. I believe that this is a bad idea, the amount of swap which can be used with decent performance is a small fraction of the storage size on modern systems and often less than the size of RAM. Increasing the amount of RAM will not increase the swap performance, so increasing the swap space is not going to do any good.

26 September 2007

Raphaël Hertzog: DSA needs a leader

Seriously. Now that we have been using the request tracker for quite some time, it’s even more obvious that the DSA team is not up to its task. Use login “guest” and password “readonly” if you want to check the RT tickets linked in this article. The facts Note that myself and Matt do not have the needed rights to fix most of the tickets, so we provided help on a best-effort basis. Otherwise we would have done more. The communication problem It’s a multi-level problem. Each of the members has some problems with one or more other members. Joey’s behavior has been part of the recurring problems mentioned: he doesn’t use the RT, doesn’t read the DSA email alias and doesn’t follow the DSA IRC channel but he still does stuff very regularly without reporting anything and obviously problems happen. Ryan and James tried to impose him a rule to document what he does, without success apparently. On the other side, as far as I know, Ryan and James also don’t impose themselves to document everything in a central changelog. Joey has refused to provide me an explanation for his behavior. He just reminded me that he holds grudges against James and Ryan because as ftpmasters they didn’t cooperate well with him while he was stable release manager. In general, outside of all personal griefs that they might have, the DSA members do not communicate very much (at least not on their own official channels). Some examples have already been given concerning the request tracker, but it’s not much more effective on IRC. Most of the traffic on the channel is made up by local admins fixing the problems themselves without any intervention by any DSA. I also use the channel to regularly ping some DSA about simple issues and/or stuff that they usually handle. It used to work somewhat but lately fil has been busy (with the kernel summit and other conferences) and I simply got no answer at all… for example I pinged elmo, neuro and fil several times in the last weeks in the hope that they handle the tickets of the security team (#150, #157, #164) without results. There’s room for improvement. The leadership problem The team has no designated leader and every time that there’s a decision to take, they are blocked. Joey wouldn’t communicate and give his opinion, Ryan is extremely requiring and perfectionist, there’s not much room for compromise… A long time ago in a galaxy far, far away, Joey and elmo were friends. It’s even Joey who gave root rights to elmo. Nowadays, it’s rather James that is sort-of leading the team but he’s fed up of the situation and hasn’t managed to get out of this mess. He refuses to take drastic measures by himself because he’s not clearly the leader and doesn’t solicit a decision of the Debian leader (or the project) because he believes that the DSA team is not under the scope of the constitution! This can’t last any further. We’ll have to do something about it. Stay tuned.

22 September 2007

Clint Adams: And I answer quite frankly, when they stop building roads

This one is long and boring. You'll want to skip it entirely. A while ago, Ulrich Drepper made getaddrinfo() in GNU libc behave according to an IETF RFC. Sounds sane, right? Well, not entirely. The way RFC 3484 rules work for IPv4 is less than ideal. On the other hand, returning network address query results unsorted is also less than ideal. Imagine if getent passwd returned lines in a randomized order. It would be perfectly functional, but piss me off to no end until I conditioned myself to always sort them the way I wanted them. I digress. So, we shipped a stable release that behaved this new way. Nobody objected. I don't know if Ubuntu did or not. It would amuse me if they did, but I don't much care. Then all of a sudden, along comes bug #438179. The gist is that Kurt thinks that trying to make intelligent decisions based on network topology is a bad idea because it defeats the point of having multiple A-records in the first place. We'll come back to that in two minutes. James filed the analogous bug in Ubuntu. I keep mentioning Ubuntu for a reason. I'm not going to tell you what that reason is. The GNU libc maintainers were reluctant to change the default (which is how most other modern operating systems behave; MacOS X being a notable exception, though I heard that they were working on it), so Kurt escalated to the Technical Committee. Now nothing in our lovely and flawed Constitution says that the tech-ctte should be a technically-capable bastion of wisdom and patience; I just think it does because I don't waste my time reading Foundation Documents that don't accurately describe our governance structure. Now for a brief interlude while I vamp incoherently for some of my less technical readers who are not implementors of a DNS resolver libraries, past IETF participants, DNS administrators, someones who've followed some of the IPv6 transition work, or have invented the Internet lately: Round-robin DNS is a giant hack, a poor man's loadbalancer, as it were, something that only works due to a de facto standard that no standards bodies seem to have thought worth preserving. gethostbyname() has been marked obsolescent in POSIX and deprecate in GNU libc for what seems like forever, and the GNU libc implementation of it suffers from bugs that probably no one should ever fix, and as such, no one should ever use it. getaddrinfo() is not a drop-in replacement for gethostbyname(), and expecting it to behave the same is daft. If it were meant to behave the same, I would expect that it using it would be simply a matter of changing calls to gethostbyname() to getaddrinfo(), rather than the amount of code rewriting you need to do now to change the same effect. Furthermore, nothing guarantees the behavior of gethostbyname() except for years of observed consistent behavior and the expectation that should anyone implement a C or resolver library that sorted gethostbyname() results, there would be much loud screaming that it was the library that's broken, and not the applications or programmers for being na ve. I hope that was less than helpful. Let's move on with the plot. While the Technical Committee deliberated , and I use the quotation marks because several -ctte members don't seem to have participated at all, Ian Jackson jumped up and down like some kind of Rumpelstiltskin, screaming that he is Der Komissar and that voting is in order, and a few other things I won't mention. On the 20th of September, Ian Jackson called for a vote. On the 20th of September, Ian Jackson uploaded an Ubuntu version of glibc with the default changed. On the 20th of September, my mother had trouble sleeping, though I suspect she has no idea it was because of this debacle. This story has no ending. Let the rain come down.

21 September 2007

Russell Coker: Multiple DNS Names

There are many situations where multiple DNS names for a single IP address that runs a single service are useful. One common example is with business web servers that have both www.example.com and example.com being active, so whichever a customer hits they will get the right content (the last thing you want is for a potential customer to make some trivial mistake and then give up). Having both DNS names be equal and separate is common. One example of this is the way http://planet.ubuntulinux.org/ and http://planet.ubuntu.com/ both have the same content, it seems to me that planet.ubuntu.com is the more official name as the wiki for adding yourself to the Planet is wiki.ubuntu.com. Another example of this is the way http://planet.debian.org/ and http://planet.debian.net/ both have the same content. So far this month I have had 337 referrals to my blog from planet.debian.org and 147 from planet.debian.net. So even though I can’t find any official reason for preferring one over another the fact that more than 2/3 of the referrals from that planet come from the planet.debian.org address indicates that most people regard it as the canonical one. In times past there was no problem with such things, it was quite routine to have web servers with multiple names and no-one cared about this (until of course one name went away and a portion of the user-base had broken links). Now there are three main problems with having two names visible:

  1. Confusion for users. When a post on thedebianuser.org referred to my post about Planet Ubuntu it used a different URL to the one I had used. I was briefly worried that I had missed half (or more) of the content by getting my links from the wrong blog - but it turned out that the same content was on both addresses.

  2. More confusing web stats for the people who run sites that are referenced (primarily the bloggers in the case of a Planet installation). This also means a lower ranking as the counts are split. In my Webalizer logs planet.debian.org is in position #5 and planet.debian.net is in position #14. If they were combined they would get position #3. One thing to keep in mind is that the number of hits that you get has some impact on the content. If someone sees repeated large amounts of traffic coming from planet.debian.org then they are likely to write more content that appeals to those users.

  3. Problems with sites that have strange security policies. Some bloggers configure their servers to only serve images if the referrer field in the HTTP protocol has an acceptable value (to prevent bandwidth theft by unethical people who link to their pictures). My approach to this problem is reactive (I rename the picture to break the links when it happens) because I have not had it happen often enough to do anything else. But I can understand why some people want to do more. If we assume that an increasing number of bloggers do this, it would be good to not make things difficult for them by having the smallest possible number of referrer URLs. It would suck for the readers to find that planet.debian.org has the pictures but planet.debian.net doesn’t.

The solution to this is simple, one name should redirect to the other. Having something like the following in the Apache virtual host configuration (or the .htaccess) file for the least preferred name should redirect all access to the other name. RewriteCond % REQUEST_URI ^(.*$) [NC]
RewriteRule . http://planet.example.com/%1 [R=301,L] In my posts last night I omitted the URLs for the Planet Searches from the email version (by not making them human readable). Here they are:

18 September 2007

Clint Adams: The magic of rule 9

Wow, Ian Jackson is on crack. Tollef, little monkeys think FreeSynd is good enough.

Sven Mueller: Brane Dump The Thoughts of Matt Palmer

In “Documentation - the chicken and the egg” [1], Matt Palmer wrote about the problem that noone writes documentation because noone reads it and that noone reads documentation because the few documentation in existence usually isn’t very good. So he, like me hs the habit of searching for help on the net instead of in a projects documentation. However I disagree with him in the consequences a bit. Because I noticed that on several projects with good documentation (subversion is an example that immediately comes to my mind, but postfix isn’t too bad either), the internet search returns a reference to the docs more often than not. Of course, this means that the documentation needs to be searchable for those webcrawlers. So if you have the task to write documentation, I strongly suggest to make it searchable in some way. For company-internal projects, this obviously means that the documentation must be reachable via an internal search engine. In a project a few years back, we implemented an internal search engine which included company internal information (even with user based access rules so that each user only got those results he could actually access) as well as an external search engines results. It was closed source, but a pretty nice idea. It didn’t, however, index any locally (user’s desktop) stored documents, only what was on some company web page (but including .doc, .rtf, .pdf and the like which where retrievable via http). [1] http://www.hezmatt.org/~mpalmer/blog/general/documentation_the_chicken_and_the_egg.html

Benjamin Mako Hill: You Rule!

Inspired by Mitchell Charity's printable paper rulers and Steve Pomeroy's CSS ruler, I wrote a little python script to generate an on-screen ruler for the OLPC XO-1. The XO-1 screens are super high resolution (200dpi) and are each identical. This makes for a very accurate ruler. It's one of a few project I've done or am working on that tries to take advantage of the physical qualities (and physical consistencies) of the XOs. Also, a ruler is just a really useful thing for a school child -- or anyone else for that matter. Of course, different screens have different pixel sizes so the ruler for the XO won't work on another screen. This made some of my friends jealous. To appease them, I spent a couple hours and hacked up a little web frontend to my ruler generator which allows anyone to create custom on-screen rulers and to save them and share them with others who might have the same screen. I've called it YouRule. Please check it out or download the source and send me improvements.
http://projects.mako.cc/yourule

Andrew Pollock: [life] Wake Me Up When September Ends

Today was the day that Sarah was supposed to have an amniocentesis to determine if it was viable to deliver Joshua via caesarian section. Most probably he would have been born today. I should have become a father today. Instead, last night we stayed at a lovely Bed and Breakfast near Half Moon Bay, and this morning on the clifftops near the Ritz, we released a balloon with a photo of him, and cried a little. It's been a surreal couple of weeks. In some ways, it feels like it has dragged on forever, in other ways, it's hard to believe it has only been two weeks. I'm going to go back to work tomorrow. Sarah's healing from the surgery well, and her Mum's here, so there's no real need for me to be at home, and I think work will provide a welcome distraction. The support of all of our friends has been nothing short of amazing. We are truly blessed to have such a wonderful network of friends over here, which helps make up for the fact that our family is so far away.

13 September 2007

Lucas Nussbaum: Which distribution on Thinkpads: really the good question to ask?

After Dell, Lenovo decided to ask users which Linux distribution they should put on Thinkpads. Seriously, who cares? If I buy a laptop that comes with Linux pre-installed, my first step would be to reinstall it from scratch, exactly like with a laptop with Windows pre-installed. Because the choices that were made wouldn’t match mine (think of partitioning, etc). Or simply because I wouldn’t totally trust the hardware manufacturer. So, what would make me happier about a laptop? I couldn’t care less about which distribution comes preinstalled. If Lenovo wants to make me happy, there are two ways: It’s not _that_ hard: some manufacturers got it right, at least for some of their products. There are many manufacturers contributing code directly to the Linux kernel, for network drivers for example. But maybe this is just about marketing and communication, not about results? Because after all, Dell and Lenovo will look nice to the random user. While playing-by-the-rules manufacturers are hidden deep in the Linux changelog.

11 September 2007

Eddy Petrișor: dpkg i18n going backwards?

Now in dpkg I found this:

dpkg: no, cannot proceed with %s (--auto-deconfigure will help):\n
%s

Before there was something like:

dpkg: no, cannot remove %s (--auto-deconfigure will help):\n
%s


This is going backwards wrt to i18n since one of the basic rules of i18n is to have complete sentences, while keeping the verb covered behind some parameter is not a good way of doing that.

8 September 2007

Andrew Pollock: [life] Homecoming, part 1

Sarah's Mum arrived this morning. Sarah was discharged from hospital this afternoon. By some freaky coincidence, one of our friends from Australia who's been through the same thing as us happened to be nearby, and rearranged his travel plans to swing by and spend a day with us on the way home. I'm extremely grateful for that. The flowers, emails, and number of visitors we've received in the past four days has been nothing short of overwhelming. We are truly grateful for having so many wonderful friends over here (and all around the world). It's going to take some time, but we'll acknowledge all of them. This afternoon I signed the paperwork to have Joshua cremated. We've decided against having any sort of funeral service. The house looks like a bomb hit it, and then a florist moved in. I've barely been home all week, and the fridge is still overflowing with leftovers from last week's baby shower barbecue that we had. I guess I know what I'm doing tomorrow... Next, we need to pack up the baby's room.

7 September 2007

Russell Coker: Duplicating a Xen DomU

A fairly common request is to be able to duplicate a Xen instance. For example you might have a DomU for the purpose of running Wordpress and want another DomU to run MediaWiki. The difference in configuration between two DomU’s for running web based services that are written in PHP and talking to a MySQL back-end is quite small, so copying the configuration is easier than a clean install. It is a commonly held opinion that a clean install should be done every time and that Kickstart on Red Hat, FAI on Debian and comparable technologies on other distributions can be used for a quick automatic install. I have not yet got FAI working correctly or got Kickstart working on Xen (it’s on my todo list - I’ll blog about it when it’s done). Regardless of whether it’s a good idea to copy a Xen DomU, there are often situations where clients demand it or when it’s impractically difficult to do a fresh install. I believe that the most sensible way to store block devices with Xen is to use LVM. It is a requirement for a Xen system that you can easily create new block devices while the machine is running and that the size of block devices can be changed with minimal effort. This rules out using Linux partitions and makes it unreasonably difficult to use LUNs on a fiber-channel SAN or partitions on a hardware RAID. LVM allows creating new block devices and changing the size of block devices with minimal effort. Another option would be to use files on a regular filesystem to store the filesystem data for Xen DomU’s, if choosing this option I recommend using XFS [1] filesystem (which delivers good performance with large filesystems and large files). If you use XFS to store the block devices for the DomU that you want to copy then you will need to halt the DomU for the duration of the copy as there is no other way of getting an atomic copy of the filesystem while it’s in use. The way of doing this would be to run the command “xm console foo ; cp /mnt/whatever/foo-root /mnt/whatever/bar-root ; xm create -c foo” where “foo” is the name of the DomU and “/mnt/whatever/foo-root” is the file that is used to store the root device for the DomU (note that multiple cp commands would be needed if there are multiple block devices). The reason for having the two xm commands on the one line is that you initially login to the DomU from the console and type halt and then the xm command will terminate when the DomU is destroyed. This means that there is no delay from the time the domain is destroyed to the time that the copy starts. If you use LVM to store the block device then things are a little easier (and you get no down-time). You simply run the command “lvcreate -s -L 300m -n foo-snap /dev/V0/foo-root” to create a snapshot with the device name /dev/V0/foo-snap which contains a snapshot the of the LV (Logical Volume) /dev/V0/foo-root. The “-L 300m” option means to use 300Meg of storage space for the snapshot - if the writes to /dev/V0/foo-root exceed 300Meg of data then your snapshot breaks. There is no harm in setting the allocated space for the snapshot to be the same as the size of the volume that you are going to copy - it merely means that more disk space is reserved and unavailable for other LVM operations. Note that V0 needs to be replaced by the name of the LVM VG (Volume Group) Once you have created the snapshot you can create a new LV with the command “lvcreate -n new-root -L X /dev/V0” where X is the size of the device (must be at least as big as the device you are copying) and then copy the data across with a command similar to “dd if=/dev/V0/foo-snap of=/dev/V0/new-root bs=1024k“. After the copy is finished you must remove the snapshot with the command “lvremove /dev/V0/foo-snap” (please be very careful when running this command - you really don’t want to remove an LV that has important data). Note that in normal operation lvremove will always give a prompt “Do you really want to remove active logical volume“. If you made the new device bigger then you must perform the operations that are appropriate for your filesystem to extend it’s size to use the new space. There is no need to copy a swap device, it’s easier to just create a new device and run mkswap on it. After copying the data you will need to create the new Xen config (by copying /etc/xen/foo to the new name). Make sure that you edit the Xen config file to use the correct block devices and if you are specifying the MAC address [2] by a “vif” line in the config file make sure that you change them to unique addresses for your LAN segment (reference [2] has information on how to select addresses). Now you must mount the filesystem temporarily to change the IP address (you really don’t want two DomU’s with the same IP address). If your Dom0 has untrusted users or services that are accessed by untrusted users (IE any Internet facing service) then you want to mount the filesystem in question with the options nosuid and nodev so that if the DomU has been cracked it won’t allow cracking of the Dom0. After changing the configuration files to change the IP address(es) of the DomU you can then umount the filesystem and start it with the xm create command. If instead of creating the clone DomU on the same Dom0 you want to put it on a different system you can copy the block devices to files on a regular filesystem on removable media (EG an IDE disk with USB attachment). When copying the block devices you also need to copy the Xen configuration and edit it to reflect the new paths to block devices for the data once it’s copied to the new server, but you won’t necessarily need to change the MAC address if you are copying it to a different LAN segment. References:
  1. http://en.wikipedia.org/wiki/XFS

  2. http://en.wikipedia.org/wiki/MAC_address

6 September 2007

Russell Coker: Citing References in Blog Posts

A significant problem with the old-fashioned media is that as a general rule they don’t cite references for anything. Some of the better TV documentaries and non-fiction books cite references, but this is the exception not the norm. Often documentaries only cite references in DVD extras which are good for the people who like the documentary enough to buy it but not for people who want to rebut it (few people will pay for a resource if they doubt the truth and accuracy of it’s claims). I can understand newspapers not wanting to publish much in the way of background information in the paper version as every extra line of text in an article is a line of advertising that they can’t sell. So they have financial pressure to produce less content, and the number of people like me who want to check the facts and figures used in articles is probably a small portion of the readership. Another issue with newspapers is that they are often considered as primary authoritative sources (by themselves and by the readers). It is often the case that journalists will interview people who have first-hand knowledge of an issue and the resulting article will be authoritative and a primary source in which case all they need to do is to note that they interviewed the subject. However the majority of articles published will be sourced from elsewhere (news agencies [ http://en.wikipedia.org/wiki/News_agency ] such as Reuters are commonly used). Also articles will often be written based on press releases - it is very interesting to read press releases and see how little work is done by some media outlets to convert them to articles, through a well written press release a corporation or interest group can almost write it’s own articles for publication in the old media. One way of partially addressing the problem of citing references in old media would be to create a web site of references, then every article could have a URL that is a permanent link to the references and calculations to support the claims and numbers used. Such a URL could be produced by any blogging software, and a blog would be an ideal way of doing this. For bloggers however it’s much easier to cite references and readers have much higher expectations of links to other sites to support claims and of mathematical calculations shown to indicate how numbers are determined. But there is still room for improvement. Here are some of the most common mistakes that I see in posts by people who are trying to do the right thing:
  1. Indirect links. When you refer to a site you want to refer to it directly. In email (which is generally considered a transient medium) a service such as TinyURL [ www.TinyURL.com ] can be used to create short URLs to refer to pages that have long URLs. This is really good for email as there are occasions when people will want to write the address down and type it in to another computer. For blogging you should assume that your reader has access to browse the web (which is the case most of the time). Another possibility is to have the textual description of a link include a reference to the TinyURL service but to have the HREF refer to the real address. Any service on the net may potentially go away at some future time. Any service on the net may have transient outages, and any reader of your blog may have routing problems that make parts of the net unavailable to them. If accessing a reference requires using TinyURL (or a similar service) as well as the target site then there are two potential things that might break and prevent your readers from accessing it.
    One situation where indirect links are acceptable is for the printed version. So you could have a link in the HTML code for readers to click on to get to the reference page directly and a TinuURL link for people who have a printed version and need to type it in.
    Also when linking to a blog it’s worth considering the fact that a track-back won’t work via TinyURL and track-backs may help you get more readers…

  2. Links that expire. For example never say “there’s a good article on the front page of X” (where X is a blog or news site). Instead say “here’s a link to a good article which happens to be on the front page now” so that someone who reads your post in a couple of years time can see the article that you reference.
    Another problem is links to transient data. For example if you want to comment on the features of a 2007 model car you should try to avoid linking to the car manufacturer page, next year they will release a new car and delete the old data from their site.
    A potential problem related to this is the Google cache pages which translate PDF to HTML and high-light relevant terms and can make it much easier to extract certain information from web pages. It can provide value to readers to use such links but AFAIK there is no guarantee that they will remain forever. I suggest that if you use them you should also provide the authoritative link so that if the Google link breaks at some future time then the reader will still be able to access the data.

  3. Not giving the URLs of links in human readable form. Print-outs of blog pages will lose links and blog reading by email will also generally lose links (although it would be possible to preserve them). This counts for a small part of your readership but there’s no reason not to support their needs by also including links as text (either in the body or at the end of the post). I suggest including the URL in brackets, the most important thing is that no non-URL text touch the ends of the URL (don’t have it in quotes and have the brackets spaced from it). Email clients can generally launch a web browser if the URL is clear. Note that prior to writing this post I have done badly in this regard, while thinking about the best advice for others I realised that my own blogging needed some improvement.
    I am not certain that the practice I am testing in this post of citing URLs inline will work. Let me know what you think via comments, I may change to numbering the citations and providing a list of links in the footer.

  4. Non-specific links. For example saying “Russell Coker wrote a good post about the SE Linux” and referring to my main blog URL is not very helpful to your readers as I have written many posts on that topic and plan to write many more (and there is a chance that some of my future posts on that topic may not meet your criteria of being “good”). Saying “here is a link to a good post by Russell Coker, his main blog URL is here” is more useful, it gives both the specific link (indicating which post you were referring to) and the general information (for people who aren’t able to find it themselves, for the case of deleted/renamed posts, and for Google). The ideal form would be “<A HREF=”http://etbe.coker.com.au/whatever”>here is a link to a good post by Russell Coker [ http://etbe.coker.com.au/whatever ]</A>, his main blog URL is <A HREF=”http://etbe.coker.com.au/”> [ http://etbe.coker.com.au ]</A>” (note that this is an example of HTML code as a guide for people who are writing their own HTML, people who use so-called WYSIWYG editors will need to do something different).

  5. Links that are likely to expire. As a rule of thumb if a link is not human readable then the chance of it remaining long-term is low. Companies with content management systems are notorious for breaking links.

  6. Referencing data that you can’t find. If you use data sourced from a web site and the site owner takes it down then you may be left with no evidence to support your assertions. If data is likely to be removed then you should keep a private copy off-line (online might be an infringement of copyright) for future reference. It won’t let you publish the original data but will at least let you discuss it with readers.

  7. Referencing non-public data. The Open Access movement [ http://en.wikipedia.org/wiki/Open_access ] aims to make scholarly material free for unrestricted access. If you cite papers that are not open access then you deny your readers the ability to verify your claims and also encourage the companies that deny access to research papers.
    An insidious problem is with web sites such as the New York Times [ www.nytimes.com ] which need a login and store cookies. As I have logged in to their site at some time in the past I get immediate access to all their articles. But if I reference them in a blog post many readers will be forced to register (some readers will object to this). With the NYT this isn’t such a problem as it’s free to register so anyone who is really interested can do so (with a fake name if they wish). But I still have to keep thinking about the readers for such sites.
    I should probably preview my blog posts from a different account without such cookies.

  8. Failing to provide calculations. My current procedure is to include the maths in my post, for example if you have a 32bit data type used to store a number of milliseconds then it can store 2^32/1000 seconds which is 2^32/1000/60/60/24 = 49.7 days, in this example you can determine with little guessing what each of the numbers represent. For more complex calculations an appendix could be used. A common feature of blogs is the ability to have a partial post sent to the RSS feed and the user has the ability to determine where the post gets cut. So you could cut the post before the calculations, the people who want to see them will find it’s only one click away, and the people who are happy to trust you will have a shorter post.

  9. Linking with little reason. Having a random word appear highlighted with an underline in a blog post is often not very helpful for a reader. It sometimes works for Wikipedia links where you expect that most readers will know what the word means but you want to link to a reference for the few who don’t (my link for the word Wikipedia is an example). In the case where most readers are expected to know what you are referring to then citing the link fully (with a description of the link and a human-readable form for an email client) is overkill and reduces the readability of the text.
    The blogging style of “see here and here for examples” does not work via email and does not explain why a reader should visit the sites. If you want to include random links in a post then having a section at the footer of related links would probably be best.

  10. Linking to a URL as received. Many bloggers paste URLs from Google, email, and RSS feeds into their blog posts. This is a bad idea because it might miss redirection to a different site. If a Google search or an email gives you a URL that is about to go away then it might redirect to a different site. In that case citing the new URL instead of the old one is a service to your readers and will decrease the number of dead-links in your blog over the long-term. Also using services such as www.feedburner.com may cause redirects that you want to avoid when citing a blog post, see my previous post about Feedburner [ http://etbe.coker.com.au/2007/08/20/feedburner-item-link-clicks/ ].

Here are some less common problems in citing posts:
  1. Inappropriately citing yourself. Obviously if there is a topic that you frequently blog about then there will be benefit to linking to old posts instead of covering all the background material, and as long as you don’t go overboard there should not be any problems (links to your own blog are assumed to have the same author so there is no need for a disclaimer). If you write authoritative content on a topic that is published elsewhere then you will probably want to blog about it (and your readers will be interested). But you must mention your involvement to avoid giving the impression that you are trying to mislead anyone. This is particularly important if you are part of a group that prepares a document, your name may not end up on the list of authors but you have a duty to your readers to declare this.
    Any document that you helped prepare can not be used by itself as a support of claims that you make in a blog post. You can certainly say “I have previously demonstrated how to solve this problem, see the following reference”. But links with comments such as “here is an example of why X is true” are generally interpreted to be partly to demonstrate the popular support for an idea.

  2. Citing secret data. The argument “if you knew what I know then you would agree with me” usually won’t be accepted well. There are of course various levels of secrecy that are appropriate. For example offering career advice without providing details of how much money you have earned (evidence of one aspect of career success) is acceptable as the readers understand the desire for some degree of financial secrecy (and of course in any game a coach doesn’t need to be a good player). Arguing the case for a war based on secret data (as many bloggers did) is not acceptable (IMHO), neither is arguing the case for the use of a technology without explaining the science or maths behind it.

  3. Not reading the context of a source. For example I was reading the blog of a well regarded expert in an area of computer science, and he linked to another blog to support one of his claims. I read the blog in question (more than just the post he cited) and found some content that could be considered to be racially offensive and much of the material that I read contained claims that were not adequately supported by facts or logic. I find it difficult to believe that the expert in question (for whom I have a great deal of respect) even casually inspected the site in question. In future I will pay less attention to his posts because of this. I expect a blogger to pay more attention to the quality of their links than I do as a reader of their blog.

While writing this post I realised that my own blogging can be improved in this regard. Many of my older posts don’t adequately cite references. If you believe that any of my future posts fail in this regard then please let me know.

5 September 2007

Jan Wagner: eGroupware 1.4.001.dfsg-2.1~bpo40+1 backported to etch

I did upload a updated version of eGroupware to my pool. You can grab it from http://ftp.cyconet.org/debian/archive/bpo/egroupware/1.4.001.dfsg-2.1~bpo40+1/ or via:

deb ftp://ftp.cyconet.org/debian etch-backports main non-free contrib For installing the rules analog backports.org applies. Have fun! , , , ,

3 September 2007

MJ Ray: Latest silly trick with udev and a USB audio player

Here's my latest silly trick with the udev rules discussed previously. Add a udev rule of ACTION=="add", KERNEL=="sd*[!0-9]", ENV ID_SERIAL =="10d6_USB_2.0(HS)_Flash_Disk_A00000000001", RUN+="/usr/local/bin/dapsync" where dapsync is something like this script:-
/sbin/mount /mnt/USB-DAP \
&& cd /opt/Podcasts \
&&   /bin/tar --create --remove-files * \
       /bin/tar --extract --directory /Mount/USB-DAP  
/sbin/umount /Mount/USB-DAP \
&& /bin/ogg123 -q /home/mjr/House/Audio/three-note.ogg
and fstab has a line for /Mount/USB-DAP pointing to the right device/location thing in /dev/disk/by-id Then, build up podcasts under /opt/Podcasts, plug the audio player 10d6_USB_2.0(HS)_Flash_Disk_A00000000001 into the right port and wait for the three notes to play...

2 September 2007

Stefano Zacchiroli: clean distclean

On cleaning and distcleaning ... ... and CDBS and "FTBFS if built twice in a row" Yesterday I closed two bugs of mine (424331 and 424392) of the "FTBFS if built twice in a row" class. Shame on me, they were open since too long. Both packages use autotools and, on the Debian side, CDBS. For both packages the fix was as simple as adding:
DEB_MAKE_CLEAN_TARGET = clean

to debian/rules. The rationale for that is rather obvious (now that I've thought about it of course). CDBS per default uses "distclean" as the upstream target which is invoked when "debian/rules clean" is executed. Unfortunately, "distcheck" (used by upstream to create the distribution tarball) does not check that "distclean" leave the distribution tarball as it was before the build. So nothing grants a priory that stuff removed by "distclean" is rebuildable with just the build-deps. A lot of packages come with generated sources (for example by XSLT or by some template toolkits) included in the source package, if that stuff is removed by mistake during distclean you'll see yet another instance of this kind of bugs. I bet a lot of other "FTBFS if built twice in a row" bugs out there have been fixed this way or can still be fixed with the addition of the line above. Update: changed this post, the first writing was made thinking at "maintainer-clean" instead of "distclean"

Next.

Previous.