views:

95

answers:

1

Is it a good idea to build RPMs and Debian packages on Cygwin? Our release server is windows, so our options are either that or start up VMs with linux to handle the task.

I'm just not sure if VMs are taking a nuclear bomb to an ant. Is there a way to do the building in Cygwin? If so, how? So far I've found some clues...apparently Cygwin should be able to do rpms. Debian stuff has been not as easy to find.

+2  A: 

I've been running a small debian to do my debian builds in a VM (VMware and virtualbox on Mac, Windows and even Ubuntu) in order to avoid the hassle with dependencies, architectures and so forth.

It may be a big hammer, but a text based environment runs really light, even under a emulator. For building packages a UI just gets in the way.

Peter Tillemans
Hey thanks Peter -- so you say use the VM. I'm thinking that too...the problem related to that though, is how to get a java ANT task to automatically start up a Linux VM (under Windows host OS), and then talk to it to tell it to build our rpm or debian package. Any ideas?
Sam
Run a ssh daemon in the VM, you can then start the building task using the SSHEXEC ant task. Alternatively you can use the rc.local script to check in a shared folder for a script, execute that and shutdown the machine again.
Peter Tillemans
YOu could use VirtualBox which can start/stop a VM via command line, then as Peter said, using ssh, you can execute commands on the VM.
Unknown
+1 for Peter's answer - I wouldn't trust that any binary files Cygwin put into an RPM would run on another platform.
gareth_bowles
Thanks guys. Currently I'm using VMWare server, but is Virtualbox better?
Sam
So I ended up hooking up Putty's pscp and plink executables, and SSH'ing into the linux VM in VMware server. it wasn't hard at all -- thanks for all the help!
Sam