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'm trying to recompile nginx with some extra modules and packetize it again. I want to change the package name to avoid package upgrades that could break the server. So far I downloaded the source with apt-get source nginx, changed the rules section to add the module and rebuilded it with debuild but I have no clue about how to change the package name. Any ideas?

share|improve this question
up vote 1 down vote accepted

The names of resulting packages are configured in debian/control file. You will have to change both Package names and things referring to them (Depends/Conflicts/Provies/etc.).

Additionally, in debian/ there are multiple files which are named after packages using them (ending with .install/postint/prerm/dirs/init/...) (they are used by various dh_* scripts during package build). You will have to rename those files as well.

Looking at nginx's debian/rules, it looks like there are some hardcoded pacakge names in binary-indep and build-dbg rules as well which need fixing as well.

share|improve this answer

to make it easy and avoid hacking with debian/packages, use checkinstall that should be available from your distro-packages.

be sure to read the man-file carefully, because you'll need some cli-switches be present lilke package-maintainer, package-version etc, but once it is setup it works like charme.

we use it to script our build-prozesses anbd create rpm/deb - packages from one build.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.