Search Results: "rul"

2 January 2007

MJ Ray: Debian: Fun with no builder 2

Sven Mueller commented:
"There is a better solution for building packages if you don't have a local unstable machine up. Use pbuilder (w/ or w/o the pdebuild "frontend"). I had refrained from setting up pbuilder for quite a while, and was amazed how easy it was when I eventually did. The only "problem" is that you probably want to make sure that at least "debian/rules clean" works even under Debian/stable. But I personally like to keep my packages buildable under stable anyway (since I usually use backports of them on production systems)."
I tried pbuilder at first and it failed because of the aforementioned debootstrap stable/unstable difference. After I read up on debootstrap, I didn't really see what pbuilder added to the system besides more tarball processing, so I didn't bother trying it again after debootstrap worked. Am I missing out on anything important? Mark Brown commented:
"pbuilder provides management of the chroot environments (you can have several set up and it'll let you choose between and update them) and a convenient front end for building packages in a chroot (you can just point it at a package and say "go build this in a chroot")."
I'm probably being dense, but I still don't see a benefit. A chroot is more-or-less just a tree on the disk so I can have several set up anyway, updating them is just running update inside the chroot and I just mv the package into the chroot and say "go in that chroot and build this". Maybe pbuilder just isn't beneficial for me.

24 December 2006

David Welton: Apples, Oranges, and Culture

Apples and Oranges A number of people wrote irate comments after my article about Ruby's eBay API beating PHP hands down. They complained that I was comparing apples to oranges, because the Ruby library I was using was nicely crafted, whereas the PHP one was some crufty crud that just happened to be one of the first things you find when you go to developer.ebay.com. First things first, let's look at some better PHP code:
require_once 'EbatNs/EbatNs_ServiceProxy.php';
require_once 'EbatNs/EbatNs_Logger.php';
require_once 'EbatNs/GetItemRequestType.php';
require_once 'EbatNs/ItemType.php';
$session = new EbatNs_Session('config/amd.ebay.config.php');
$cs = new EbatNs_ServiceProxy($session);
$cs->setHandler('ItemType', 'handleItem');
$req = new GetItemRequestType();
$req->setItemID(5652664344);
$req->setDetailLevel($Facet_DetailLevelCodeType->ReturnAll);
$res = $cs->GetItem($req);
echo "<pre>";
if ($res->getAck() != $Facet_AckCodeType->Success)  
echo "we got a failure<br>";
foreach ($res->getErrors() as $error)
 
    echo "#" . $error->getErrorCode() . " " .
    htmlentities($error->getShortMessage()) . "/" .
    htmlentities($error->getLongMessage()) . "<br>";
 
  else  
//#type $item ItemType
$item = $res->getItem();
echo "ShippingTerms : " . $item->getShippingTerms() . "<br>";
print_r($item);
 
versus our Ruby code:
require 'rubygems'
require 'ebay'
include Ebay
include Ebay::Types
require 'localconfig'
ebay = Ebay::Api.new
begin
  response = ebay.get_item(:item_id => '110011765264')
  puts "ShippingTerms : # response.items.shipping_terms "
rescue Ebay::RequestError => e
  e.errors.each do  error 
    puts error.long_message
  end
end
So, they get closer with that, but the Ruby code is still clearer and more concise. If you look around at some PHP5 based examples, they start to be decent as well. As one tutorial writes:
These components combine to create a kick-ass tool that PHP 4 can't replicate without lots of work, if at all.
Leaving aside the fact that a lot of people are still more or less stuck on 4, I think there is something more important to be learned. Culture There are a lot of really smart people who work with, and on PHP. As much as anyone grumbles about any language, it's not easy to create one, let alone create one and make it as popular as PHP. However, as I've said elsewhere, one of the things that made PHP so successful was its ability to "scale down". Part of its value is that it made it much easier for more people with less advanced skills to create things. That is, without doubt, a very fine accomplishment, but it does bring some baggage with it. Namely, that there are a great deal of PHP programmers who do not write very nice looking code. Going back to the eBay example, the code featured on their site is not very tasteful, if you ask me. My bet is that in Ruby-land, that sort of code would not be displayed very prominently. Why? It's not the computer, it's the culture that has grown up around the different languages. Computers do not care one bit about programming languages. They interpret bits and bytes, whatever language is used, so it's really all the same to them. Programming languages matter only to people, because they are the tool we use to comunicate our instructions to machines. This means that they are a very human thing in some ways, and that human aspects of them matter a great deal. What this means is that it's important not only to design a cool language, but to create a good culture around it. To take aim at something nearer and dearer to me than PHP, one of the major failings of the Tk toolkit was that there was little to no attempt to create a good design culture around it. Anyone who was using Linux 10 years ago will surely remember some of the truly horrible things that were created with Tk. Why? Tcl and Tk made creating a GUI an order of magnitude easier than with C and Motif (or whatever windows used at the time), and turned them loose with no instructions or idea whatsoever of how to go about creating a good, intuitive user friendly one - the Tk docs themselves make little to no mention of usability, and even the best Tcl/Tk books pay almost no attention, even in the form of recommended reading, to what to make with this beautiful tool whose hows are explained very well. The unixy community also wasn't exactly a wellspring of creativity and critique in terms of good guis, either. So, yes, I know that it's possible to write good, clever, readable PHP (or Perl, or FORTRAN) code, and bad Ruby (or Tcl, or Python, or whatever) code. However, I'm also convinced that culture counts. People who value clean, beautiful code gravitate to cultures, and, where possible, workplaces where they find other like-minded people. Others, not having as many options, find themselves staring at 13000-line PHP files that grow malignantly by dint of cut and paste, wondering how to tame that which others have wrought!

21 December 2006

Lucas Nussbaum: Debian Package of the Day is now alive again, and needs your help!

For those who have missed the previous blog entries: Debian Package of the Day (aka Deb-a-day) is now alive again ! There has already been several entries (published 2 times a week, on wednesdays and sundays, until we make sure that we can sustain an higher rate): Deb-a-day is not syndicated on Planet Debian (because of the “only personal blogs” rule), but it’s syndicated on Planet Ubuntu, and it might be syndicated on Debian Times (negociations are still ongoing :-). Don’t forget to subscribe to the feed ! We (the nice team of editors) have 2 entries ready in the queue, but that’s not enough. If you discovered an interesting package through Deb-a-day, and didn’t submit an entry yet, you should really feel guilty now ! (we are especially looking for cool graphical apps, so Deb-a-day becomes less nerdy, but apps for nerds are welcomed as well, of course.)

Erich Schubert: On military usage of FLOSS.

Sergey raised the issue of restricting use of software to non-military use, and Alan pointed out how much they've given back to the FLOSS community. However, I'd like to point out that any such restriction violates rules for opensource used by both the FSF and Debian. Debian is pretty clear about it in the social contract:
No Discrimination Against Fields of Endeavor

