1

My dist is Ubuntu 14.04

use case

I am attempting to create my own packaged nginx called 'custom-nginx'. It needs to install itself into alternative directories as so it does not interfere with the normal operation of nginx. 'custom-nginx' will listen on a different port number and will serve API requests.

some commands i'm using for preparation

apt-get install dpkg-dev
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list
apt-get update
apt-get source nginx
apt-get build-dep nginx

we now have a directory nginx-1.9.5 which contains everything we need to compile nginx.

inside nginx-1.9.5 / debian there is a control file, open that up and I can see where to change the package name on line 9

Package: nginx

to

Package: custom-nginx

Taking one step at a time, I attempt to compile this, without changing anything else and the compile fails near the end when it complains some directories don't exist. These directories are the ones listed at the end of the rules file in the section named override_dh_auto_install:

dpkg-buildpackage

...

/usr/bin/install -m 644 debian/nginx.conf debian/nginx/etc/nginx/
/usr/bin/install: target ‘debian/nginx/etc/nginx/’ is not a directory: No such file or directory
make[1]: *** [override_dh_auto_install] Error 1
make[1]: Leaving directory `/root/custom-nginx/nginx-1.9.5'
make: *** [binary] Error 2
dpkg-buildpackage: error: debian/rules binary gave error exit status 2

Can someone please shed some light on this for me. At this stage (without focusing too much on the designated paths for executables etc) I just want to compile it using a custom name.

Thanks

0

You must log in to answer this question.

Browse other questions tagged .