Thursday, 9 September 2010

No news... good news? Solaris 10 licensing terms have changed

Long time no blog. Partly because I enjoyed a(n almost) relaxing summer. Partly because I was standing by, sad and astonished, at what was happening to Solaris and OpenSolaris in the final stages of the Oracle and Sun Microsystems merger.

There's no need for me to blog about the well known changes that OpenSolaris and its communities underwent in the last months. I feel a little bit of sadness but things haven't changed so dramatically. The supported Sun's OpenSolaris distribution has been obliterated in favor of... yet another Solaris Express. Back to the old days. Ben Rockwood has written a good piece in his blog in which he analyses the leaked Oracle memo and makes some insightful considerations. I agree with his analysis.

Until Solaris 11 Express sees the light, I was thinking about upgrading my workstations to Solaris 10 09/10, which was released yesterday. As you'll notice when accepting the OTN license, Solaris 10 licensing terms have changed.

Except for any included software package or file that is licensed to you by Oracle under different license terms, we grant you a perpetual (unless terminated as provided in this agreement), nonexclusive, nontransferable, limited License to use the Programs only for the purpose of developing, testing, prototyping and demonstrating your applications, and not for any other purpose.

After so many fears and speculations, that's good news.



Sunday, 5 September 2010

Open Source Tools For Professional Photographers

Photography Camera

Professional photographers through their pictures capture the true essence involving people, places, or things. They take pictures to sell products, entertain people, report the news, or bring back memories. All this involves lots of graphic work such as editing for invites, posters, magazine covers, touch ups etc.

Did you know there is a good collection of open source software available at a professional photographer's disposal ?

Read more »

Thursday, 12 August 2010

Strace - The Sysadmin’s Microscope

Strace is a command line tool which can be used to figure out what is wrong with an errant application running in your Linux system. Some even look at strace as the Swiss army knife of a systems administrator.

Check out how I used strace to troubleshoot a multimedia problem in Ubuntu a long time back.

More recently, Greg Price at the Ksplice blog has written an informative article on strace which explains the use of this troubleshooting tool.

Thursday, 5 August 2010

Google Wave is destined to be a Dodo - Says Google

Remember Google Wave - the innovative way of communication which Google unveiled amidst much fanfare a year back ? When it was released, Google Wave was considered to be a potential replacement for the ubiquitous Email.
Read more »

Sunday, 1 August 2010

GNOME Census - A Glance Into Developer Participation In GNOME

As a GNOME user, have you ever wondered - How big is the GNOME project ? What is its make up ? How are decisions taken ? And how many GNOME developers are there ? If yes, then you need look no further. Because Neary Consulting - A Free software consultancy, has released the GNOME Census giving an overview of the GNOME project and its functions. The census report analyzes how developers participate in the GNOME project and looks for patterns within the project itself.

Read more »

Sunday, 25 July 2010

An @ Symbol in OS X File Permissions and the Problems That Came

Today I was deploying some software updates in our Solaris 10 servers and, since such updates are distributed in files archived with the GNU tar utility (not shipped by default in Solaris 10), I had to convert them before moving them to our servers. I'm quite accustomed to such a procedure: that's why (amongst other more important reasons) I always have an OpenSolaris virtual machine running in my other desktops (thanks to VirtualBox).

Today, notwithstanding the fact the I had a gut feeling that I was not doing the correct thing, I decided to open a Mac OS X terminal and do the job from there. GNU tar and pax are there, aren't they? There should not be any problem, thought I.

