May 28, 2008

Patch management between repositories?

Gecko 1.9 is nearly here, and I'm looking forward to it. But there's a catch... I have to make some fairly extensive changes to it, changes that will not live in the 1.9 repo on any branch. So I'm hoping a few people can point me to some nice freebie tools for applying patches in one repository to another repo's code, and keeping the patches up to date. Or for handling cross-repository (and for that matter, cross-repository-platform) patches in general.

(The concept I have is that, following the new XULRunner build system, my app's source would live in mozilla/verbosio - from a separate repository than the 1.9 code base.)

From my brief research, Mercurial Queues seems perfect for this - within Mercurial repositories anyway. Apparently, the 1.9 CVS stable branch will not be tracked in parallel on hg.mozilla.org after RC1 (grumble, grumble), so I'm not sure how MQ could be used in this scenario. Or I'd have to host the whole Moz code plus my project in hg, and do catch-up merges from CVS as new point releases come up. (If I go that route, I'll have to be super-nice to the mozdev folks and bribe them to set up and host a clone...)

Believe me, it's very little fun to try making two repo systems work together. The equivalents of CVS ignore are just the beginning of the pain.

Another question that comes to mind is: how do you make comments inside a GNU diff file? Do they support, like Perl does, a hash-begins-a-comment-line form of commenting, at least between files? That would make it easier for me to document these patches I'd keep.

I'm also hoping someone will take the time to publish a Mercurial guide in hardcopy. I really appreciate William Nagel's "Subversion Version Control" -- it's much easier to understand than http://svnbook.red-bean.com/.

I can probably write some simple Perl code to apply the patches as I just mentioned, but maintenance is another issue. Please advise.

Posted by WeirdAl at 5:33 PM | Comments (5)

May 1, 2008

Hardware ups and downs

For many months, my custom-built WinXP desktop has been giving me blue screens of death, and more recently, random restarts. Since I can't use it to build Mozilla anymore, I decided I might as well take it into the shop for repairs. The company that built it is closed on weekends (grrr), so I dropped it off at Fry's Electronics for a diagnostic.

Several days later, I spotted a computer deal that was pretty hard to beat: a Gateway GT5676 computer, 64-bit AMD processor...

Out with the old, in with the new

From the Fry's webpage:

  • AMD Phenom™ 9600 Processor (Quad Core Processor) (AMD LIVE!™) Operates at 2.3GHz | 2MB L3 cache | 3600MHz System Bus
  • Windows Vista® Home Premium 64-bit edition with Service Pack 1
  • AMD 780G Chipset
  • ATI Radeon™ HD 3200 Integrated Graphics
  • 4096MB DDR2 Memory, Dual Channel (2 x 2048MB), 667MHz (PC2-5300) Expandable to 8GB, 4 DDR2 Slots (Total) | 2 DDR2 Slots (Available)
  • 640GB (2 x 320GB) SATA II (7200RPM, 8MB Cache)
  • 18x DVD?R/RW SuperMulti Drive featuring Labelflash™ Technology
  • 8-Channel (7.1) High Definition Audio
  • High-Performance 15-in-1 Digital Media Card Reader:, xD-Picture Card™, CompactFlash I (CF), CompactFlash II, Secure Digital™ (SD), Mini Secure Digital™ (Mini SD™)1, Multi Media Card™ (MMC), Reduced Size MMC (RS-MMC)1, MMC Mobile1, MMC Plus, Memory Stick™ (MS), Memory Stick Duo2, Memory Stick Pro, Memory Stick Pro Duo2, SmartMedia, IBM Microdrive™
  • 6 - USB 2.0 Ports (2 Front, 4 Rear)
  • Amplified Stereo Speakers (USB Powered)
  • Elite Multimedia Keyboard
  • USB Optical 2-Button Wheel Mouse
  • Premium System Design with Carbon Fiber Faceplate
  • Gateway® Portable Media Drive Bay
  • 56k ITU v.92 ready Fax/Modem (RJ-11 port)
  • 10/100/1000 Mbps Ethernet LAN (RJ-45 port)

The price tag? $749.99! No wonder they're currently sold out.

At that price, I figured, why the hell not. So I bought the new machine, and arranged to have the techs throw another four gigabytes of RAM in there, to max it out at 8 GB. With that thrown in, the machine still cost me under $1,000.00 (before taxes, of course). I purchased it a week after I'd brought the old box in for service.

Fast forward two weeks, and I finally get the diagnosis on the older box. I quote:

Completed hardware diagnostic. Found that the unit has a short in the board. After multiple attempts to replicate the problem, the motherboard eventually shuts down at random intervals. Unit may be uneconomical for repair.

Translation: It restarts randomly (which I already knew) and it's not worth fixing. I regretfully agreed with the last point, since it is three years old. I bought the newer machine in hopes that I'd gradually transition from the old box to the new one... not so gradually now.

That was about three weeks ago. Why would I buy such a souped-up machine? Well, the price was undeniable. But I buy powerful machines to build Mozilla code.

64-bit: Ahead of the curve?

Unfortunately, I can't get everything working yet to do that. MozillaBuild spins itself off into the weeds, for reasons as yet unknown.

There's another site that supposedly tells you how to set up a build environment on 64-bit Vista, and it's appropriately named: http://www.mozilla-x86-64.com/. It relies on the older CygWin build setup routine, which anyone who's been around the project long enough knows is a pain in the byte. Having installed one set of prerequisites for the MozillaBuild environ, now I have to install another set for the CygWin one - and they don't line up all that well. The website also feels like it's lacking in documentation - although technically everything might be listed there, just following the instructions is a bit harder than I hoped for. What's worst about this website, though, is there's no obvious contact information for whoever writes these pages. So where I might need a little more hand-holding, especially since not many people have done 64-bit Mozilla builds before, I can't find anyone to hold my hand.

Hopefully, whoever wrote this documentation will contact me. Otherwise, I bought myself a thousand-dollar paperweight.

Eight gigabytes? Why?

"Not to mention the most important reason for climbing a mountain."
"And that is?"
"Because it's there."
-- Star Trek V: The Final Frontier (Kirk and Spock)

There's three reasons. One, because it's 64-bit as opposed to 32-bit, I figure everything takes up about twice as much memory. So it's equivalent to 4 GB on a 32-bit system. Two, Windows Vista, I've heard, has one hell of an appetite for memory. Three...

I've often wondered how fast a RAM disk would compile and run Mozilla Firefox, as opposed to a hard disk. So I figured, why not, let's see where it takes us. Too bad I can't build right now (see aforementioned paragraphs).

"I think this 'new' ship was put together by monkeys. Oh, she's got a fine engine, but half the doors won't open, and guess whose job it is to make it right?"
-- Star Trek V: The Final Frontier (Scotty)

I hope there are some others out here who have tried doing Mozilla builds on 64-bit operating systems, and can lend me a hand. I think I bought a nice system for the future. I'd just like to be able to use it for that purpose.

Posted by WeirdAl at 8:03 PM | Comments (3)