Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: Nmap 4.23RC1 released
From: Andreas Ericsson <ae () op5 se>
Date: Sun, 11 Nov 2007 14:45:17 +0100

Fyodor wrote:

Does anyone know a good way to handle this in RPMs?  We would be
interested in seeing RPMs for Python scripts which handle both
versions without requiring separate rpms?

Totally untested, but it's supposed to work

(copy python-files to /usr/share/nmap-%version/python/<python-paths>)
find /usr/share/nmap-%version/python/ -type f | \
        sed 's#/usr/share/nmap-%version/python/#%ghost /usr/lib/python*/#' >filelist

%post zenmap
for pylib in /usr/lib/python*; do
        cp -a /usr/share/nmap-%version/python/* $pylib

%files zenmap

The %ghost thing tells rpm that the files may not exist until after
%post has run its course. You can do without the %ghost lines entirely
to get the correct functionality, but then you'll need to manually
remove those files in the %preun script, or they'll be left behind.
The %ghost lines also make rpm -qf attribute the files to the right
package (I think).

It's been a while since I dabbled with RPM voodoo so I might be
completely off here.

Note that you have to list every single file under /usr/lib/python
as %ghost. Wildcard expansions won't work. The filelist thing should
take care of it automagically.

It's a starting point anyways.

Andreas Ericsson                   andreas.ericsson () op5 se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]