Bit late to say week commencing yesterday, but never mind! Last week continued the tradition, this summer at least, of unending hot, sticky days.  Regardless, it was a good week for many reasons, though perhaps not the best in history 🙂

Last week:

Work

  • [-] SEO customer project
  • [-] Database update customer project. Test out Kexi
  • [-] PHP calendar development for customer
  • [X] Visual design/template revision work for customer
  • [ ] Get list together of targets for Project “L” and plan launch
  • [X] [Arrange to] visit datacenter for scheduled maintenance – the machines, not me 🙂
  • [ ] Create additional web forms to service other business areas
  • [ ] Minor company homepage change
  • [ ] Review structure of site and content; trim.
  • [ ] Complete SVN/Bugzilla integration project.

I have continued to make more progress on project “W”, such that it’s starting to take on momentum of its own.  With luck, August will see it come to fruition.

Life

  • [ ] Tax return
  • [ ] Siu Lim Tao / stretching
  • [ ] Properly start my involvement in an open source project
  • [X] 2 swims, 1 mile each
  • [ ] One more form/session of exercise (run? weights?)
  • [X] Grocery shop
  • [X] Social life 🙂

I took to playing with Android on my Samsung Omnia during the weekend.  Linux (the OS in general, not just the kernel) is so hackable it’s great.  Managed to work around a low memory condition issue.

Misc

Saw:

This week:

Get back on track!

Work

  • [-] WAITING: SEO customer project
  • [ ] Database update customer project. Rebuild Kexi from source and test after a fix from lead developer
  • [ ] WAITING: PHP calendar development for customer
  • [ ] Visual design/template revision work for customer
  • [ ] Get list together of targets for Project “L” and plan launch
  • [ ] Create additional web forms to service other business areas
  • [ ] Minor company homepage change
  • [ ] Review structure of site and content; trim.
  • [ ] Complete SVN/Bugzilla integration project.

Life

  • [ ] Tax return
  • [ ] Siu Lim Tao / stretching
  • [ ] Pick up files for F/LOSS project and start documenting…
  • [ ] 2 swims, 1 mile each
  • [ ] Some personal correspondance/organisation to be achieved.
  • [ ] Social life 🙂
  • [ ] Looking forward to meal with family friends this weekend

Misc

