Friday, June 12, 2009

Its been worth the wait....

# bash --version
GNU bash, version 4.0.0(4)-release (arm-pc-solaris2.11)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Note to self: need to get pkgbuild to cross compile for 'arm'............

Saturday, November 10, 2007

Whats happening

First the bad news - After the OpenSolaris.org developer summit I have not had much time to devote to OpenSolaris :(

The good news is the reason why this has happened is that I have been getting ready to start work in Scotland as a contractor for Fidelity National Information Services. Due to NDA's I can not reveal much about the work, but if you look at their website you can see that it involves software for banks. At the moment I am just waiting for some paperwork needed for my visa. Since I am coming from Bangkok I had to do a Tuberculosis test. This involved an X-Ray from a hospital in Bangkok, which the process was relatively simple considering a language barrier. English is not as widely spoken in Thailand as people may think, and my Thai sux. BTW the TB results was negative....

Over the next year at least, I will do a lot of flying between Glasgow and Bangkok. This will be interesting. Not only a big change in timezone, but a huge change in climate. The temperature in Bangkok is around 32C (max) and 24C (min), while in Glasgow it is warm 12C (max) and 7C (min) and getting colder.

Being the new kid on the block, I drew the short straw and will be working over Christmas and New Years. My wife is a little upset about this as she wont see me for about 8 weeks. On the plus side is it will be yet another country I will be able to experience Christmas and New Year. Last year I was in Phayao, Thailand. The year before that I was in Kobe and Tokyo, Japan.

As the software is developed on Windows, I have had to change my laptop back to Windows, with Solaris Express using vmware. It reminds me just how much Windows is a horrible development platform. It really does sux. Luckily it is not what the customer chose to use. I can only say that they have made an excellent choice of both operating system and hardware platform :)

Another plus is that hopefully I will have time to visit the OpenSolaris user groups within the region. I will try to at least to go to a meeting of the world famous Ireland OpenSolaris User Group. This should be some good craic.

The next post I will try to find a pub with wi-fi, open fire and fine ale.

Saturday, October 27, 2007

Pirate Busters

A Bangkok Post story today "Fighting the pirates" says there was a US-led anti-piracy conference in Bangkok this week. The was 60 police, customs officials and prosecutors from 13 countries attending. I think the key words from this is "US-led", as the US are very keen to pressure countries such as Thailand to clamp down on counterfeit products.

In the article, A US Cyber spook said "counterfeit products not only hurt the economy, but are also a serious threat to the health and safety of everyone". For Thailand, I can see the safety aspect from what he is saying in relation to fake aircraft parts and pharmaceuticals. As far as the economy side goes I think a broad crackdown on every thing pirated would only be beneficial to the US. I do not think Thailand would be to keen to crack down on it's clothing industry as this would seriously harm the local economy and put many people out of work.

The current strategy against piracy using IP law enforcement, I feel is currently flawed. It is aimed at keeping retail prices high to possibly maximize profits. The discrepancy here is the difference in price between the real product and the pirated copy. The difference only encourages crime as the customers are looking for value for money. Parts of the software industry has been forced through Open Source to change to charging for services rather the software itself. Companies like Sun actually give their software away. At first this may sound like a dumb idea, how does Sun make money by making something free? There is a method to the madness. Charging $0 for Solaris encourages many more people to deploy it. This gives Sun a great opportunity to sell more hardware and services based around Solaris. Will this work for other industries? In short it depends on product. I feel that companies need to look for new approaches to getting profit from their product to make piracy less attractive. The law enforcement approach is not working. It just changes your customers into criminals.

Post Note: My favorite gem from the article - "the mass production and distribution of counterfeit goods such as optical discs". I think the counterfeit goods here is actually the content on the disc rather then the actual disc itself :)

Thursday, October 25, 2007

Pirate cleanup

The Bangkok Post had an interesting report about the anti-piracy group the Business Software Alliance increasing it's presence in Thailand. The first thing I did was to find out who are the BSA. It's members consist of the usual anti-open source (or ones who pay lip service) IT corporations like Adobe, Microsoft, IBM etc. Hardly surprising is that companies which are largely focused producing open source like Sun, Red Hat are not members.

Ok, I go to the bio's of the BSA management team and find that nobody seems to ever actually written any software! Is the focus of the BSA to promote software at all, or is it just a debt collection agency focused on software.

Digging through the article they start off with the obvious and say that software piracy is rampant in Thailand. No kid Ted! The Bangkok Post does it's usual bad journalism - "Various studies have shown a direct correlation between a low piracy rate and the health of a country's IT industry". Mr Post, please, please provide a reference of where the study comes from. Without it my bullshit meter goes ballistic.....

Here we go again - "Hardee said that if Thailand were to bring down the piracy rate by 10 percentage points over the next four years, this would translate to over 5,000 highly paid IT jobs, 1.9 billion US dollars in GDP growth and over 75 million dollars in extra tax for the government". Right, are we plucking the numbers out of the air, or is there some sort of logic behind it. My assumption here is the Mr Hardee thinks that people in Thailand can actually afford to pay for the software in the first place. It would be interesting to see how much money from the software sales stays in Thailand, and how much goes overseas.

