Nmap Development mailing list archives

Re: make install error - nselib/data/psexec - Potential Fix


From: David Fifield <david () bamsoftware com>
Date: Sun, 15 Nov 2009 19:58:29 -0700

On Fri, Nov 13, 2009 at 11:34:24PM -0600, Tom Sellers wrote:
Corey Chandler wrote:
Ron wrote:
David Fifield wrote:
 
I made a mistake in the above commands. That still try to install
directories, but it happens to work because the for loop isolates the
error from make. This is better:

     $(INSTALL) -d $(DESTDIR)$(nmapdatadir)/nselib/data
     $(INSTALL) -d $(DESTDIR)$(nmapdatadir)/nselib/data/psexec
     for f in `find nselib/data -name .svn -prune -o -type f 
-print`; do \
         $(INSTALL) -c -m 644 $$f $(DESTDIR)$(nmapdatadir)/$$f; \
     done

David Fifield
    


Well, another solution is to get rid of the 'psexec' folder in the data
directory and put all its files in 'data', but they're pretty specific
so it probably doesn't make sense.

I'll go with whatever solution you think is best. I'm not really a
Makefile expert, so I'll trust your capable hands.

Ok, I think I have this fixed.  Based on my reading of the problem the
error message,

      /usr/bin/install: omitting directory `nselib/data/psexec'
      make: *** [install-nse] Error 1

is due to the following line using a wildcard whose results include a
directory "psexec":

      $(INSTALL) -c -m 644 $(NSE_LIB_DATA_FILES) $(DESTDIR)$(nmapdatadir)/nselib/data

Interestingly, there was a chance of this happening before, two lines
up, where the "nselib" directory contents are handled.  In that case
the NSE_LIB_LUA_FILES variable specifies *.lua, avoiding the issue by
not processing the directory "data".  Since the "data" folder contains
files with various extensions and some without this would not work.

I figure that it would be unlikely that we would change all of the
file names in nselib/data to include some extension and that if we
did, it would just break later.

So I took David's code above as an example and modified it to process
the "nselib/data" directory twice, once to create directories, then
again to copy the files.

The benefit of this process is that if further directories created
under nselib/data they will automatically be picked up.  The downside
is that some undesirable files, such as *.c and *.vcproj, will get
moved as well.

Thanks, Tom, this works for me on GNU/Linux and Mac OS X. Ron, which
files from the psexec directory are not meant to be installed?

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: