Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to maintain several builds of nginx (with different sets of modules compiled in). These will be cloned from official package, with Replaces:/Conflicts: added, and will have different names (nginx-foo, nginx-bar...) but the same version number. I'd like to leave file names the same (/usr/sbin/nginx etc.); however, if I simply change the package name in debian/control, the binary name changes to .../nginx-foo too.

If anyone did that already, please share your solution.

share|improve this question
Leave them be and add a postinst script that does update-alternatives --install /usr/bin/nginx nginx /usr/bin/nginx-foo 50 or similar? If nothing else conflicts then you can even have multiple binaries installed and simply use update-alternatives --set to switch between them. – ephemient Oct 27 '10 at 20:58
I don't think update-alternatives will work with the default scripts provided by the nginx package. /etc/init.d/nginx calls /usr/sbin/nginx directly for example. It doesn't just call "nginx". – rmalayter Oct 28 '10 at 4:49
Hm, I could use dpkg-divert ... – sendmoreinfo Oct 28 '10 at 21:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.