Nmap Development mailing list archives

Re: [Patch] Forcibly copy scripts to overwrite .svn files


From: Kris Katterjohn <katterjohn () gmail com>
Date: Fri, 18 May 2007 15:12:14 -0500

David Fifield wrote:
When installing Nmap as a normal user from a Subversion checkout, the
install-nse target throws up a bunch of permission denied errors if the
"scripts" directory already exists in $(nmapdatadir):

      $ ./configure --prefix=$HOME/nmap-install
      $ make
      $ make install
      $ make install
      ...
      cp -r scripts/ /home/david/nmap-install/share/nmap/
      cp: cannot create regular file 
`/home/david/nmap-install/share/nmap/scripts/.svn/text-base/nbstat.nse.svn-base': Permission denied
      cp: cannot create regular file 
`/home/david/nmap-install/share/nmap/scripts/.svn/text-base/showOwner.nse.svn-base': Permission denied
      ...
      cp: cannot create regular file `/home/david/nmap-install/share/nmap/scripts/.svn/format': Permission denied
      make: *** [install-nse] Error 1

As you can see, the .svn directory is getting copied along with the
scripts. The files in this directory are not owner-writable (mode 444).
cp -r refuses to overwrite them. This doesn't occur when installing the
normal way as root, because cp allows root to copy over non-writable
files. It also doesn't happen when compiling from a tarball for obvious
reasons.

This patch just adds the -f flag to cp to force the overwriting of the
files. The real solution is to keep from installing the .svn
directories, but this patch is probably desirable even in that case.

David Fifield


Hey David,

You can use 'svn export' to export a clean directory (e.g. no .svn dir)
that you can compile and install from.


Thanks,
Kris Katterjohn

Attachment: signature.asc
Description: OpenPGP digital signature


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

Current thread: