The
Ultimate
Business Machine

Technology, business
and innovation.

And, not least, about
the Mac.

Weblog Archive Cutedge

by: Bernard Teo








Creative Commons License

Copyright © 2003-2012
Bernard Teo
Some Rights Reserved.

The Ultimate Business Machine - Archives

List of Categories : Database * Technology * Commentary * Singapore * Travel *

Fri 23 Feb 2007

Leopard

Category : Technology/LeopardDevProg.txt

I've been having problems downloading the Leopard releases from Developer Connection. I kept getting disconnected before the downloads can finish.

I have two broadband lines coming into my home/office. One, the higher speed 3500 kbps line, kept getting disconnected at around the 559 MB point through the download. The other, a slower 512 kbps line, didn't have the same problem, but because it's a 5.1 GB install, it can take over 24 hours to download, and something or other would happen and I would always find the download either failed or timed-out when I next looked at it.

Now, I remember the last time we had a major OS X upgrade, moving from Panther to Tiger, I had the same problem. So I gave up downloading the developer releases after December, skipping the next two or so releases, thinking that things are not going to change much at the system-level going into the final release. I'd already seeded a few people with a Tiger-compatible version of Postfix Enabler and I hadn't gotten any feedback that anything was amiss. But that turned out to be almost a fatal mistake.

Thinking back, I wonder how I could have been so complacent. When Tiger was released, I relased Postfix Enabler on the same day, and the downloads (and payments) started coming in, seconds after I've updated my web site. A couple of hours later, I received this :

"First of all, thank you for writing and distributing this software. Postfix Enabler is currently starting postfix just fine (as far as I can tell) and claims to have started imap. However, something is wrong with pop3. When you try to start it the button goes away and comes right back. There's nothing in /var/log/mail.log about pop having done anything. Looking in /var/log/system.log reveals that "Server /usr/local/libexec/ipop3d is not executable [line=9]" So I manually copied the ipop3d binary out of the Postfix Enabler package and into /usr/local/libexec/ This allows ipop3d to start. I can get mail via pop3. However, pop3s fails."

What happened was that Apple deprecated the use of xinetd in the release version of Tiger, though it was still there in my developer version. Everything now had to go through the launch daemons mechanism. Imagine, the money was pouring in (and I should be so happy), but some things weren't working and I hadn't a clue what was happening. If I couldn't solve it, I would have to return every one of those dollars. So I took the download link off with an apology that I'm working on a fix, drove through heavy downtown traffic to get a shrink-wrapped copy of Tiger, and spent the next seven hours debugging it. The story had a happy ending. Postfix Enabler was put back on-line, the downloads resumed (again, seconds after updating my web page and that was so amazing, and so did the money), and this had kept on going all the way till now, almost two years later (talk about a long tail).

But I'm not going to make the same mistake again. So I thought I was going to stop everything else I was working on to make sure I have a way to always download the latest developer releases, all the way to golden master (do they still call the final release that, or is this so 20th century?).

I've tried everything - Safari, iGetter, Firefox, CyberDuck - but nothing worked for me. I needed to know what was happening at the point of failure. So I cobbled together some code from the Developer Examples that came with Xcode (the Downloader and the MiniBrowser sample code). And the result is what you see in the picture above.

Look closely - it's not Safari. I've duplicated enough of the Safari features to get the downloads to work so I can trace what is happening when they fail. In the end I've found a solution. The downloads were failing at the (mysterious) 559 MB point if I don't use a proxy web server. If I use that ISP's proxy server, the downloads don't get cut off anymore.

(I wonder why - nothing turned up on Google - maybe not many people download over 5 GB at one go).

So this should work also with Safari. It shouldn't now get cut off at 559 MB. But because I've concentrated on the download process, and every line of code has to do with download and nothing more, downloads using my version seem to run somewhat faster. I'm now able to download a Leopard release in about four hours. So that's a lot of improvement.

The application itself is not really much. You can download it from here.

But what I'd like to do, when I get the time, is to enhance it so that it can break the downloads into parts, like iGetter does. Plus a few other things.

I've said it many times. Cocoa is a wonderful software development platform. I've always wondered how Safari's downloads window works, Like how do you get the progress bar with those little round buttons and icon into a normal table view? Turns out that it only took a few lines of code. Totally amazing.

If I don't maintain some discipline I could go on forever into all these tangents. This is Disneyland for developers. But people have been asking about MailServe/Postfix Enabler/WebMon/DNS Enabler for Leopard. It's time to focus on the task at hand.

Posted at 7:51AM UTC | permalink

Mac@Work
Put your Mac to Work

Sivasothi.com? Now how would you do something like that?

Weblogs. Download and start a weblog of your own.

A Mac Business Toolbox
A survey of the possibilities

A Business Scenario
How we could use Macs in businesses

VPN Enabler for Mavericks

MailServe for Mavericks

DNS Enabler for Mavericks

DNS Agent for Mavericks

WebMon for Mavericks

Luca for Mavericks

Liya for Mountain Lion & Mavericks

Postfix Enabler for Tiger and Panther

Sendmail Enabler for Jaguar

Services running on this server, a Mac Mini running Mac OS X 10.9.2 Mavericks:

  • Apache 2 Web Server
  • Postfix Mail Server
  • Dovecot IMAP Server
  • Fetchmail
  • SpamBayes Spam Filter
  • Procmail
  • BIND DNS Server
  • DNS Agent
  • WebDAV Server
  • VPN Server
  • PHP-based weblog
  • MySQL database
  • PostgreSQL database

all set up using MailServe, WebMon, DNS Enabler, DNS Agent, VPN Enabler, Liya and our SQL installers, all on Mavericks.