Wednesday, June 17, 2009

SheepShaver

Holy cow! I must be on a roll, because the next emulator I tried was also a waltz in the park. In the comments of an article on How to run Classic (pre OS X) apps on Intel Macs is

Pre-built SheepShaver setup for download

I've built a complete SheepShaver install, including _everything_ needed to run, as well as the last version of WordPerfect and several utilities. To download this 243mb image, go to http://groups.yahoo.com/group/wordperfectmac, to the Links section, to the "SheepShaver and Basilisk" folder, and click "SheepShaver-WordPerfect Install". It's about 20 minutes on a fast connection.

Enjoy,

John

Yeah, so you have to join that group (I set it not to send me mail, claiming I'd read it on the web), and suddenly there I was scrolling down to the bottom to download. Follow the directions (seriously), and bam! It Really Works.

Mini vMac

Surprisingly enough, I read Getting started with Mini vMac, I gave it an old ROM (I have an old SE ... and why do most versions of CopyROM give me a corrupt ROM?), I fired it up ...

... moment of doubt at the floppy with a flashing question mark ...

File menu, Open Disk Image to a bootable image like System Startup extracted from SSW_6.0.8-1.4MB_Disk1of2.sea.bin, and voila!

Shockingly easy, in fact.

UPDATE: the mini vMac blanks are handy! I renamed hfs20M.DSK to hfs20M.dmg, and it mounted just fine (both sides, OS X 10.5.7 and mini vMac 3.0.4-imch). Sure, I could use Disk Utility to make a new custom 20M image as Mac OS Standard and read-write, but I think the download was faster!

SheepShaver ROMs

The common directions to use SheepShaver instruct the user to use TomeViewer (on a PowerPC Mac running a classic Mac OS or running Classic under OS X) to extract the ROM from "MacOS ROM Update 1.0" ... I like to refer to this as circular irony.

What's nice is that the SheepShaver ROM FAQ lists other sources, and I think I have two of those if I can find the CDs ...

ROM files known to work with SheepShaver

The following NewWorld ROMs are known to work:

  • MacOS ROM 1.1.2 from MacOS 8.5
  • MacOS ROM 1.2.1 from "iMac Update 1.1"
  • MacOS ROM 1.4 from MacOS 8.6
  • MacOS ROM 1.6 from "MacOS ROM Update 1.0"

Annoying Treo (not) Charging

I like to test things before I go on a trip. I was hoping to go on a trip without my laptop (this may be the first in years for a week-long trip), and I wanted to be sure I could charge my Treo from my iPod's wall charger (a small adapter from wall current to USB). Cell phones come in handy on the road, at least while the battery lasts.

My Treo 700p failed the test! It would not charge from anything but my actual laptop. The closest I could come to faking it out was to plug a powered USB hub into my laptop, plug Treo cable into hub, plug Treo into cable, let Treo start charging, and then sneakily unplug the hub from my laptop. That's a lot of hassle just to get it to charge!!!

I'll just bring the spare battery instead, but it's annoying not to be able to charge how I wish, so I had to ask Google why. From Treo charging in cradle from Palm Support Forums:

Besides using the charger to charge the phone, the PC will need to be on to use the trickle charge method. Some motherboards can allow continuous current even if PC is shut down but clearly your PC does not have such motherboard. The reason why your powered usb hub is not charging the phone is that the hub itself regulates power by "On Demand" and that demand is active data xfers from A to B or vice versa. So if no data is moving, then there will be insufficient power from that usb port to initiate a trickle charge.

Phooey. At least the mystery is explained; too bad my Treo wall and car chargers died (I think it wears out the connectors somehow since new cables work, but that's another story).

BetterZip

One project on the back burner is to get one or several of the classic Macintosh emulators working so I don't mind cleaning out the basement of ancient Macs (that I can emulate). On route to that, I noticed that BetterZip (why do I need a zip GUI when I'm happy with the command line?) handles the old *.sit Stuffit files! I never thought well of Aladdin's marketing approach, I bought CompactPro instead, but that doesn't change the fact that sometimes I need to decompress a Stuffit file. Finding the free version of Stuffit Expander gets more challenging every time (did I mention I didn't like the marketing tactics?), and the installer is convinced that I need startup extensions and other bugs (I'm sure they think this is a feature, but only if I can opt out easily). Or you could use the BetterZip application (no suspicious installer). Much nicer than Stuffit!

Tuesday, June 16, 2009

Daylily!

In the seven summer seasons that we've lived in this house, I have never seen a daylily here ... until this morning! I have daylilies when the deer aren't ravaging my yard! I'm sure it won't last, but I'm enjoying it today! I used to enjoy these flowers before we had so many deer.

Monday, June 15, 2009

Latest version of rsync

I started with these directions to compile rsync, but updated to the latest version, 3.0.6, with my own variants to log every step noted in red.

Compile rsync 3.0.6

Follow these instructions in Terminal on both the client and server to download and compile rsync 3.0.6:

Download and unarchive rsync and its patches

cd ~/Desktop

curl -O http://rsync.samba.org/ftp/rsync/rsync-3.0.6.tar.gz

tar -xzvf rsync-3.0.6.tar.gz

rm rsync-3.0.6.tar.gz

curl -O http://rsync.samba.org/ftp/rsync/rsync-patches-3.0.6.tar.gz

tar -xzvf rsync-patches-3.0.6.tar.gz

rm rsync-patches-3.0.6.tar.gz

cd rsync-3.0.6

Apply patches relevant to preserving Mac OS X metadata

patch -p1 <patches/fileflags.diff

patch -p1 <patches/crtimes.diff

Configure, make, install

./prepare-source 2>&1 | tee prepare-source.out

./configure 2>&1 | tee configure.out

make 2>&1 | tee make.out

sudo make install 2>&1 | tee make-install.out

Verify your installation

[hope:~] /usr/local/bin/rsync --version

rsync version 3.0.6 protocol version 30

Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.

Web site: http://rsync.samba.org/

Capabilities:

64-bit files, 32-bit inums, 32-bit timestamps, 64-bit long ints,

socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,

append, ACLs, xattrs, iconv, symtimes, file-flags

rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you

are welcome to redistribute it under certain conditions. See the GNU

General Public Licence for details.

By default, rsync will be installed in /usr/local/bin. If that isn't in your path, you will need to call your new version of rsync by its absolute path (/usr/local/bin/rsync).

So let's compare ... 3.0.5 with no symtimes to 3.0.6 with symtimes. And bugfixes of course. But still Protocol 30, and no significant changes since those directions.

Hmm. Well, I could mull this over with no way of knowing for sure, or I could re-run the unit tests in Backup Bouncer against this fresh compile!

sudo /usr/local/bin/rsync -aNHAX --fileflags --force-change --delete --stats /Volumes/Src/ /Volumes/Dst

sudo ./bbouncer verify -d /Volumes/Src /Volumes/Dst

Verifying: basic-permissions ... ok (Critical)

Verifying: timestamps ... ok (Critical)

Verifying: symlinks ... ok (Critical)

Verifying: symlink-ownership ... ok

Verifying: hardlinks ... ok (Important)

Verifying: resource-forks ...

Sub-test: on files ... ok (Critical)

Sub-test: on hardlinked files ... ok (Important)

Verifying: finder-flags ... ok (Critical)

Verifying: finder-locks ... ok

Verifying: creation-date ... ok

Verifying: bsd-flags ... ok

Verifying: extended-attrs ...

Sub-test: on files ... ok (Important)

Sub-test: on directories ... ok (Important)

Sub-test: on symlinks ... ok

Verifying: access-control-lists ...

Sub-test: on files ... ok (Important)

Sub-test: on dirs ... ok (Important)

Verifying: fifo ... ok

Verifying: devices ... ok

Verifying: combo-tests ...

Sub-test: xattrs + rsrc forks ... ok

Sub-test: lots of metadata ... ok

OK, that's pretty awesome! A complete pass! Now I wonder how much of that is because he knew what flags to use with rsync. So, out with the lart (the last MacPorts test in /opt/local/bin), in with the new.

sudo port -f uninstall rsync

sudo port -f install rsync

/opt/local/bin/rsync --version

rsync version 3.0.5 protocol version 30

Copyright (C) 1996-2008 by Andrew Tridgell, Wayne Davison, and others.

Web site: http://rsync.samba.org/

Capabilities:

64-bit files, 32-bit inums, 32-bit timestamps, 64-bit long ints,

socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,

append, ACLs, xattrs, iconv, symtimes, file-flags

rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you

are welcome to redistribute it under certain conditions. See the GNU

General Public Licence for details.

All the same capabilities as what I just compiled. Re-test!

sudo ./bbouncer clean /Volumes/Dst

sudo /opt/local/bin/rsync -aNHAX --fileflags --force-change --delete --stats /Volumes/Src/ /Volumes/Dst

sudo ./bbouncer verify -d /Volumes/Src /Volumes/Dst

Verifying: basic-permissions ... ok (Critical)

Verifying: timestamps ... ok (Critical)

Verifying: symlinks ... ok (Critical)

Verifying: symlink-ownership ... ok

Verifying: hardlinks ... ok (Important)

Verifying: resource-forks ...

Sub-test: on files ... ok (Critical)

Sub-test: on hardlinked files ... ok (Important)

Verifying: finder-flags ... ok (Critical)

Verifying: finder-locks ... ok

Verifying: creation-date ... ok

Verifying: bsd-flags ... ok

Verifying: extended-attrs ...

Sub-test: on files ... ok (Important)

Sub-test: on directories ... ok (Important)

Sub-test: on symlinks ... ok

Verifying: access-control-lists ...

Sub-test: on files ... ok (Important)

Sub-test: on dirs ... ok (Important)

Verifying: fifo ... ok

Verifying: devices ... ok

Verifying: combo-tests ...

Sub-test: xattrs + rsrc forks ... ok

Sub-test: lots of metadata ... ok

Well, whaddaya know ... it's not the new version so much as know what flags to send to rsync. So how does Apple fare with those flags?

sudo /usr/bin/rsync -aNHAX --fileflags --force-change --delete --stats /Volumes/Src/ /Volumes/Dst

rsync: -aNHAX: unknown option

rsync error: syntax or usage error (code 1) at /SourceCache/rsync/rsync-35.2/rsync/main.c(1333) [client=2.6.9]

/usr/bin/rsync --help 2>&1 | grep -- "-a\|-N\|-H\|-A\|-X"

-a, --archive archive mode; same as -rlptgoD (no -H)

--append append data onto shorter files

-H, --hard-links preserve hard links

--delete-after receiver deletes after transfer, not before

--address=ADDRESS bind address for outgoing socket to daemon

-E, --extended-attributes copy extended attributes

OK, so I'll whittle that down to what Apple's rsync will accept, swapping the X for an E (depending on version as to which flag means extended attributes).

sudo /usr/bin/rsync -aHE --delete --stats /Volumes/Src/ /Volumes/Dst

copyfile(70-extended-attrs/.._symlink-with-xattrs.4GgbUd,70-extended-attrs/symlink-with-xattrs, COPYFILE_UNPACK) failed:62

rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-35.2/rsync/main.c(992) [sender=2.6.9]

sudo ./bbouncer verify -d /Volumes/Src /Volumes/Dst

Verifying: basic-permissions ... ok (Critical)

Verifying: timestamps ... ok (Critical)

Verifying: symlinks ... ok (Critical)

Verifying: symlink-ownership ... ok

Verifying: hardlinks ... ok (Important)

Verifying: resource-forks ...

Sub-test: on files ... ok (Critical)

Sub-test: on hardlinked files ... FAIL (Important)

Verifying: finder-flags ... ok (Critical)

Verifying: finder-locks ... FAIL

Verifying: creation-date ... FAIL

Verifying: bsd-flags ... ok

Verifying: extended-attrs ...

Sub-test: on files ... ok (Important)

Sub-test: on directories ... ok (Important)

Sub-test: on symlinks ... FAIL

Verifying: access-control-lists ...

Sub-test: on files ... ok (Important)

Sub-test: on dirs ... ok (Important)

Verifying: fifo ... ok

Verifying: devices ... ok

Verifying: combo-tests ...

Sub-test: xattrs + rsrc forks ... ok

Sub-test: lots of metadata ... FAIL

However, since -a and -H are incompatible according to --help and hardlinks failed, let's try again.

sudo ./bbouncer clean /Volumes/Dst

sudo /usr/bin/rsync -HEr --delete --stats /Volumes/Src/ /Volumes/Dst

skipping non-regular file "10-symlinks/broken_symlink"

skipping non-regular file "10-symlinks/link2broken_symlink"

skipping non-regular file "10-symlinks/symlink1"

skipping non-regular file "10-symlinks/symlink2"

skipping non-regular file "10-symlinks/symlink3"

skipping non-regular file "15-symlink-ownership/symlink1"

skipping non-regular file "15-symlink-ownership/symlink2"

skipping non-regular file "15-symlink-ownership/symlink3"

skipping non-regular file "70-extended-attrs/symlink-with-xattrs"

skipping non-regular file "90-fifo/some-fifo"

skipping non-regular file "95-devices/devvn0"

skipping non-regular file "95-devices/devzero"

I think we know that will be ugly, but let's look.

sudo ./bbouncer verify -d /Volumes/Src /Volumes/Dst

Verifying: basic-permissions ... FAIL (Critical)

Verifying: timestamps ... FAIL (Critical)

Verifying: symlinks ... stat: ./symlink1: stat: No such file or directory

FAIL (Critical)

Verifying: symlink-ownership ... FAIL

Verifying: hardlinks ... ok (Important)

Verifying: resource-forks ...

Sub-test: on files ... ok (Critical)

Sub-test: on hardlinked files ... FAIL (Important)

Verifying: finder-flags ... FAIL (Critical)

Verifying: finder-locks ... FAIL

Verifying: creation-date ... FAIL

Verifying: bsd-flags ... ok

Verifying: extended-attrs ...

Sub-test: on files ... ok (Important)

Sub-test: on directories ... ok (Important)

Sub-test: on symlinks ... FAIL

Verifying: access-control-lists ...

Sub-test: on files ... ok (Important)

Sub-test: on dirs ... ok (Important)

Verifying: fifo ... FAIL

Verifying: devices ... FAIL

Verifying: combo-tests ...

Sub-test: xattrs + rsrc forks ... ok

Sub-test: lots of metadata ... FAIL

Pfft, hardlink still fail, but so do things that passed before!

If you're going to use rsync, I recommend using MacPorts or compiling the latest version yourself. Looks like Apple needs to add the fileflags and crtimes patches and update to a protocol version 30 rsync. But until then, MacPorts is easy!