The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.
And in the GNU Free Software Definition:
The freedom to run the program, for any purpose (freedom 0).
So any such restriction would mean your software is no longer free software. It's not that I'm in any way pro military, but allowing usage restrictions will cause a huge mess. Next we'll have some application which may not be used by religious zealots (of any kind), paedophiles, and at some point end up with a huge licensing mess (maybe even full of discrimination). ("No, I can't sell you a web server, because your brother-in-law is in the military."?) Actually disallowing any military use is some kind of discrimination, too. Military is not only used to kill someone, but it can serve humanitarian purposes, too. Rescue people in flooded New Orleans etc. - if you are unhappy with what your government is using your military for, vote accordingly and do politics. It's fine if you as the author point out that you disapprove of any use of it to harm anybody, or commit crimes; but don't put up restrictions you couldn't verify anyway. (As if the military would care much for any such restriction, anyway.) Always remember: it's only the good guys playing by the rules. There is no use in disallowing use of some software for cracking, is there?

Marc 'Zugschlus' Haber: exim 4.64 in Debian

Yesterday, Philip Hazel released exim 4.64. I have just uploaded the packages to Debian experimental. If you want to try the lastest and finest exim, please check out the packages. Unfortunately, the release is too late for etch. Debian etch will release with exim 4.63. I mean, unless the release team decides to bend their rules very badly, which I really do not assume.

Erich Schubert: Dunc wars.

