Nmap Development mailing list archives

Re: [BUG] ndiff install doesn't respect DESTDIR, unlike all other components


From: David Fifield <david () bamsoftware com>
Date: Wed, 26 Sep 2012 08:59:22 -0700

On Wed, Sep 26, 2012 at 02:15:40PM +0200, John Spencer wrote:
On 09/26/2012 04:44 AM, David Fifield wrote:
On Wed, Sep 26, 2012 at 04:14:35AM +0200, John Spencer wrote:
everything gets properly installed into DESTDIR/prefix,

except of ndiff
which installs into prefix directly

Can you send us an install log? I cannot reproduce this. The targets for
installation of both Python programs seem to be doing the right thing:

install-zenmap: $(ZENMAPDIR)/setup.py
        cd $(ZENMAPDIR)&&  $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root 
"$(DESTDIR)")
install-ndiff:
        cd $(NDIFFDIR)&&  $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)")

This also worked for me:
nmap$ make install DESTDIR=~/destdir
nmap$ ls ~/destdir/usr/local/bin
ncat  ndiff  nmap  nmapfe  nmap-update  nping  uninstall_zenmap  xnmap  zenmap

cd ndiff && /bin/python setup.py install --prefix "/" --root "//opt/nmap"
running install
running build
running build_scripts
running install_scripts
copying build/scripts-2.7/ndiff -> /bin
changing mode of /bin/ndiff to 755
running install_data
copying docs/ndiff.1 -> //opt/nmap/share/man/man1

I can reproduce this now, but only with a prefix of "/". For example,
this works:

$ python setup.py install --prefix "/a" --root "/home/david/destdir"
copying build/scripts-2.7/ndiff -> /home/david/destdir/a/bin

But this doesn't:

$ python setup.py install --prefix "/" --root "/home/david/destdir"
copying build/scripts-2.7/ndiff -> /bin

This looks like a Python/distutils bug. Would you report it?
http://bugs.python.org/
http://docs.python.org/bugs.html#using-the-python-issue-tracker

As a workaround, maybe you can use --prefix="/bin/..".

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: