Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.