Joey and Josselin, I'm calling you childish, not because you "stand" your principles, but because of the way you try to convince others that your principles are better. What you are using is: Actually, I'm by now convinced that it would have been better for Debian, if you would just have really left. Your behaviour in the last months makes you qualify as "poisonous people" (except these usually aren't big contributors). In my opinion, your infighting has harmed the project, it gives people the impression that being involved in Debian means mostly having to deal with such things. While it's not - Debian is still fun to me, although I have little time, and didn't manage to go to the last few Debian meetings here in Munich - all these fights are a nuisance to me. Even though I'm not actually affected by them (neither Dunc-Tank, because it doesn't demotivate me, nur the powerpc fights, nor some other fights on -private), the way they are dicussed on the Debian lists does annoy me. Again: if anything is cutting on my motiviation, it's your behaviour (this btw. includes the powerpc issue and fighters, too, especially Sven Luther who has probably sent as many mails as all others together, just reiterating the same things again and again). So if you are planning to become a Debian contributor, learn to use the "delete" button in your email clients, and don't be afraid to just delete whole threads. Certain threads are just a waste of time and bring negative emotions. So: Joey, Josselin: grow up, and accept that people sometimes have a different opinion, and you can achieve more by accepting that your opinions differ and just try to make the most of it anyway. Reminding them of your differences won't make them change their mind, nor will it make them like you any better. Fortunately, most people in the project (well, everybody except me?) seem to obey above "poisoned people" recommendations, and just ignored your posts on this issue. I didn't, and one of the reasons it that I feared Joeys first post could grab some media attention, and I felt there should be at least one post saying that, well, the debian-installer and some other RC bugs are probably also a cause of the delay, and it's probably not worth rehashing the dunc-bank issue. So far, I've only seen one news article citing aba that the delay was caused by the debian installer among others, no "the delay is due to dunc-bank demotivating all developers" FUD.

20 December 2006

Ian Murdock: Software installation on Linux: Tomorrow, it won t (with some cooperation) (part 2)

In part 1, I described the problem of software installation on Linux; in part 2, I’ll describe the solution we came up with at the recent LSB Packaging Summit. After reading through the comments to part 1, let me first point out that our goal is to create a vibrant third party software ecosystem around Linux—you know, like the one Microsoft has built around Windows. No, it’s not about imitating Microsoft. It’s about being competitive. A platform is only as good as the applications that run on it. Bottom line: Many third parties have built their businesses around proprietary software, and we can’t just ignore them. And “ecosystem” implies decentralized, which I argued in part 1 was a key tenet of open source development anyway, i.e., this should be playing to one of our core strengths. So, if your “solution” is to tell ISVs (independent software vendors) to give us their source code so the distributions can include it because that’s just how we do things, you can safely skip the rest of the post below. You’re simply not going to agree that any of this is a problem. Ok. Assuming our goal is to create a vibrant third party software ecosystem (and everyone still reading agrees that’s a good goal, right?), we have the following challenges. First of all, the distribution vendors are hugely invested in their existing package systems, and for the most part, those package systems work extremely well. As I said in part 1, “if [an application] is in your distro of choice, you re only an apt-get or a yum install away from running it.” (I’m saying it again here because some of the commenters apparently didn’t see that. The tricky bit is “in your distro of choice”, which by definition is not the case with third party software.) Furthermore, a variety of highly sophisticated systems management solutions are built above those package systems, such as Red Hat Network and Novell ZENworks. This is a pretty important consideration, because these days, the “software management problem” largely involves managing software across the entire infrastructure, not just a single system. What problem then? This: ISVs have thus far been reluctant to use the native package systems. Why? THEY’RE hugely invested in “package systems” for other platforms, and every Linux specific thing they have to support costs money. In a world where decisions are ruled by cost vs. benefit, this is a pretty important consideration too. How do ISVs handle this today? For the most part, they ignore the package systems on Linux and do their own thing. Trouble is, while doing their own thing gives ISVs the flexibility to work cross platform, it ultimately makes their products integrate poorly in the broader systems management context because the package systems know nothing about them. What is needed is a way to bridge the gap between what the distros provide and what the ISVs want. But how? First off, we have to understand what ISVs want. The answer is simple: ISVs want to treat Linux as a single platform, which means they want to offer a single package for Linux, much as they do for Windows. So, if one commenter is right that “[t]he problem is that people (including software distributors) believe there s such [a] thing as ‘Linux’ as a target platform” and that “[i]f you re distributing software for ‘Linux’ then it won t be simple to install it, ever”, well, then Linux is destined to suffer the fate of UNIX. I’m not ready to give up so easily. Several commenters suggested that what we need is a brand new package system. That’s a non-starter—for one thing, the distros aren’t going to be too keen on replacing something they’re hugely invested in, and if ISVs aren’t going for RPM today, why would they go for something different tomorrow? No, to find a way forward, we need an evolutionary step from where we are today. From there, perhaps we can do more, but even the first steps can be quite valuable in their own right. To help find those first steps, we put some of the leading minds in Linux packaging in the same room (including the maintainers of RPM at Red Hat and Novell and the authors/maintainers of APT, yum, alien, and klik) along with ISVs large and small, server and desktop. The discussion pretty quickly converged on constructing a single API that could be implemented across the various package systems, because APIs make for nice evolutionary steps and can, done right, mask underlying implementation differences. Question is, what do ISVs need in such an API? Limiting the scope is key here, because providing an API that spans all the functionality of, say, RPM and dpkg is overwhelming to the point of being unworkable, not to mention more work to implement, which in turn makes it less likely to get into the distros so that ISVs can count on it being there, the whole point of this exercise in the first place. Fortunately, the ISVs don’t really need much. At the most basic level, an installer just needs to be able to query the system to see if it’s LSB compliant, and if it is, what version of the LSB it’s compliant with; and it needs to be able to “register” with the package system, so the package system knows about it, including what files it has installed. And that’s really about it. Importantly, because we assume an environment that’s LSB compliant, we don’t have to worry about dependencies, because everything is covered by the single LSB dependency, and dependency management is 95% of the package systems right there. We still need minimal dependency support—components can extend the LSB, and applications can depend on those other components being installed—but we’re talking on the order of a handful of components, not the tens of thousands of components typical package systems have to deal with. We only had a day, so we obviously don’t have a complete solution yet. For one thing, we barely touched on the issue of uninstallation (should we allow applications to register GUI uninstallers?), and the issue of how applications go about changing the system configuration still needs discussion (in a lot of cases, the assumption of LSB compliance means the installer is going to be well behaved, but there’s undoubtedly corner cases to be explored). And it’s going to take time for the API to be implemented and put into widespread enough use that ISVs can depend on it. However, everyone in the room did come to consensus pretty quickly that this was an important problem, and that providing a simple API that provides the minimum necessary functionality was the way to go. Perhaps most exciting, the very people whose support are needed to put the API into widespread use were in that room, and active participants in the discussion too. Everyone is certainly motivated: The distros get more applications, which makes the shared platform more attractive; and ISVs get lower cost, which tilts the cost vs. benefit equation in their favor, making Linux versions more economically attractive and potentially opening new markets. Because this is just a start, the FSG is launching a Packaging workgroup to continue the discussion we started at the Packaging Summit. If you’re interested in this topic, I’d encourage you to join the mailing list and get involved. There’s still plenty to be done. Update: One more thing: In addition to making it easier for ISVs to better support Linux by simply extending their existing installation scripts, the API approach really comes into its own when you imagine it implemented in things like Autopackage and InstallAnywhere. Let the market decide!

18 December 2006

Erich Schubert: If only BibTeX (and LaTeX) were XML...

That would solve so many problems. LaTeX is still unbeaten in terms of print quality. It's really powerful. Since I've been using it, if started to really despise Writer and Impress. latex-beamer slides look just so much better than any PowerPoint presentation I've ever seen. However, it's far from easy to use. The syntax is a pain, and I don't think it's a feature that you can actuall program in this language. Similar things hold for BibTeX - there are so many things to do wrong there that will go a long way unnoticed. I've recently helped a friend to fix some BibTeX files. It was a pain, there was so much wrong in there... for example URLs. People noticed that they can't just always copy URLs in there, because some characters are special to LaTeX. But instead of using the \url macro, which would also have solved linewrap problem, they started doing the most obscure things (and of course they did not read the FAQ we wrote for them or asked how to do it right), for example adding whitespace to enforce line wraps, replace _ and & with whitespace etc., wrap uppercase chars in - an awful mess. The same thing with the author values. They just wrote "First author, second author" without considering that this might be interpreted according to the common "Last Name, First Name" scheme: e.g. "van Damme, Jean-Claude". (The correct syntax is "First Author and Second Author and Author, Third" - use "and" for separating even when you have more than two authors.) XML is better here. It's rules of escaping are generic and application-independant, and thus you'll have much more tools that know how to do it right, and you only have to learn it once, not for each application. The structuring also comes in handy:
  <authors>
    <author firstname="Foo" lastname="Bar" />
    <author firstname="Gnarf" lastname="Quux" />
  </authors>
is a bit more to write, but it avoids parsing errors. And with good utilies it's not particularly hard to write. Now don't point me to XML-FO. I know about formatting objects, the paper I submitted to the eXtreme Markup Languages conferences was done with FO. It's just that they don't come anywhere close to LaTeX in terms of print quality, the only OpenSource implementation I'm aware of didn't make much progress (but they seem to have released a rewrite in the meantime) and was lacking important features, and MathML has a horrible syntax mess (apart from Apache FOP not having MathML support). XSLT also has an annoying syntax. Too verbose and totally unreadable once you do things that are a bit more complex than the simplest examples. I wish we had something that gives a similar print quality to LaTeX, that uses some XML format (or something similar structured and easy to parse, like Xcerpt data terms, but thats basically equivalent to XML, just a bit more compact; Lisp S-expressions and OEM are other examples) that allows the easy creation of third party utilities and does away with all the black magic involved... Yeah, IMHO it's really time for a rewrite of LaTeX with a modern language design. And a large, unified standard library; plain LaTeX sucks, you can barely use it without extras such as url, hyperref, latex-beamer. [Update: yes, I'm aware of bibtexML, but it's just as bad, you still need hacks such as "the C language" or using "and" to separate multiple authors. I'm also aware of docbook and docbook to latex converters; that definitely is a workaround, but doesn't solve the real problems] (Comments in my blog are intentionally disabled. So if you want to voice your general dislike of anything with XML, abuse your own blog!)

14 December 2006

Clint Adams: First rule of triptych

[girl with green hump] [creature with tab drink]

10 December 2006

Jacobo Tarr&#237;o Barreiro: Electric shock

Last Friday I was tinkering with apcupsd and rrdtool and decided to join both: I’d monitor the mains voltage during a period of 24 hours, to see if it varied during the day. Well, apparently, it does. Mains voltage during Saturday, December 9th 2006 in Santiago de Compostela, Spain. To my untrained eye it looks like it varies with the load in the electric network: the voltage is at its highest during nighttime, and hits its lowest point at 13:30 (solar mid-day in Galicia); then rises again while people is having lunch then dips until after 18:00. The discontinuity at about 20:15 was due to my briefly stopping apcupsd to change a configuration in my UPS. Now, I don’t know if the mains voltage really varies so much during the day or if it is because my UPS’s voltmeter is a piece of shit (which it, apparently, is) and is affected by the presence of non-resistive loads or whatnot, but the graph is interesting anyhow. Detailed explanations by people who know more about electricity than yours truly will be appreciated. On an unrelated subject, I’m teaching myself how to juggle a reverse cascade. To do it properly, it requires better timing and more homogeneous throws than I’m currently able to do. So, to master it, I first need to suck less at juggling. We’re working on it.

8 December 2006

Russell Coker: SE Linux on Debian in 5 minutes

Following from my 5 minute OSDC talk yesterday on 5 security improvements needed in Linux distributions I gave a 5 minute talk on installing SE Linux on Debian etch. To display the notes I formatted them such that they were in 24 line pages and used less at a virtual console to display them. The ultra-light laptop I was using has only 64M of RAM which isn't enough for a modern X environment and I couldn't be bothered getting something like Familiar going on it.

After base install you install the policy and the selinux-basics package:

# apt-get install selinux-basics selinux-policy-refpolicy-targeted
The following extra packages will be installed:
checkpolicy libsemanage1 mime-support policycoreutils python python-minimal
python-selinux python-semanage python-support python2.4 python2.4-minimal
selinux-utils
Suggested packages:
python-doc python-tk python-profiler python2.4-doc logcheck syslog-summary
The following NEW packages will be installed:
checkpolicy libsemanage1 mime-support policycoreutils python python-minimal
python-selinux python-semanage python-support python2.4 python2.4-minimal
selinux-basics selinux-policy-refpolicy-targeted selinux-utils
0 upgraded, 14 newly installed, 0 to remove and 0 not upgraded.
Need to get 6362kB of archives.
After unpacking 41.5MB of additional disk space will be used.
Do you want to continue [Y/n]?

The package install process also configures the policy for the machine. The next step is to label the filesystems, this took 26 seconds on my Celeron 500MHz laptop with 20,000 files on an old IDE disk. The time is in proportion to number of files, often bottlenecked on CPU. A more common install might have 5* as many files with a 5* faster CPU so 30 seconds is probably common for labelling. See the following:

# fixfiles relabel

Files in the /tmp directory may be labeled incorrectly, this command
can remove all files in /tmp. If you choose to remove files from /tmp,
a reboot will be required after completion.

Do you wish to clean out the /tmp directory [N]? y
Cleaning out /tmp
/sbin/setfiles: labeling files under /
matchpathcon_filespec_eval: hash table stats: 14599 elements, 14245/65536 buckets used, longest chain length 2
/sbin/setfiles: labeling files under /boot
matchpathcon_filespec_eval: hash table stats: 19 elements, 19/65536 buckets used, longest chain length 1
/sbin/setfiles: Done.

The next step is to edit /boot/grub/menu.list to enable SE Linux, auditing, and put it in enforcing mode:

title   Debian GNU/Linux, kernel 2.6.17-2-686
root (hd0,1)
kernel /vmlinuz-2.6.17-2-686 root=/dev/x selinux=1 audit=1 ro enforcing=1
initrd /initrd.img-2.6.17-2-686

Then reboot.

After rebooting view the context of your shell, note that the login shell will have a domain of unconfined_t when the targeted policy is used:
# id -Z
system_u:system_r:unconfined_t

Now let's view all processes that are confined:
# ps axZ  grep -v unconfined_t grep -v kernel_t grep -v initrc_t
LABEL PID TTY STAT TIME COMMAND
system_u:system_r:init_t 1 ? Ss 0:02 init [2]
system_u:system_r:udev_t 1999 ? S.s 0:01 udevd --daemon
system_u:system_r:syslogd_t 3306 ? Ss 0:00 /sbin/syslogd
system_u:system_r:klogd_t 3312 ? Ss 0:00 /sbin/klogd -x
system_u:system_r:apmd_t 3372 ? Ss 0:00 /usr/sbin/acpid -c /etc
system_u:system_r:gpm_t 3376 ? Ss 0:00 /usr/sbin/gpm -m /dev/i
system_u:system_r:crond_t 3402 ? Ss 0:00 /usr/sbin/cron
system_u:system_r:local_login_t 3423 tty1 Ss 0:00 /bin/login --
system_u:system_r:local_login_t 3424 tty2 Ss 0:00 /bin/login --
system_u:system_r:getty_t 3425 tty3 Ss+ 0:00 /sbin/getty 38400 tty3
system_u:system_r:getty_t 3426 tty4 Ss+ 0:00 /sbin/getty 38400 tty4
system_u:system_r:getty_t 3429 tty5 Ss+ 0:00 /sbin/getty 38400 tty5
system_u:system_r:getty_t 3430 tty6 Ss+ 0:00 /sbin/getty 38400 tty6
system_u:system_r:dhcpc_t 3672 ? S.s 0:00 dhclient3 -pf /var/run/
The initial install of policy inserts modules to match installed software, if you install new software then you need to add new modules with the semodule command:

# semodule -i /usr/share/selinux/refpolicy-targeted/apache.pp
security: 3 users, 7 roles, 824 types, 67 bools
security: 58 classes, 11813 rules
audit(1165532434.664:21): policy loaded auid=4294967295
# semodule -i /usr/share/selinux/refpolicy-targeted/bind.pp
security: 3 users, 7 roles, 836 types, 68 bools
security: 58 classes, 12240 rules
audit(1165532467.874:22): policy loaded auid=4294967295

Note that the security and audit messages come from the kernel via printk, it is displayed on console login but you need to view the system log if logged in via ssh or running an xterm. Now you have to relabel the files that are related to the new policy:

# restorecon -R -v /etc /usr/sbin /var/run /var/log
restorecon reset /etc/bind context system_u:object_r:etc_t->system_u:object_r:named_zone_t
restorecon reset /etc/bind/named.conf context system_u:object_r:etc_t->system_u:object_r:named_conf_t
[...]
restorecon reset /etc/apache2 context system_u:object_r:etc_t->system_u:object_r:httpd_config_t
restorecon reset /etc/apache2/httpd.conf context system_u:object_r:etc_runtime_t->system_u:object_r:httpd_config_t
[...]
restorecon reset /usr/sbin/named context system_u:object_r:sbin_t->system_u:object_r:named_exec_t
restorecon reset /usr/sbin/apache2 context system_u:object_r:sbin_t->system_u:object_r:httpd_exec_t
restorecon reset /usr/sbin/rndc context system_u:object_r:sbin_t->system_u:object_r:ndc_exec_t
restorecon reset /usr/sbin/named-checkconf context system_u:object_r:sbin_t->system_u:object_r:named_checkconf_exec_t
[...]
restorecon reset /var/run/bind context system_u:object_r:var_run_t->system_u:object_r:named_var_run_t
restorecon reset /var/run/bind/run context system_u:object_r:var_run_t->system_u:object_r:named_var_run_t
restorecon reset /var/run/bind/run/named.pid context system_u:object_r:initrc_var_run_t->system_u:object_r:named_var_run_t
restorecon reset /var/run/motd context system_u:object_r:initrc_var_run_t->system_u:object_r:var_run_t
restorecon reset /var/run/apache2 context system_u:object_r:var_run_t->system_u:object_r:httpd_var_run_t
restorecon reset /var/run/apache2/cgisock.3558 context system_u:object_r:var_run_t->system_u:object_r:httpd_var_run_t
restorecon reset /var/run/apache2.pid context system_u:object_r:initrc_var_run_t->system_u:object_r:httpd_var_run_t
restorecon reset /var/log/apache2 context system_u:object_r:var_log_t->system_u:object_r:httpd_log_t
restorecon reset /var/log/apache2/error.log context system_u:object_r:var_log_t->system_u:object_r:httpd_log_t
restorecon reset /var/log/apache2/access.log context system_u:object_r:var_log_t->system_u:object_r:httpd_log_t

The -v option to restorecon causes it to give verbose output concerning it's operations. Often you won't do it in real use, but it's good to illustrate the use.

Now you have to restart the daemons:

# killall -9 apache2
# /etc/init.d/apache2 start
Starting web server (apache2)....
# /etc/init.d/bind9 restart
Stopping domain name service...: bind.
Starting domain name service...: bind.

Apache and BIND now run in confined domains, see the following ps output:

system_u:system_r:httpd_t   3833 ?     Ss     0:00 /usr/sbin/apache2 -k start
system_u:system_r:httpd_t 3834 ? S 0:00 /usr/sbin/apache2 -k start
system_u:system_r:httpd_t 3839 ? Sl 0:00 /usr/sbin/apache2 -k start
system_u:system_r:httpd_t 3841 ? Sl 0:00 /usr/sbin/apache2 -k start
system_u:system_r:named_t 3917 ? Ssl 0:00 /usr/sbin/named -u bind

It's not particularly difficult. I covered the actual install of SE Linux in about 1.5 minutes. I had considered just ending my talk there on a note of "it's so easy I don't need 5 minutes to talk about it" but decided that it was best to cover something that you need to do once it's installed.

If you want to know more about SE Linux then ask on the mailing list (see http://www.nsa.gov/selinux for subscription details), or ask on #selinux on freenode.

Erich Schubert: British now divide by zero?

British now divide by zero. Either this "Dr James Anderson, from the University of Reading's computer science department" is a crappy computer scientist (not to speak of his mathematical skills), or this is a case of really bad journalism. Apart from having some facts wrong (infinity and -infinity aren't numbers, they're symbols outside of the numbers), he basically defines "0/0 = Nullity". Well, some of us might prefer the name "NaN" for this. "Not a Number". In floating point calculations, 0/0 may (if you've disabled exceptions) return NaN. So it is nothing new. And it's not particularly useful either, because all it solves is not having to raise an exception, but being able to continue your calculations (which will continue to return NaN) and handle the error at the end. With modern languages designed around exception handling, this of course is rarely ever used anymore. Some simple calculations you might find convincing: 2 * Nullity = 2 * (0/0) = (2*0)/0 = 0/0 = Nullity Nullity + 1 = (0/0) + (1/1) = (0*1 + 1*0)/(0*1) = 0/0 = Nullity Nullity / Nullity = (0/0) / (0/0) = (0/0) * (0/0) = (0*0)/(0*0) = (0/0) = Nullity So if you ever have Nullity anywhere in your equation the whole equation equals nullity. There is no way to remove Nullity from your results, since even Nullity/Nullity is Nullity. So you could just call it "I divided by zero, so the result is invalid". Thats probably not as pretty as "Nullity", but as useful. Some simple calculation, why you must not be allowed to divide by zero (independently from any nullity or whatever):
1*0 = 0 = 2*0     (This equation is right, isn't it?)
1 = 2             (I divided by 0 on both sides, removing the *0 factor)
This works for any number, not only for 1 or 2. So: if you divide by zero, all your numbers are equal (if you keep standard calculus rules such as associativity, distributivity etc. used in above equations). If that is okay for you, then you can divide by zero. I do prefer having 1 life to 0 life. And if 1 = 1000000, can you give me $1000000, I'll give you $1 back tomorrow... But: Maybe it's just a bad piece of journalism. He's a computer science guy. Maybe he knows about NaN. Maybe he's just trying to teach kids to use NaN when calculating, instead of teaching them to never divide by zero. There might be didactic benefits from this approach. The 1200 year old problem (Pythagoras, cited in the article lived 2500 years ago, I have no idea how they made up this number) IS easy to solve, if the result is called "invalid" instead of just having no valid result... That won't make your airplane land better, if it notices it's current height is Nullity... and what if his heart pacemaker obtains a result of "nullity", what is it supposed to do (as opposed to noticing it miscalculated?) [Update: he has published papers on this, too. Unbelievable... So above theory that it maybe is good for educational purposes is incorrect. Anyway, journalists shouldn't have reported on this without talking to some serious mathematicians...] [Update: Zoy, thats why I wrote "if you keep standard calculus rules such as associativity, distributivity, etc. - and I find these exceptionally useful. The last example is not using his rules, but standard math, but treats zero like all other numbers, to show that a canonical extension will just not give useful results. My whole point is NOT that you can't define 0/0=Nullity, but that it's not compatible with the standard calculus we're used to and relying on.]

6 December 2006

Mario Iseli: Planning my holidays, stop smoking and other projects

Hello :-) (first of all, there are new pictures of me)
I think it’s time for another blog, because I have at the moment many different projects. My prio 1 project is the new proxy server which I would like to install in the office (about 500 users) which should have complicated ACLs and SquidGuard for content filtering, a virus scanner would also be very nice. I plan to authenticate the users via winbind on Microsoft ActiveDirectory (I already blogged about it some months ago) and the embedded systems should have special rules which don’t require an authentication. I also had a look at dansguardian because the people from the AIO use this solution, but I don’t think that it’s possible to auth against AD with it and I have no experience with dansguardian. The next problem is with the downtime, I should not have any if possible. This means that I will copy the system of the old proxy into a VMWare-Machine in the intranet and NAT the public IP of the proxy to it when it’s ready. And in this time I can easily setup the new proxy on the physical proxy-machine. Then my next project is for the school - we have to write a management tool (including file-databases) for network devices such as switches or routers, I think this will be a quite funny task and 2 months are IMHO enough time. The cool thing is that we need something like that on my workplace so we will be able to use it. My program also will be licensed under a free license and maybe I will build a debian package if the upstream software is in a good shape. Then the next (maybe less important, but important for my health) project is finally stop smoking. I really didn’t think that this is so difficult because I’m not a “i need it every 2 hours”-smoker, I only need it in the evening when I come home to relax a bit and this is really quite difficult. Then my last (really hard ;-) ) project is planning my holidays, I didn’t use them since summer of this year and until next august I can have 5 weeks + the days from christmas until 3rd January, so my plan is the following: 15.12.2006 Last workday 26.12 - 30.12 23c3 in Berlin 31.12 - 1.12 Snowboarding in the mountains and sylvester party with friends Then in february 2007 I will go again snowboarding for a week somewhere And in june 2007 my last holidays for this year where I’d like to visit Debconf7 (depends if I get sponsoring for accomodation and food or not, you know… I’m still a student and edinburgh isn’t really cheap). I hope this will be my last article without the hackergotchi included, I’m not a graphics-guru so I asked in #debian.de some minutes ago and Markus Gloor made one for me, biggest thanks!

John Goerzen: Insurance

I was visiting with our homeowners insurance company the other day (very good folks). Because we weren't living in our house during renovation, we had to get a more expensive type of policy. The agent that sold it do is is no longer with the company, so the new person handling our account asked me, "Why did he want you to get this policy?"

"Well, he said it was because we weren't living there." Then I suddenly remembered the rest of what he said, and couldn't help cracking up. "Plus, he said that if something like a fire happened, people might not notice."

What can I say. Psychic insurance salesman.

On that note, I was having a discussion with someone about large windows on a house. That person was saying that "everyone" always puts their large windows on the front (or back of their house, I forget which) so that potential burglers are easier to spot. He was concerned about where we were putting windows on our house.

This had never occured to me.

But I pointed out that our yard was on fire and nobody noticed for hours. What difference would it make where our windows are?

"Ah, good point," he said.

On that note, you ought to check out rush hour in the country. Truly this is a lot of traffic for roads around here.

3 December 2006

Zak B. Elep: Who moved my sundae?

WTF IS THIS SHIT? Ok, that above would be what a newly-baptized “FOSS advocate-slash-zealot” would say upon seeing Federico Pascual Jr.’s PostScript regarding the FOSS bill. I suppose I could have said that myself a couple of lifetimes ago. But, there is more than meets the eye. While I would like to think of myself as a “FOSS veteran”–believe me, I have still so much to learn about it–I would like to step into the shoes of such a person when approaching an article as sensational as Mr. Pascual’s. Despite what seems to be a most interesting article on the mechanics of government software usage, it fails to address the one particular bit that is just as important as the proposed bill itself: the real Free and Open Source Software. Let me nitpick this article bit by bit:
FREE RIDE: A bill is being pushed in Congress forbidding all government agencies and state-controlled firms from buying and using any of the computer software sold in the market!
Alas, when I first heard of the FOSS bill sometime before September, I also had a bad impression of it. Perhaps I was just too politically allergic at that time (yeah right,) but I tried to adopt a wait-and-see’ approach first and let the dice roll. Perhaps because this bill was to be introduced by a very visible congressman with alleged leftist ties made me feel uncomfortable, but then, so was (and still is) with the current administration. Or perhaps I just felt it wasn’t damn right to legislate FOSS as an end-all solution, preferring instead of presenting is as a process for reforming the local software industry. Looks like first impressions definitely make a difference.
The proposed law to be called “Free/Open Source Software (FOSS) Act of 2006″ commands government offices to use only information and communications software that are given away for free and have no restrictions as to their use. The objectives appear to be to save money for the government and to encourage the making of free (non-commercial) software.
So? What’s wrong with these objectives? FWIW, the early FOSS bill draft did seem to have such a Draconian section as forcing the government and allied offices to use, and use only, FOSS. IMHO that by itself ran against the very fundamental ideal of FOSS: the freedom of choice. Not Hobson’s choice, but real choice. The current bill IIRC now allows this true choice; unless there is an extreme case where FOSS cannot be applied without becoming non-self-sustaining (not to mention self-liquidating,) agencies may implement their infrastructure using FOSS as their primary instrument, with the application of open standards (that is, open document formats, open communications protocols, etc) unifying the disparate components. Perhaps right now, this situation may seem kind of far-fetched, but its not really that far-off, considering what other nations and cities have done (or not done) with FOSS. Munich, Extremadura, Beijing… the list is not yet that long, but its bound to go a long way ;-) Now, while the government may now adopt open standards and open-everything, does not mean that the openness’ forgoes security, either; the government may opt to use well-known encryption protocols and even base their own security infrastructure on them. In fact, they are free to even look inside the source of these well-known standards, to study them, and to branch off new implementation that may even change the way these standards work. In fact, even without this bill in place, the government can participate in the production and development of FOSS!!! Wait a minute, wasn’t I supposed to defend this bill? Eh, well. I suppose this bill is good and all, but like I said earlier, there are those first impressions made by the parties involved in the making of this bill which unsettles me. IMHO I would rather see applications of this first in key cities (the happy works in Munich and in Extremadura are no accident, believe me) which in turn, would allow both local the national government to see just exactly how this FOSS magic works. Then, when the observations have been made, the papers are in, and the workers get hired, then, maybe, we’ll have a nation where FOSS can be mandated as a very strong preference, but never a forced one. Its all about growing up, really. I’m being reminded of Tom DeMarco’s The Deadline, where a newly-retrenched guy from a telco literally lands into the fantastic job of his life, managing an entire nation of software engineers and architects to develop several killer apps within a year (or so; raid you nearest Book Sale and be lucky ;) Its a great experiment: when it succeeds, you’ll be the first to be present, but when it fails, you’ll be the first to be nowhere.
But I can also hear in the background a call to an unholy war against multinationals whose popular software run virtually all maybe 95 percent? of the computers of the world.
Now this is a low blow. Maybe partly because of the prevailing images of the advocates–geeks and leftists, my, what a c-c-c-combo!–is what drives Mr. Pascual to make this point. But really, multinationals are not the main concern. FWIW, FOSS is multinational in nature: it is even multi-denominational and multidisciplinary. FOSS is one of the things that make anonymous people like you and me Internet superheroes. FOSS connects the Internet’s tubes and keeps away the trucks. FOSS makes the Internet serious business, yet also drives them crazy. The Linux distros that I have worked, am working, and continue to work on, are all multinational: Debian and Ubuntu. People from all over the world, from all 7 continents, participate and work on what would arguably be the biggest software distribution the human world may ever produce, freely, regardless of motivation or goal. I suppose all the folks involved have only one common goal, and that is to see a work created for the benefit of the community by the community. I suppose the background howl comes from somewhere altogether, but its hardly just from FOSS. FOSS is the epitome of what is truly multinational, and one thing that is not truly controlled by any one single person, corporation or not.

Amaya Rodrigo: Amayita in ProzacLand

[Absolutely nothing related in any way to Debian or Free Software here, so you can just skip ahead]

As some of you may be already aware of, I suffer from OCD, in a very mild form. If left untreated for long enough time, in my case it was years, it leads to depression. A good one. You can end up in Learned Helplessness Land, where your closest companion will be your inner voice, constantly criticising you, blaming you for anything that happens, I even used to believe I brought bad luck to the people I was with or met.

I strive for perfection, and the world is not perfect, not everything is under my control, and OCD is just a jail. In my case it is cleaning and re-arranging stuff. My perfectly shiny jail.

Some of my friends think it is so bourgeois that I have a person come clean my house every week. Maybe they do not understand that I can t clean, because I can t stop. The same way an ex-addict can t take $SUBSTANCE_OF_CHOICE. When I get stressed I tend to clean, and when I start cleaning I just don t stop. One stupid example of how ridiculous it can get: doing the laundry in an empty laundry machine so that it is clean inside. I can kill my plants by watering them too much, specially Cactus, dist-upgrading all my machines every morning, and then several more times a day, even if i know there will be no updates available at all.

And while I am doing it, I don t enjoy it. I can t stop, control it or decide anything. I follow very strict rituals, things have to be the right way, following a very complex set of rules that make sense to no one else but me. Well, not even me. But I have to, I don t choose to, and that is where the jail comes from.

I think it all comes from my childhood, in a very chaotic household, at a deeply disturbed family, with an abusive, alcoholic father and a very overwhelmed mother, the only thing I could control in my life was that my room was clean and arranged, as opposed to the rest of the house, and my homework perfect, as opposed to the rest of my life. The same way anorexics feel in control when they let themselves starve to death, because they control the food they eat, their hunger and their bodies.

My father also turned up to be psychotic, manic-depressive, and what not. When my mother finally forced^W helped him to stop drinking, I had this hope that things would be fine, but they didn t really improve. I was eleven. At the beginning it was the drinking, then the mental illness, then the aging, but my worst fear has always been to become him. To do onto others what was done to me. When I was 16 I already knew I would never have kids. I can t even bear to think that I could fuck up the way my family did. I can t even bear the thoughts of passing these genes onto an innocent baby. I specially hate the idea of bringing a new baby into this fucked up world, with so many kids out there so helpless, as myself as a kid, that nobody wants. I would definitely adopt a kid one day, if I was sure I would not repeat certain behaviours on him/her. If a doctor would put it in writing with his own blood.

In 2004, wanting to kill myself, even with a well thought plan and a written unofficial will (who gets my laptop, who gets my clothes, who gets my money, and so on) I went into treatment. Some of you might remember I was kind of MIA at the time. I was on Prozac, tranquilizers, and a year and a half therapy later, I was fine. I was even happy! That was by Debconf 5, after being fired from a job that was hurting me, giving up a 15 years relationship that had become unhealthy for both of us, the death of two very dear friends, and other looses not worth mentioning in this blog post that already gives too much away, I was finally happy. My life radically changed, my jail was almost gone, my fears were under control, I was finally free.

But, recently, a very dear friend of mine got sick, not any near what my father was or had ever been, but I saw myself in a mirror. My worst fears paralyzed me. My inner voice whispered I would end up being him. Again. And again. And some more. So I had to fight my I can do this alone pride, called my doctor and I am back on all the crap that will probably fuck my brain chemistry in the long run, and back on therapy, which is the only resource that will be really helpful for my life. I am not as bad as I once was, and it is going to be much easier this time, but I am scared as hell, because I though this was gone forever. But my friend got sick, and I had a stressful couple of months at work, and (yay!) I started cleaning again.

My physical health is also reflecting what I am going through. I am in a very acute UTI episode. The amount of pills I take in the morning is getting scary now. The pain and the burn are hardly bearable, and I have become unwillingly an early riser. I wake up at 5:30 or 6:00 am, and go to bed somewhere between 8:00 and 10:00 pm. One of the side effects of the painkillers is I can t really focus my sight at the moment, so my computing is painful and limited.

Being unable to concentrate on the computer I engaged in compulsive house improvement.

* I changed every light switch and power outlet in the house without turning the power off. Dangerous? Sure. Am I proud of my new skill? You bet!

* I revamped a very old and crappy piece of furniture I found in the trash. When the lady that cleans for you has a better cell phone than you, and you can t afford new shoes for the winter, you start looking at the stuff other people throw away in a different way. In a very different way.

* I lost ten kilos, and the clothes I wore to Brazil fit again. I am fixing the broken bits, because I can t really afford to get clothes of my new size anymore either.

Some pics of my achievements (some work is still in progress):



You might have noticed my web server is down at the moment. I hope this post explains why I am timing out. My server is called aenima, latin for soul, and quite incidentally.

2 December 2006

Jaldhar Vyas: The Real Meaning of Nalanda

Venkatesh Hariharan recently wrote an article on Indias traditions of knowledge and how Open Source meshes with them. Now having met him at foss.in and knowing of his work, I am 100% convinced he is on the side of the angels and their is no malice in what he wrote. However, his interpretation (really not his, but the conventional wisdom amongst the Indian elite.) of Indian history and culture is so monumentally wrong it bears correction. While I admit my hackles were raised by the cultural and theological mistakes made, there are implications for Open Source advocacy in India and the world at large too. He starts by giving the example of Nalanda, supposedly "the first university in the world." but more accurately a Buddhist vihara (monastery.) Its' very name indicated sharing. I use the past tense because Nalanda doesn't exist anymore. In fact except in a few border areas influenced by Tibet or Burma, Buddhism itself is so thoroughly extinct in the land of its birth, the place where it flourished for over 1500 years, that the only reason people like Hariharan or myself only know that there ever was such a thing due to the work of 19th century Western Indologists. How could this be? One theory is that a resurgent Hinduism coopted or persecuted the Buddhists into oblivion. However this is unsatisfactory. It does not explain why Jainism (a religion as old as Buddhism and equally heretical for exactly the same reasons from the Hindu point of view) still survives to this day and it doesn't explain how it could have happened for even the most advanced genocidal regimes of the 20th century have been unable to "disappear" undesirables to the extent which Buddhism disappeared. A more plausible explanation revolves around the fact that, as I mentioned before, places like Nalanda were Viharas. This doesn't mean that they can't have university-like properties too; after all the great academic institutions of Europe also had religious foundations but the monastic nature of a vihara is salient. A monastery is not a place you go to engage the world, its a place you go to escape it. To mix metaphors a bit, the viharas were cathedrals not bazaars. While there may have been a lively intellectual life within its walls, there is no evidence that Nalanda and its denizens interacted much with the surrounding culture. An economically unproductive institution of such vast size (15,000 monks at its peak) could only survive by the patronage of kings and other rich people. When that patronage dried up as for example when the medieval Muslim invasions swept away the old royalty, Nalanda and its sisters couldn't survive. Just as when a proprietary software company dies, its "intellectual property" often dies with it, when centralized Buddhism died, Buddhist ideas died with it. (Luckily Buddhism had spread to other countries by then and developed new, less monolithic forms so it was not lost to the world altogether.) In contrast Hinduism (and for that matter Jainism) while having all due respect for monks were and are primarily lay movements. The pursuit of morality (Dharma), wealth (artha) and pleasure (kama) in this world are equally valid human goals alongside liberation from the world (moksha.) and this manifested as the much maligned institution of caste. Hariharan quotes the conventional view probably familiar to Westerners from Anthropology 101, a lock-step hierarchy of four classes (varna is the Sanskrt word) with fixed occupations, with knowledge and privilege on top and ignorance and oppression at the bottom. The thing is, this view bears no relationship whatsoever with social reality in India now or historically. There is another Sanskrit word, jati, which can be translated as caste. There are thousands of these jatis and while Indian thinkers have periodically attempted to try and shoehorn them into the varna framework, they have had little success and varna is for all practical purposes just a theory. And this is not just a fall from some putative golden age (Like the canard that once caste was flexible and merit based and only later became rigid.) but the state of affairs throughout recorded history.

A jati consists of people who share a common (or fictive) kinship, who have particular food and ritual choices, and marry endogamously. While many jatis are associated with a particular occupation, many others are not. This is what caste means to a typical Indian (it is also the social organization prevalent amongst Jains, Sikhs, Muslims and Christians even if they don't accept its theological basis.) Yes, hierarchy and concommitantly oppression, are in some cases a byproduct of casteist thinking but they are hardly its raison d'etre. A comparison can be made to the Western nuclear family system. Some people think it is superior to any other form of social organization. Most people wouldn't go that far but go along with it as "the way it is." Some of those of a liberal persuasion might want tweaks of certain aspects of it. A very small fringe think it is nothing more than a nefarious plot to spread patriarchy, subjugation and racism etc. They are mostly considered kooks by the other groups. (Unfortunately when India and caste are concerned, the kooks are ruling the roost.) The diversity of jatis like the diversity of open source creates a certain resistence to disruption that a monoculture cannot. Thus though Hinduism also suffered grievously from invasions, it was able to hold on where Indian Buddhism could not. Brahmin (sic. That's an English mispronounciation.) is also misinterpreted as one who knows Brahma (masculine noun. The Creator God.) instead of Brahman (neuter noun. The supreme spirit pervading the Universe.) though even then it would be wrong because Brahmin, Brahma, and Brahman all come from a common root word brhati (feminine noun. Sacred speech.) as any Sanskrit dictionary will attest. Hariharan cites the example of the sacred scriptures (Sic. He means the Vedas) and the notorious statement of the Manusmrti saying that an unqualified person who hears them should have molten lead poured into their ears as examples of the proprietarization of knowledge. Now the long-suffering untouchables may have been afraid of many things but having lead earplugs was not one of them. There is no historical evidence that any such action was ever attempted. You can criticize the Manusmrti for even saying such a thing but that is a far cry from using it as evidence of historical attitudes. You see, the Manusmrti is not even in the most orthodox conception Hindu Sharia and the Vedas are not "Sacred Scriptures" in the sense that the Bible or Koran are. Rather they are part of a wide range of significant literary works respected in Hinduism of which other important examples are the two Epics the Mahabharata (which includes the Bhagavadgita), and the Ramayana, and the vast compendia of geneologies, philosophy, lore and legend called the Puranas. Hariharan actually missed a good chance to make his point here because while the Vedas are indeed "proprietary" the other works I mentioned are not and have in fact permeated all over India and even beyond its borders. Many Indian languages owe their literary existence to translation of the epics or Puranas. For instance one of the earliest monuments of Hindi literature is the Ramacharitamanasa, Saint Tulsidas's translation of the Ramayana. When he wrote it in the 16th century, he did face some opposition from those who didn't think such an august work should be rendered into a "vulgar" tongue, he also received encouragement from equally orthodox people (including those who believed the Vedas should be restricted to Brahmins) Today it is by many accounts the most popular Hindu holy book in existence. So really the whole idea that the Hindu canon shows a fall from open grace to rigidly controlled private property is just bogus. To those who have slogged their way though all this verbiage wondering what it has do with Linux and Open Source, let me assure you I am getting to the point :-) It's bad enough from my point of view as a devout Hindu that my religion would be misrepresented this way but from my point of view as a supporter of Free Software ideals, it is catastrophic. Linux and Open Source in India has spread, as in most parts of the world, primararily as a hobby amongst computer enthusiasts and for a hobby it's doing ok. However if you think of it as more than that, as a tool to enhance society and empower peoples lives, that is not nearly good enough. But how can one serve a society if one apparently has no clue about that societies history and mores? The developing world is littered with failed projects that were carried out with the purest of motives but no regard to what the putative clients actually wanted. Do we want Linux and Open Source deployments to go the same way? For a couple of years now I've been trying to get Indian and NRI programmers to get involved in localization in debian-installer and elsewhere but even with the small minority that are sympathetic to Open Source (a scandal in itself.) it is like pulling teeth. To their credit, Red Hat India pays people to work on such things but volunteerism is the heart of the Open Source movement as we all know so the apathy of Indian IT professionals is deeply troubling. Hariharan is trying to increase interest by appealing to the Indians' sense of cultural pride which is a good tactic--it has been successfuly applied by many non-western or minority cultures--but he is not going to be very successful if the vision of Indian culture he is presenting is as alien as Eskimo culture to the vast majority of the people. Western Open Source advocates also run into difficulties due to being tone-deaf in their understanding of how third-world cultures actually operate. When India declined to participate in the One Laptop Per Child (OLPC) project, some commentators on places like Slashdot were perplexed. Wouldn't a poor country want an inexpensive yet efficient pc using free software instead of high-priced imports? The thing they missed is that while people in India may be poor, thanks to a more-or-less democratic polity and more-or-less open communications, their frame of reference is no longer their village. Their trends are increasingly set in Mumbai, New York, Paris, and London. The forward-thinking amongst them know that computers are the key to the future. They also know Bill Gates is the richest man in the world thanks to something called "Windows" knowing which can get you a green card and your own chance of becoming rich. So if Linux comes along, presented as a cheap alternative which is "just as good", the fake Gucci handbag of IT if you will, it is not going to impress. Thinkpads and Dells appeal to the upwardly-mobile persons vanity, a third-world hand-cranked laptop does not. (This incidently is what is behind the "Nalanda university" meme too. Monasteries are yesterday. Universities are the in thing so we have to have some in our past and not just any but by golly, the first university in the world.) When they venture from pure technology into the realm of culture, Open Source advocates need to be a lot more sophisticated, not to mention accurate, in their arguments lest they fall on deaf ears. Platitudes and sentimentality about "spiritual" versus "material" culture aren't enough. There must be concrete demonstrations of the benefits of why the Open Source approach to knowledge is better. They must be more sensitive in their presentation to avoid needlessly antagonizing people who might otherwise be natural allies. I believe the Open Source ideal is good for India and the whole world, not just in software but for society at large and I wish Venkatesh Hariharan and all the others on the frontlines of the fight for openness the best of luck. But good intentions cannot excuse sloppy thinking.

1 December 2006

Julien Danjou: DeFuBu contest #5

Bug Welcome to this 5th issue of the DeFuBu contest, the monthly championship of the funniest bug reported to the Debian BTS. The challengers How the vote has been done Four Debian related people voted for these bugs, Philipp Kern, Julien Louis, Cyril Brulebois and David Pashley. Full ranking Bugs Challengers The winners Congratulations to Joey Hess, two victories in a row :-) Notes To participate, simply drop me an email with a bug number. About DeFuBu