Would like to see more:

    Last week was fantastic. Lots of stuff achieved, plus a few blockers along the way which have spilled over into this week and new challenges. To top off last week, a close friend of mine had a great birthday BBQ on Saturday and then became a father on Sunday. Congrats to them!

    Last week:

    Work

    • [X] Development work on 2 customer projects
    • [X] Stay in touch prospective clients/leads
    • [ ] Get list together of targets for Project “L” and plan launch
    • [X] Review charity project costings: is there a more cost-effective approach?
    • [ ] [Arrange to] visit datacenter for scheduled maintenance – the machines, not me 🙂
    • [ ] Create additional web forms to service other business areas
    • [ ] Minor company homepage change
    • [ ] Review structure of site and content; trim.
    • [ ] Complete SVN/Bugzilla integration project.
    • [X] Complete new cashflow tool.

    ** DONE Investigate why CentOS box is looking for dpkg (Debian packager) in cron job
    ** DONE Revise Project “W” PDF
    ** WAITING Put project “W” site online?

    Life

    • [ ] Tax return
    • [-] Practice Siu Lim Tao and stretching
    • [X] Clean house
    • [X] Try to get a bit of Family Guy in

    ** DONE Clean car

    Misc

    • [X] Decide on Slovakia trip
    • [X] Learn GnuCash
    • [X] A few more CDs to add to the collection

    This Week

    Work

    • [ ] SEO customer project
    • [ ] Database update customer project. Test out Kexi
    • [ ] PHP calendar development for customer
    • [ ] Visual design/template revision work for customer
    • [ ] Get list together of targets for Project “L” and plan launch
    • [ ] [Arrange to] visit datacenter for scheduled maintenance – the machines, not me 🙂
    • [ ] Create additional web forms to service other business areas
    • [ ] Minor company homepage change
    • [ ] Review structure of site and content; trim.
    • [ ] Complete SVN/Bugzilla integration project.

    An unscheduled but important piece of work is also project “W”. I have made significant progress on this over the weekend and need to keep the pace up!

    Life

    • [ ] Tax return
    • [ ] Siu Lim Tao / stretching
    • [ ] Properly start my involvement in an open source project
    • [ ] 2 swims, 1 mile each
    • [ ] One more form/session of exercise (run? weights?)
    • [ ] Grocery shop
    • [ ] Social life 🙂

    Misc

    Would like to see more:

    Didn’t note in enough detail the unplanned tasks that I had to tackle last week. Am planning this week to note down the things which sidetrack me from the main goals.

    Last week:

    Work

    • [X] Support major customer project
    • [-] Development work on 2 other projects
    • [-] Stay in touch prospective clients/leads
    • [-] Kick off charity project
    • [-] Expedite tasks that are currently “WAITING”
    • [X] Clean up customer/supplier records on CRM tool
    • [-] Set up virtual machines
    • [ ] Create additional web forms to service other business areas

    Life

    • [ ] Tax return
    • [-] Practice Siu Lim Tao and stretching
    • [X] Clean house

    Misc

    • [X] Finish FLAC’ing CD collection
    • [-] Learn GnuCash

    This Week

    Work

    • [-] Development work on 2 customer projects
    • [-] Stay in touch prospective clients/leads
    • [ ] Get list together of targets for Project “L” and plan launch
    • [ ] Review charity project costings: is there a more cost-effective approach?
    • [ ] [Arrange to] visit datacenter for scheduled maintenance – the machines, not me 🙂
    • [ ] Create additional web forms to service other business areas
    • [ ] Minor company homepage change
    • [ ] Review structure of site and content; trim.
    • [ ] Complete SVN/Bugzilla integration project.
    • [ ] Complete new cashflow tool.

    Life

    • [ ] Tax return
    • [-] Practice Siu Lim Tao and stretching
    • [ ] Clean house
    • [ ] Try to get a bit of Family Guy in

    Misc

    • [ ] Decide on Slovakia trip
    • [-] Learn GnuCash
    • [-] A few more CDs to add to the collection

    Summary:

    Last week was a bit short, as I went on my little surf expedition early Thursday afternoon. So I’ll forgive myself for not putting X’s in all the boxes.

    From last week:

    Work

    • [-] Stay in touch prospective clients
    • [-] Kick off charity project
    • [-] Expedite tasks that are currently “WAITING”
    • [X] Complete 2nd quarter accounts
    • [ ] Clean up customer/supplier records on CRM tool
    • [ ] Set up virtual machines
    • [ ] Create additional web forms to service other business areas

    Life

    • [ ] Tax return
    • [X] Light grocery shop
    • [ ] Practice Siu Lim Tao and stretching
    • [X] Surf trip
    • [X] Clean house

    Misc

    • [ ] Finish FLAC’ing CD collection
    • [ ] Learn GnuCash

    This week:

    Work

    • [ ] Support major customer project
    • [ ] Development work on 2 other projects
    • [-] Stay in touch prospective clients/leads
    • [-] Kick off charity project
    • [-] Expedite tasks that are currently “WAITING”
    • [ ] Clean up customer/supplier records on CRM tool
    • [ ] Set up virtual machines
    • [ ] Create additional web forms to service other business areas

    Life

    • [ ] Tax return
    • [ ] Practice Siu Lim Tao and stretching
    • [ ] Clean house

    Misc

    • [ ] Finish FLAC’ing CD collection
    • [ ] Learn GnuCash

    Inspired by a well-known figure online, I have decided to imitate her style with a weekly [p]review blog. It is a review of the previous week, and a preview of the coming week. I will try to capture tasks that I want to see complete plus the unexpected events that everyone gets in a typical week.

    From last week:

    This is my first weekly review, so there’s nothing to see here yet!

    This week:

    Work

    • [ ] Stay in touch prospective clients
    • [ ] Kick off charity project
    • [ ] Expedite tasks that are currently “WAITING”
    • [ ] Complete 2nd quarter accounts
    • [ ] Clean up customer/supplier records on CRM tool
    • [ ] Set up virtual machines
    • [ ] Create additional web forms to service other business areas

    Life

    • [ ] Tax return
    • [ ] Light grocery shop
    • [ ] Practice Siu Lim Tao and stretching
    • [ ] Surf trip
    • [ ] Clean house

    Misc

    • [ ] Finish FLAC’ing CD collection
    • [ ] Learn GnuCash

    Well, thank the heavens. It finally happened. Google saved the web.

    The Register reports that Google has released the VP8 video codec which it gained last year through its $124M acquisition of web video business, On2.

    On2 have been producing video codecs for years. It open sourced VP3 around 2003, if memory serves, which then became the basis for the Theora codec; the preferred choice of the open source community. Theora is a royalty- and patent-free codec that many open source advocates – myself included – have promoted the use of due to its free nature (free as in freedom… but that’s another issue).

    However, as Steve Jobs recently hinted that a patent pools was being established to destroy Theora (and ultimately line his pockets further), Google have done just what Microsoft and Apple probably feared. Pulled the rug out.

    So, all YouTube video will be re-encoded to use VP8 rather than H.264 (the proprietary codec supported by Apple and Microsoft), and browser builders Mozilla and Opera have already come out in support of it. As has Adobe. And, of course, Chrome will support it too.

    And VP8, being open source and royalty-free, can also be supported by Microsoft and Apple. All source code and documentation is available on line, so there really is no excuse not to support it.

    Well Apple-lovers, you sure do choose interesting products. Like the iPod; a “revolutionary” portable audio player, being probably the first to have a non-replaceable battery. I might be wrong, having done no research on the subject, but this was enough to turn me off. Let alone the insistence of using iTunes.

    Or the iPad; the computer-but-not-a-computer consumer device that let’s you do anything you want with your media.  So long as it is on Apple’s terms.  I don’t get why someone as apparently intellectual as Stephen Fry gets so excited about it. Yes, it’s so exciting, in fact, that I’d go immediately to iPad.com and check it out!

    The iPad. I mean, for goodness sake, it’s a laptop without a keyboard, but with potentially harmful restrictions, a proprietary operating system and about as much appeal as a colonoscopy. According to Fry, it also has no “multitasking, still no Adobe Flash. No camera, no GPS”. But it does have a touch-screen and 3D desktop effects… Perhaps that’s why the Free Software Foundation dropped “Freedom” Fry’s video from their homepage: who’d want to appear as hypocritical as that?

    And then there’s the iPhone. This is the biggy. Apple are using typical Microsoft-like tactics here.  Make an “irresistable” upgrade, probably for free or very cheap, and subtly attach some conditions to it. This time, as exposed in Giorgio Sironi’s blog post, The Apple of Sin, the condition is that you must only develop iPhone applications in languages prescribed to you by Apple.

    The reasons, given by Giorgio, are pretty clear: Apple want to kill any chance of Flash appearing on the iPhone, else it might be inconsistent with the new iPad policy.

    So, Mac users, be aware that your choice of platform may well come to haunt you in a year or two, when Apple extends this anti-Flash policy to OS X.  There is one nice aspect of this, though: Apple might just force Adobe to open-source Flash.  Then will follow a review-and-embrace process, where Flash gains recognition as an open standard.

    Then we’ll see if Apple is embracing open standards as it “seems” to be with its current policies.  If not, then you’ll get more choice of hardware and software if you choose Windows. And even more if you opt for Linux and, not only would that be cheaper, you would also retain your right to choose what you do with it.

    Sorry about that. 😉

    I recently ‘dented’ (tweeted on identi.ca) a question to a group of software developers: what music do they listen to that is conducive to coding?I received a variety of answers, with just as wide-ranging tastes as you could expect, really. Clearly, I hadn’t conducted a very economic experiment. Perhaps I was asking the wrong question.

    The question I should have asked is this: which music do you listen to that evokes a calm, creative and logical state of mind? In other words, I needed to key-word the question to (a) elicit greater impact on the reader and (b) give the question more scope, more context.

    The premise of the question is the science behind brainwaves. Apparently, alpha waves in the brain (those which occur at between 8-13Hz [cycles per second]) are the most conducive to creative AND logical thinking. It is commonly associated with a meditative state of mind, deeply relaxed, daydreaming, fantasizing and creatively visualising various scenarios.

    This dispels some notion that left brain/right brain dominance exists. I can’t remember which is which, but it is said that the right hemisphere is more creative and the left, more logical/analytical. Or vice versa.

    But this alpha wave state could, in fact, also support such dominance, if it allowed for the idea of submission of the dominant region during periods of relaxation. In other words, we will have one personality profile when active, busy, even stressed, and another profile when relaxed, calm, clear.

    It follows, then, the people seeking to produce creative works – whether it be software code, writing, visual art or music, should always seek the best environment to create alpha brain waves. Music is just one component; meditation, light scents, lighting, physical comfort and staying hydrated also contribute, as does the avoidance of caffiene and alcohol.

    But for me, most of all, it’s music.  And quite often, that’s trance. 😉

    The full title of this blog should really be ‘SELinux is preventing mysqld (mysqld_t) “search” to ./tmp (public_content_rw_t)’ as that is the problem I’ve been having with CentOS recently (and hence my searches on the web for a solution).
    The cause of the problem
    I use SugarCRM for customer and project management data – and very good it is too! (Gratuitous plug – I can help your company install and use this fine software :-) ). Except that recently, when listing my Accounts within Sugar, I would not see all of the account context. Only the account data itself would be displayed and none of the subpanels/links. The query to retrieve more data was failing, with this error message displayed in the browser window:
    mysqld: Can't create/write to file '/tmp/#08y2jw' (Errcode: 13)
    In my system log (/var/log/messages), I also got multiple SELinux errors like this:
    Oct 13 09:07:50 server setroubleshoot: SELinux is preventing mysqld (mysqld_t) "read" to ./tmp (public_content_rw_t). For complete SELinux messages. run sealert -l 1762c478-f3a2-4eeb-be09-bd3dc037d945
    Clearly, the reason for “Errcode: 13″ was due to SELinux.
    Incidentally. if you have seen a similar error on your web site, but with (Errcode: 28) instead, this is likely due to shortage of disk space. A great way of determining operating system errors like this, is to use ‘PError’, thus:
    # perror 28
    OS error code 28: No space left on device

    # perror 13
    OS error code 13: Permission denied

    So there we are – two distinct and different issues.
    With SELinux, resolving the permission issue can be difficult. By issuing # sealert -l 1762c478-f3a2-4eeb-be09-bd3dc037d945, as suggested above, I got the following output (trimmed and highlighted for clarity):

    Summary:
    SELinux is preventing mysqld (mysqld_t) “search” to ./tmp (public_content_rw_t).
    Allowing Access:
    Sometimes labeling problems can cause SELinux denials. You could try to restore
    the default system file context for ./tmp,
    restorecon -v ‘./tmp’
    Additional Information:
    Source Context root:system_r:mysqld_t
    Target Context system_u:object_r:public_content_rw_t

    First things first: issuing # restorecon -v './tmp' didn’t fix it for me. I was also surprised to see that the path to /tmp was relative to the current working directory, so I tried a slightly modified # restorecon -v '/tmp', but to no avail. After restarting mysqld, the problem persisted: MySQL was simply being refused access to /tmp. Somewhere, a policy is disallowing this.
    It’s a mistake to assume the the source context and target context should be the same; they don’t have to be, as it’s entirely policy-driven.  I made bold those aspects (the file Type) above to highlight this incorrect assumption (that I previously held).
    Find and fix a policy?
    Although finding the troublesome policy and analysing it is a Good Thing, it’s also time-consuming and requires significant knowledge of SELinux, chiefly to avoid creating security holes. A better way, I found, was simply to relocate where mysqld tries to store temporary data.
    Thanks to Surachart Opun’s blog, I learned that you can specify a new location for temporary files. In /etc/my.cnf, add or edit the following:
    [mysqld]
    tmpdir=/tmp # # e.g.
    tmpdir=/var/lib/mysql/tmp

    Now do the legwork to set up the directory properly:
    First, create directory with appropriate permissions
    # cd /var/lib/mysql
    # mkdir tmp
    # chown mysql:mysql tmp
    # chmod 1750 tmp

    Now set the SELinux context up:
    # chcon --reference /var/lib/mysql tmp
    and make the SELinuiux context permanent:
    # semanage fcontext -a -t mysql_db_t "/var/lib/mysql/tmp(/.*)?"
    Finally, restart mysql:

    SugarCRM – Open Source CRM system

    # service mysqld restart
    Closing thoughts: optimisation
    The methods above fixed the particular problem I was having. They didn’t, however, actually pinpoint the cause. This is one of the good things about Linux and SELinux in particular: you are forced to rethink what the system is doing and work out a solution that sits within the predefined security context – or learn how to write SELinux policies. Personally, I prefer the former ;-)
    There is an additional benefit to the solution above – namely, optimisation. Because we have specified the security context with semanage, we are free to mount an external file system and use that instead for MySQL’s temporary files. In other words, we can maintain the security but increase the performance.  One such filesystem could be tmpfs. tmpfs is actually a RAM Disk, uses a fixed amount of RAM to provide file storage. It is much quicker than an on-disk filesystem and thus perfectly optimised for storing temporary, caching data. There are many resources about tmpfs on the web. A good introduction to tmpfs can be at Planet Admon.

    Having installed CentOS (wikipedia) on a server here, I was surprised to find that, by default, the source repositories were not enabled.
    Below are the source repo definitions I use.  Simply create a file called “Centos-Source.repo” (# chmod 644) in /etc/yum.repos.d/ and enable repositories as required (using enabled=1).  Please note that this example is for CentOS version 5 and may differ from any official versions out there.  I offer no warranty… it just works for me.  ;-)

    [base-SRPMS]
    name=CentOS-$releasever – Base SRPMS
    baseurl=http://mirror.centos.org/centos/$releasever/os/SRPMS/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    priority=1
    enabled=1
    updates
    [update-SRPMS]
    name=CentOS-$releasever – Updates SRPMS
    baseurl=http://mirror.centos.org/centos/$releasever/updates/SRPMS/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    priority=1
    enabled=1
    used/produced in the build but not released
    [addons-SRPMS]
    name=CentOS-$releasever – Addons SRPMS
    baseurl=http://mirror.centos.org/centos/$releasever/addons/SRPMS/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    priority=1
    enabled=0
    packages that may be useful
    [extras-SRPMS]
    name=CentOS-$releasever – Extras SRPMS
    baseurl=http://mirror.centos.org/centos/$releasever/extras/SRPMS/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    priority=1
    enabled=0
    packages that extend functionality of existing packages
    [centosplus-SRPMS]
    name=CentOS-$releasever – Plus SRPMS
    baseurl=http://mirror.centos.org/centos/$releasever/centosplus/SRPMS/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    priority=1
    – packages by Centos Users
    [contrib-SRPMS]
    name=CentOS-$releasever – Contrib SRPMS
    baseurl=http://mirror.centos.org/centos/$releasever/contrib/SRPMS/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    priority=1