MozillaBuild is awesome since it saves a ton of time creating a build environment. The older cygwin based system wasn’t exactly an intuitive process. The downside of the change is those stupid tricks you knew, no longer apply in some cases.
For example a cvs checkout over SSH. Once upon a time you could follow the instructions to have it remember your ssh key so you don’t have to enter a password every 30 seconds. I simply had this in a batch file along with a bunch of environmental variables.
That’s no longer useful. I was able to find a new way to do this thanks to Myk. He did it for MSVC7, I’m using MSVC8:
%MOZILLABUILD%\msys\bin\SSH-agent into the MYSYS Shell line in the batch script to launch your build environment. For example:
Then in your MSYS shell enter:
Now you can sit back and enjoy a cvs checkout without needing to enter your password all the time. That makes things a lot easier.
I was strongly considering using my Mac Mini to build, but it’s a rev1, and the thought of using a 4200 RPM drive for something like compiling something like this made me change my mind.
6 replies on “MozillaBuild Fun”
You can also do what I used to do — in your .profile, add in ” . ~/.ssh/agent”, and then make a script that does:
ssh-agent > ~/.ssh/agent
That way you only need to type your password once, the first time you open a shell (more could be done here to automatically do the ssh-agent startup if the agent isn’t actually alive, but I never bothered); all subsequent shells just talk to the same agent.
Or, even better — install putty, convert your private key to a pageant compatible one, then drop a symlink to that in your startup items folder. Add the putty dir to your $PATH, and set CVS_RSH=plink. Pageant will prompt you for your private key at system startup, and cvs will use plink to talk to the remote server, and you’ll only need to enter your passphrase once at startup, into a win32 dialog.
Over in bug 390498, I added ssh-agent to all three batch scripts, so in the next version of MozillaBuild you won’t need to hack the scripts yourself.
I note that only Myk correctly spelled ssh-agent in lower case; Robert and Vladimir only got away with it due to XP’s case insensitivity; Vladimir will need to change his .profile if he wants it to work on Linux/Mac.
Robert, I see now that there’s some stupid setting on your blog software that’s uppercasing the letters s and h if you should need to use two of the former and one of the latter.
Neil: yes, that’s a known issue.