Include a "remove" or "uninstall" section in the makefile
|Reported by:||Thomas Ward||Owned by:|
nginx version: nginx/1.6.0
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_mp4_module --with-http_perl_module --with-http_random_index_module --with-http_secure_link_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module
When building nginx from source, it is very difficult for users and administrators who don't audit everything going on during software installation to actually remove and purge the nginx software from the system if they want to remove it.
Some programs include a
remove section in their Makefile so that a user can do
make uninstall or
make remove, and the software is removed from their system based on the Makefile that initially installed the binaries and configuration files. Nginx does not, and an administrator would need to dissect the
objs/Makefile file by hand to determine where things're being placed.
My suggestion is to develop and include a
uninstall section in the Makefile as a complement to the already-existent
install section of the Makefile. It makes more sense to this, so that one can do
make uninstall or
make remove to remove the installed files (assuming that they did not clean out their Makefile previously via
make clean), rather than having to dissect the Makefile themselves to manually remove everything that was installed.
This does not need a rush implementation, but this would be nice to have at some point in the future.
nginx -V output included here is from the source-built version of 1.6.x on an Ubuntu system, however, this applies to all versions of
nginx including the older releases such as those from the 1.4.x series.)