Mr Post finally provided a reference - "According to a survey by the Economist Intelligence Unit on IT competitiveness, Thailand today languishes in 41st place out of 64 countries. Perhaps not too surprisingly, the study showed that we fared worst in terms of our legal environment, lack of R&D and an inadequate IT infrastructure. The current "lack of R&D" would suggest the likelihood of the "5000 highly paid IT jobs" coming from Thailand would be remote. My hunch is that they only increase in jobs in Thailand would be to translate existing or new products into Thai. Exciting stuff eh!

"The BSA thinks we have an important role to play in helping the government and industry develop a strong IT sector". I maybe a bit harsh here, but the BSA is really only interested in getting people to pay their members for the use of the software they produce. This statement is just sugar coating. Lets call a spade a spade....

Don't get me wrong here. I am all for people paying companies like Microsoft for the use of "their" software. If this is their business model then so be it. We just need to produce competitive or better Open Source software to put this old business model out of business. In my opinion the software industry and IT literacy in countries like Thailand depend on it.

"In the first nine months of this year, the BSA has had 250 leads for corporate piracy submitted to its hotline and five of the informants have been paid a portion of the reward money of 250,000 baht". Either the exchange rate is really fluctuating or Thai's are being short changed. The reward money on the US site is $1,000,000 or ~30,000,000 baht. I wonder how much money I would get for giving them address of Pantip Plaza over the hotline.

Hey something we can agree on - "However, it was the choice of a developer to engage in software development using Open Source tools and to give it away for free, he said. Open Source is based on the principle that developers have that choice to protect their intellectual property and keep that code free.".
My question is does the BSA actively promote the use of Open Source software. I doubt it....

Wednesday, April 25, 2007

pkgbuild tips - 1

I have been thinking for some time that I should publish some tips for building packages using pkgbuild. If you have created more then one spec file using pkgbuild, then you will know that many things are repeatable. The general process goes like time -
  1. Create an initial spec file from either a template or a spec file for a similar application.
  2. Try a build.
  3. You should expect that the above should fail. Check the log file (/tmp/.log) for where it failed. Fix the problem. Generally a typo or the build needs a patch
  4. Repeat 2-3 until the prep and build works. If it actually installs the packages, then go to 7
  5. Look in the RPM_BUILD_ROOT directory tree in /var/tmp for what was installed, and adjust the %files section of the spec file to match the installation.
  6. Go back and repeat from 2 (Note: you can short-cut this with pkgbuild)
  7. Publish the spec file(s), patches, ChangeLog etc and your done.
Todays tip involves adding a patch. I find that using 2 or 3 windows makes this really easy. The 1st window is where you do the pkgtool/pkgbuild commands and edit your spec files. You use the 2nd window to dig through the build area to find and fix any bugs or problems after a fail build. Have the 3rd window setup so you are in the /tmp directory. Once you have a change to make that requires a patch, just do somthing similar in following in the 3rd window.
jdsbuild@prae> cd /tmp
jdsbuild@prae> gtar fxj ~/packages/SOURCES/xfwm4-4.4.1.tar.bz2
jdsbuild@prae> mv xfwm4-4.4.1 xfwm4-4.4.1-orig
jdsbuild@prae> gtar fxj ~/packages/SOURCES/xfwm4-4.4.1.tar.bz2
#
# Fix the files which need to be patched.
#
jdsbuild@prae> diff -ur xfwm4-4.4.1-orig xfwm4-4.4.1 > ~/spec-files-xfce/patches/xfwm4-01-fixbadcode.diff

At this point add an entry for the patch xfwm4-01-fixbadcode.diff into the spec file and try again.

If you need to add another patch, just remove the patched directory, and un-tar again.

Maybe you want to merge a fix into an existing patch. Just patch the directory in /tmp and then make the changes.
jdsbuild@prae> cd /tmp
jdsbuild@prae> gtar fxj ~/packages/SOURCES/xfwm4-4.4.1.tar.bz2
jdsbuild@prae> mv xfwm4-4.4.1 xfwm4-4.4.1-orig
jdsbuild@prae> gtar fxj ~/packages/SOURCES/xfwm4-4.4.1.tar.bz2
jdsbuild@prae> cd xfwm4-4.4.1
jdsbuild@prae> gpatch -p1 < ~/spec-files-xfce/patches/xfwm4-01-fixbadcode.diff jdsbuild@prae> cd /tmp
#
# Fix the files which need to be patched.
#
jdsbuild@prae> diff -ur xfwm4-4.4.1-orig xfwm4-4.4.1 > ~/spec-files-xfce/patches/xfwm4-01-fixbadcode.diff

Using a shell like bash with command line editing, the process can be quite quick and easy.

Have Fun!!!

Tuesday, April 24, 2007

Sex on the Desktop with Solaris