Well, I should have paid attention to that gut feeling of mine: to spare the required OpenSolaris boot, I lost much more than what I had planned. I learned something new but... what was it worth? A bunch of non portable behaviours of Mac OS X? Just the confirmation I needed, once again (I realize I'm a stubborn fellow): if you can, do not rely on a Mac to do your UNIX-ish tasks. Chances are you're going to waste more than you believed.

This is what happened.

Making a pax File for a Solaris Host

This was meant to be a quick task. I copied the archive from a Solaris NFS mount where, some days ago, I had stored the file. I ran gunzip to decompress the file, ran tar to unpack the files, ran pax to store the resulting directory in a pax file and used rsync to quickly transfer the resulting archive back to the target Solaris machine:

$ gunzip [file.tar.gz]
$ tar xf [file.tar]
$ pax -w -f ./[file.pax] [dir]
$ rsync -vz --inline [file.pax] [myserver]

I then connected to the target server and used pax to explode the transferred archive. Since one of the things I feared was Mac OS X messing around with file permissions, I quickly checked the results on the Solaris side and everything looked fine. Well, sort of...

The next thing I usually do with such bundles is checking the differences between the running version and the soon-to-be-deployed one to be sure I won't miss any customization I made in the instance to be patched. It usually is another easy job since very few XML files are usually involved. Great was my surprise when diff began to write out hundreds of differences between one version and another.

Doh! It seemed as though somewhere in between somebody had decided to duplicate each file following a naming pattern; if the expected file was named x, I was seeing two files in Solaris: x and ._x. Where did these file came out from?

Back to the Mac

The original directory had been deleted just after producing the pax file so that the first I did was using pax to unpack the archive in the Mac. As I told you, everything looked fine. Except for an @ character that should not be there:

drwxr-xr-x@ [...snip...]

Maybe you don't know about it but that means that such a file has extended attributes set. Extended attributes are basically metadata: the file system does not interpret them and the ls command uses the @ symbol after the file permissions to inform you that they are there.

Strange Things Are Happening

There's nothing strange about extended attributes: it's very important to be aware of their existence to correctly handle them when, for example, you need to do a backup or move files from one file system to another (unless you don't mind losing them.) Solaris' pax and tar, for example, both support archival of extended attributes even if, by default, they ignore them. Since I know that my original archive had no extended attribute set in any of its file, I just ran a plain pax to build my archive. Maybe OS X pax defaults to a different behaviour so that I checked pax man page.

Doh! Oddly, OS X pax man page makes no mention at all of extended attributes, notwithstanding the fact that, undoubtedly, it was in fact managing some. Which? In OS X, just run xattr -l to find out.

Quarantine

A xattr told me that the com.apple.quarantine extended attribute was set in the culprit and a quick script confirmed that every file in that directory had that attribute set. According to Apple's documentation, that attribute is set by recent versions of OS X to mark the file as a potential threat. Do you remember when finder kindly asks you if you're really sure you want to open a downloaded file? The quarantine extended attribute is the mechanism OS X programs use to store that information.

How did it make it there?

But wait! I downloaded a tar.gz file and stored in an NFS 4 mounted file system for later processing. The question is:
  • How did that attribute was stored in the NFS 4 file system where I stored the file?
  • How did that attribute make it into every file stored into the pax archive?

As far as it concerns the first question, NFS 4 does support extended attributes. But again, should it be there, I would have known because I checked it directly in the Solaris host and, moreover, the box that acts as a NFS server runs some cron scripts that checks (and fixes to my taste) ACLs and extended attributes in some of the exported NFS file systems. It was very easy to find out that OS X, when storing such a file in a remote NFS share, instead of using NFS 4 extended attributes it stores them in a separate file named with the pattern mentioned above. I then discovered that the shared NFS file system in question is plagued by ._* files. Everywhere.

As far as it concerns the second question, well... I copied once again the file using the finder and performed the same operations I did before. The resulting files all had the quarantine extended attribute set. Who's the culprit, I do not know. I don't even care. The fact is that OS X is performing this operation with tools such as pax and tar without informing the user and, what's even worse, without even mentioning it in such commands' man pages.

Conclusion

The reasoning above explains why, even if Solaris pax (such as NFS) aren't managing any extended attribute, I did end up with duplicated files which were inserted into the pax file produced with Mac OS X. Probably they aren't going to hurt my deployment but surely they should not be there.

For the sake of curiosity, I checked that removing the ._* files in the NFS share made everything go back to normal.

Nevertheless, since I feel there are many OS X dark corners left for me to discover, I won't be making such an error again. Instead of waiting a couple of minutes for a virtual machine to bootstrap, I ended up wasting an entire hour for a (yet another...) bad documented and non-portable idiosyncrasy of an operating system that brings no added value with it.

Sunday, 18 July 2010

openSUSE 11.3 Released - Comes With Superior Support For Netbooks

openSUSE 11.3 - the latest version of Linux distribution from Novell has been released. One of the highlights of openSUSE 11.3 is its enhanced support for netbooks.

openSUSE 11.3 provides improved hardware support for netbook users. It also bundles with it two netbook desktop environments namely - KDE's "Plasma netbook workspace", and MeeGO - A visually rich netbook user interface developed by Intel and Nokia.

Read more »