30 November 2006

Ben Armstrong: A pcsx mythgame player using xautomation

Scripting a gui tester for Tuxpaint with xautomation was fun and quite useful too, but really only appeals to developers. Today I found use for xautomation that will appeal to sys admins and users: hacking around a user interface that refuses to work the way it ought to. I wanted to add another mythgame player, this time for the pcsx-df Playstation emulator. Unfortunately, I couldn’t pass it a CD image from the command line. It seems to know only how to do two things: run a game file, or run a real CD. My best guess is that it doesn’t know its plugins until the GUI starts, so it is unaware that it ought to be able to use the cdrmooby plugin to load the specified image when it is parsing the command line. After a brief and fruitless grep through the source, it dawned on me that I could put xautomation to work for me to do the job in much less time. Here is the resulting startpcsx script, which sucessfully operates as my pcsx mythgame player.
#!/bin/bash
slowtype ()  
   echo "$@"   sed -re 's/(.)/\"str \1\"\n\"usleep 15\"\n/g'
 
pcsx &
xte "sleep 2" "keydown Control_R" "key o" "keyup Control_R" "sleep 1" 
slowtype "$@"   xargs xte
xte "key Return" 
The hard part was that pcsx is afflicted by one of my pet peeves, a typeahead find that cannot be disabled. As a result, if you make xte type at full speed into the open file dialog, the filepath comes out all jumbled up. This happens because the filepath is constantly being redrawn as xte types characters, so the cursor isn’t always at the end of the line. The usleep 15 allows the cursor to reach the end of the line before typing the next character. Of course, this is truly a hack, subject to variations in timing between systems, so if you use it, you may have to tweak the sleep and usleep values. But it works well enough as a workaround until pcsx-df is fixed to accept a CD image on the command line.

Jorge Salamero Sanz: Blog Voyage

Blog Voyage is a game begun by bashflyng with the following rules: you have to travel along the world and along the blogs. You choose a place: a city, a town, a building, a river, a mountain ... The only clue is a picture of the place from Google Earth. The first person to guess the answer gets to choose the following voyage in his blog. This is the current roadmap: Well, here we go: blog voyage UPDATE: george wins. It's New Zealand, the Mount Ruapehu.

Next.

Previous.