My first draft of this blog went into half a page of crap about how Sun was originally really cool on the desktop, and then decided it would leave it all to Microsoft and Apple. Rather than dragging up the past (and boring you will what you with what you already know), I will focus on the here, now, and future.

Having been lagging by several years, Solaris Express is now hot on the heals of todays desktop. JDS is currently Gnome 2.16 (2.18.x will be Solaris Express real soon). If you really want the latest and greatest now, you can either download and install the Vermillion developers release or build it directly from the JDS spec files. The latest and greatest Xfce Desktop (4.4.1) like Vermillion can be downloaded and installed (x86 only), or built from the Xfce spec files.

While JDS and Xfce are now are rather nice now. For the real story on a sexy eye-candy Desktop you can not go past Compiz on Solaris. If you are into shimmering transparent windows etc, and you think that there is not a hope in hell that you can do this on Solaris, then you need to check out Erwann Chénedé's blog. Also if you also want transparent windows for Xfce. Install Erwann's Compiz packages and rebuild the Xfce window manager from the spec files. Re-login and turn on the "Compositor" in the Window Teaks settings.

To top this off, I have recently added the spec files for several really cool 3D Linux Games (more on the way) and wine to the SFE repository. The SFE repository has the spec files for a lot of really cool applications for Open Solaris. Check it out!

The only thing missing now is the latest KDE....

Below I have put together hopefully some useful links for a Sexy Desktop Solaris...

Name: Open Solaris Desktop Community
Homepage: http://www.opensolaris.org/os/community/desktop
Discussion List: http://www.opensolaris.org/os/community/desktop/discussions

Name: JDS
Full Name: Java Desktop System
Description: Sun's version of the Gnome Desktop
Project Homepage: http://www.opensolaris.org/os/project/jds
Download URL: http://dlc.sun.com/osol/jds/downloads/current
SVN URL: svn+ssh://anon@svn.opensolaris.org/svn/jds/spec-files/trunk

Name: Erwann Chénedé's Weblog
Description: Compiz 0.5.0 packages and patches for OpenSolaris x86
Blog URL: http://blogs.sun.com/erwann/entry/compiz_0_5_0_packages

Name: Open Solaris Xfce Project
Description: Xfce Desktop for Open Solaris
Project Homepage: http://www.opensolaris.org/os/project/xfce
Download URL: http://dlc.sun.com/osol/xfce/downloads/current
Parent Project URL 1: http://www.xfce.org
Parent Project URL 2: http://goodies.xfce.org
SVN URL 1: svn+ssh://anon@svn.opensolaris.org/svn/xfce/spec-files-xfce/trunk
SVN URL 2: svn+ssh://anon@svn.opensolaris.org/svn/xfce/xfce-goodies/trunk

Name: Spec Files Extra (SFE)
Description: A Repository for pkgbuild spec files (Not only Desktop)
Project Homepage: http://pkgbuild.sourceforge.net
SVN URL: https://svn.sourceforge.net/svnroot/pkgbuild/spec-files-extra/trunk

Name: Build Recipes Reference
Description: List of build files, scripts and patches for Open Source Software on Solaris
URL: http://www.genunix.org/wiki/index.php/BuildRecipesReference

Thursday, November 02, 2006

OpenOffice icon fix for Solaris

One thing that has always bugged me when I install Solaris and add OpenOffice.org 2.x, is that the icons for OpenOffice.org never appear next to their menu entries in JDS. I know it is not life threatening, or stops the application for working. It just looks bad!

A quick and dirty fix to this is to change the "Icon" entry in the relevent .desktop files in /usr/share/applications. For a slightly quicker and cleaner fix I have written a small script which just adds symbolic links to the installed icon files. The script does this by adding the links directly to the OpenOffice.org desktop integration installed package. This ensures that the links are removed when the package is removed.

#!/bin/sh
# Usage: openoffice-icon-fix
#
# Currently OpenOffice.org for Solaris is delivered with the wrong filenames
# for the icons in the .desktop files. This means the icons will not show
# up in the JDS menus. To work around this, this script adds a link to the
# original file the Solaris package database, which in-turn creates a
# physical link in the filesystem (via installf -f)
#

PKGINST=openofficeorg-desktop-integratn
APPS="writer printeradmin math impress draw calc base"
PIXDIR=/usr/share/pixmaps
OLD=openoffice.org-2.0
NEW=openofficeorg-20

#
# Check to see if OpenOffice.org is installed.
#
/usr/bin/pkginfo | /usr/bin/grep ${PKGINST} >/dev/null || {
echo "${PKGINST} is not installed."
echo "Please install OpenOffice.org 2.x, before running this command"
exit 1
}

#
# Note: The trailing 's' on the end of the installf command is NOT a typo!
#
for i in ${APPS}
do
/usr/sbin/installf ${PKGINST} ${PIXDIR}/${NEW}-${i}.png=${OLD}-${i}.png s
done

/usr/sbin/installf -f openofficeorg-desktop-integratn

Good Hunting!