Hi folks,

I've developed an HTTP proxy that uses mongrel2 to receive incoming requests. 
I want to package my app for debian/ubuntu to make it easy to install, and in 
order to do this the right way I feel I need to create a mongrel2 package as 
well (since one doesn't seem to exist?) and have my app depend on it.

In thinking about what an ideal mongrel2 debian package might look like 
though, I'm envisioning potential conflicts with existing webservers. It seems 
common for webserver packages to come with default configs that listen on port 
80 and autorun. For example, apache and lighttpd each do this, and they 
conflict with each other. I guess the idea here is users should be smart and 
know what they are doing. However, if a mongrel2 package behaved this way too, 
and it got pulled in as a dependency when installing my proxy app, then this 
could inadvertently break an existing webserver on the machine. Since 99% of 
my app's potential users will already have an existing webserver, I'd prefer a 
way to pull in mongrel2 without making a mess.

So I'm considering two options:
  1) Create a "mongrel2" package with a disabled default config that does not 
autorun. This would be similar to how the haproxy debian package works. You 
install the package, but it doesn't actually run unless you tweak some files. 
This way if mongrel2 gets pulled in as a dependency, no other webservers 
break.
  2) Create two packages: "mongrel2-base" containing files/binaries only, and 
"mongrel2" that depends on mongrel2-base and sets up a default config with 
autorun. Apps like mine would depend on mongrel2-base only, ensuring that if 
mongrel2-base gets dragged in as a dependency then nothing will break. Users 
that want to use mongrel2 as their primary webserver can install the mongrel2 
package explicitly, resulting in an out-of-the-box working instance similar to 
apache.

I'm partial to the second option since it seems to be the best of all worlds, 
but I'm not familiar enough with packaging to know if there's a precedent of 
this sort of thing.

Thanks,
Justin

Reply via email to