Opened 6 years ago

Closed 6 years ago

#567 closed enhancement (wontfix)

Include a "remove" or "uninstall" section in the makefile

Reported by: Thomas Ward Owned by:
Priority: minor Milestone:
Component: other Version:
Keywords: Cc: teward@…
uname -a:
nginx -V: 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

Description

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 uninstall or 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 remove or 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.

(NOTE: The 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.)

Change History (3)

comment:1 by Valentin V. Bartenev, 6 years ago

I believe nobody should install software using make install and bypassing the package management system.

in reply to:  1 comment:2 by Thomas Ward, 6 years ago

Replying to Valentin V. Bartenev:

I believe nobody should install software using make install and bypassing the package management system.

You know, I agree with you, but... based on what I witnessed in #nginx on Freenode, and the fact that this documentation on installing and building nginx from source exists, means that there should probably be a uninstall or remove command in the Makefile, rather than being dependent on the package management system(s). Because there will be users who are not that bright and will not use the package manager(s).

comment:3 by Maxim Dounin, 6 years ago

Resolution: wontfix
Status: newclosed

By default, uninstallation is as easy as "rm -rf /usr/local/nginx". This is not something can/should be added to the Makefile though, as it will also remove anything created/modified under the path. On the other hand, adding a code that will uninstall only installed files and only if they weren't modified looks too complex, and I don't think it worth the effort.

Note: See TracTickets for help on using tickets.