« April 2005 | Main | June 2005 »

May 29, 2005

Tar Wars Or Is the FSF the Microsoft of UNIX?

Friday at work, I had to unpack a gzipped tarball... in Solaris. This ordinarily is quite a mundane task that I've done thousands of times. But this time something was rotten in the state of UNIX. Normally with gnu tar, tar xf file.tar.gz does the task. I wasn't surprised when this didn't work though as this feature was added to gnu tar quite recently. so i tried what I used to do when I first started using Linux, tar xzf filename.tar.gz, again this didn't work. Then I remembered that I had heard that the compression flags were a gnu extension to tar and not supported by many implementations of tar. I also remembered seeing pipe instructions come with many gzipped tar balls. I quickly found on gzip.org: gunzip < file.tar.gz | /usr/bin/tar xvf -.

Now I've never had problems with this on EECS's sun boxen. This appears to be because we actually have tar in four different places on them. In PATH order we have:

ajc30@bender ~ $ /usr/pkg/bin/tar
usage: tar [-]{crtux}[-befhjlmopqvwzHLOPXZ014578] [archive] [blocksize]
           [-C directory] [-T file] [-s replstr] [file ...]
ajc30@bender ~ $ /usr/local/bin/tar
/usr/local/bin/tar: You must specify one of the `-Acdtrux' options
Try `/usr/local/bin/tar --help' for more information.
ajc30@bender ~ $ /usr/bin/tar
Usage: tar {txruc@}[vfbFXhiBDEelmopwnq[0-7]] [-k size] [tapefile] [blocksize] [exclude-file] [-I include-file] files ...
ajc30@bender ~ $ /bin/tar
Usage: tar {txruc@}[vfbFXhiBDEelmopwnq[0-7]] [-k size] [tapefile] [blocksize] [exclude-file] [-I include-file] files ...

In order they appear to be NetBSD's tar, Gnu tar 1.13, Sun's tar, and Sun's tar not on PATH. NetBSD's tar seems to support the compression flags like gnu tar but not auto detection of compression. Gnu tar 1.13 also lacks auto detect. And obviously Sun's tar doesn't support either.

Now command line incompatibility is one thing but apparently there are problems with opening tar files themselves. It seems that OpenBSD's tar could not properly unpack Zope, which apparently used gnu extensions to tar to support long file names. Now it appears that since then OpenBSD tar has become compatible (based on unpacking with both tars on OpenBSD 3.6 and comparing with diff -r).

Another example is m4. The tex build system uses m4 -P yet according to tex-live mailing list m4 -P is a GNUism and not supported by IRIX's m4.

More familiar to people is the bash issue. Bash (maintained by out very own Chet Ramey) is a POSIX compatible shell and also adds a variety of use features that we desire from a more modern shell. Some systems (such as Debian) use bash as their /bin/sh. Then in these systems shell scripts assuming /bin/sh is bash creep in. And voilà incompatibility with other POSIX shells. Of course the shell world is compatibility is a nightmare. To quote the autoconf documentation: "there are some corner cases in the Bourne shell that are not completely compatible with a POSIX shell.... While most (at least most System V's) do have a Bourne shell that accepts shell functions most vendor /bin/sh programs are not the POSIX shell. So while most modern systems do have a shell somewhere that meets the POSIX standard, the challenge is to find it." And Bash even has it's own list of incompatibilities with it's own 1.x series (despite that bash is still my favorite shell)

Now it seems to me that in these examples GNU "embraced and extended" existing standards. For this very same behavior we vilify Microsoft. In this era of of GNU/Linux's rapid growth it seems like this might hurt competing UNIX like systems and cause unintentional GNU/Linux lock-in.

Posted by ajc30 at 12:06 AM | Comments (0) | TrackBack

May 22, 2005

I wish I lived in the UK

How cool is this: iMP: free* legal p2p access to the last week of TV (*included in the price of a TV license). Considering how tough it can be at school to catch my favorite shows without a VCR, this seems awesome, and I would have legit access to Doctor Who. But alas, it is only open to UK residents.

It also would have been cool to live in the UK in the 70s with Tom Baker as the Doctor and the original Hitchhikers Guide to the Galaxy radio story.

Posted by ajc30 at 03:33 PM | Comments (0) | TrackBack

May 09, 2005

Confessions of an Ex-Linux User

At the beginning of the summer of 2000 my family got a new computer, this freed up our previous machine for my grand GNU/Linux experiment. After playing around with Phat Linux to test the waters and then Linux Mandrake I settled on Red Hat. From that point I used Red Hat Linux exclusively until the summer of 2003 where I started dual booting on my new college computer.

These days I'm back to using Windows almost exclusively now. Windows XP is far stabler than the Windows 98 that I dumped in 2000. Firefox is also nice enough that I can use it in place of IE and not have to worry about taking down the whole shell (though the Linux/X11 port is fairly horrible). And Thunderbird protects me from those nasty Outlook (Express) worms. It's nice being able to almost properly view documents that people have decided to typeset in MS Word (for the love for god, why?). The Windows Gaim port is in a good enough condition that I can use it in place of that add-ridden AOL client. And Media Player Classic has made multimedia a pleasure on windows. I'm also enjoying the excellent Nero suite, both their video tools and their burning tools. Gaming on Windows allows for more choices; Linux has some big title games like Doom 3 and UT2004 and lots of older games running on ported VMs but doesn't have nearly as many games as Windows. As a Linux user, I did (and still do) tend to play more console games though.

MATLAB is another reason. Though there is a Linux (with optional very ugly X11 support) port, I can't use the features I need the most. I need to use the fdatool quite a bit but it just isn't usable on the X11 port and I don't mean the Havoc Pennington it still has features unusable, I mean the gui is so horribly skewed and illegible that it is a real pain to use.

Windows can still really could use a few things though. I'd love to be able to have a tabbed terminal in windows. I'd like to see better out of the box archive support. I'd really like standard tar, gzip, bzip2, rar, and possibly 7z support, with tight shell integration. I'd also like to see a Direct Show Ogg demuxer, Vorbis decoder, and full MPEG 4 support (ASP/AVC/mp4). In the more likely to actually happen arena, windows should shorten the names of its default system folder location for those who have the misfortune to use it in the command line "cd c:\Documents and Settings\Username\My Documents" us a mouthful as is "cd c:\Program Files\Common Files" I realize that there are the tilde names like c:\docume~1\Username\mydocu~1" but that is also awkward. I also know about command completion but in some situations its not feasible. the My Documents, My Pictures, My Music, etc. folders should have the My lopped off, of course they are yours, and "C:\Program Files\Common Files" can become c:\programs\common, of course they store files, and "Documents and Settings" can become "profiles" because it is easier to type.

There are a few things on the Linux side that could win it massive amounts of points. It would be sweet to have a grub menu item or boot up key combination to not start gdm/kdm/xdm. Native Eclipse would also be sweet. Ubuntu got close I could smell it but progress mysteriously stopped over a month ago. I good audio player would also be awesome. Despite the fact that I am currently using Winamp on Windows I don't like the Beep/XMMS Winamp-cloned bitmap interface. Rhythmbox is pretty nice but could really use a plug-in system, right now rbscrobbler is such a hack. Firefox also needs a serious clean up. You shouldn't need to be root to install search plug-ins.

Maybe someday I will return but for now I am content with Windows.

EDIT 5/11/05: I added some stuff, I didn't mean to take the entry live earlier

Posted by ajc30 at 11:21 PM | Comments (3) | TrackBack