#68035 closed update (fixed)

nmap update 7.94 WIP

Reported by: artkiver (グレェ) Owned by: ghosthound
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port:

Description

It appears as if nmap 7.94 was released on 2023-05-19 from https://nmap.org/changelog.html#:~:text=Nmap%207.94%20%5B2023%2D05%2D19%5D%20%C2%A7

I modified the Portfile locally to reflect the update and am attaching a diff.

But a couple oddities:

  1. port lint --nitpick returns the following:
port lint --nitpick
--->  Verifying Portfile for nmap
Warning: Line 63 should be a newline (after PortGroup)
--->  0 errors and 1 warnings found.

I wasn't able to rectify that.

Stranger, after install completes, if I invoke nmap -V it still returns 7.93. o.O

I figure, since the port has listed maintainers, probably better if they take a gander at it than submitting a PR, but I wanted to at least document some of my efforts and perhaps my diff will be helpful as a starting point?

Attachments (1)

Portfile.diff.nmap7.94 (834 bytes) - added by artkiver (グレェ) 15 months ago.
WIP preliminary diff for nmap Portfile to update it to 7.94.

Download all attachments as: .zip

Change History (4)

Changed 15 months ago by artkiver (グレェ)

Attachment: Portfile.diff.nmap7.94 added

WIP preliminary diff for nmap Portfile to update it to 7.94.

comment:1 in reply to:  description Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to artkiver:

I modified the Portfile locally to reflect the update and am attaching a diff.

The alignment of your checksum lines does not match the former alignment. Generally we want to preserve a Portfile's existing alignment when we update, unless we're deliberately making a whitespace-only commit to fix alignment issues.

  1. port lint --nitpick returns the following:
port lint --nitpick
--->  Verifying Portfile for nmap
Warning: Line 63 should be a newline (after PortGroup)
--->  0 errors and 1 warnings found.

I wasn't able to rectify that.

It can be rectified exactly as stated, by adding a newline after the PortGroup line 62:

  • net/nmap/Portfile

    diff --git a/net/nmap/Portfile b/net/nmap/Portfile
    index 0e668802021..a42589cb873 100644
    a b default_variants +ssl +pcre 
    5959
    6060variant ssl description {build with ssl support} {
    6161    PortGroup openssl 1.0
     62
    6263    openssl.branch 3
    6364    configure.args-append --with-openssl=[openssl::install_area]
    6465}

But it is not mandatory to eliminate all lint warnings; they're only warnings, not errors, and in this case only appear in nitpick mode. This lint warning was originally created back when portgroups were only included at the top of the Portfile. The idea was that the Portfile should begin with the modeline, the Subversion $Id$ comment (removed after we moved to GitHub in 2016), a blank line, the PortSystem line, any PortGroup lines, a blank line, and then the name, version, etc. The blank line after the PortGroup line is often omitted when it appears later in the Portfile, such as within a variant or subport. Maybe the lint warning should not appear for such later uses.

Stranger, after install completes, if I invoke nmap -V it still returns 7.93. o.O

It is surprisingly common for developers to forget to update their version numbers prior to release. If that were the case here, we should add a patch for whatever upstream commit fixed it, and if upstream had not fixed it, we would report it to them.

However, I cannot reproduce this issue.

% sudo port install
--->  Computing dependencies for nmap
--->  Fetching archive for nmap
--->  Attempting to fetch nmap-7.94_0+pcre+ssl.darwin_21.x86_64.tbz2 from https://packages.macports.org/nmap
--->  Fetching distfiles for nmap
--->  Attempting to fetch nmap-7.94.tar.bz2 from https://nmap.org/dist/
--->  Verifying checksums for nmap                                                   
--->  Extracting nmap
--->  Configuring nmap
--->  Building nmap
--->  Staging nmap into destroot
--->  Installing nmap @7.94_0+pcre+ssl
--->  Deactivating nmap @7.93_0+pcre+ssl
--->  Cleaning nmap
--->  Activating nmap @7.94_0+pcre+ssl
--->  Cleaning nmap
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
--->  Some of the ports you installed have notes:
  nmap has the following notes:
    Zenmap is now provided by a separate port.
% nmap -V
Nmap version 7.94 ( https://nmap.org )
Platform: x86_64-apple-darwin21.6.0
Compiled with: nmap-liblua-5.4.4 openssl-3.1.2 libssh2-1.11.0 libz-1.3 libpcre-8.45 libpcap-1.10.4 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: kqueue poll select
Last edited 15 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 15 months ago by artkiver (グレェ)

Submitted a PR: https://github.com/macports/macports-ports/pull/20281

The PR gets rid of the port lint --nitpick warning and below is output from nmap -V which seems consistent with what it should be (I uninstalled my MacPorts and started fresh):

% nmap -V
Nmap version 7.94 ( https://nmap.org )
Platform: arm-apple-darwin23.0.0
Compiled with: nmap-liblua-5.4.4 openssl-3.1.2 libssh2-1.11.0 libz-1.3 libpcre-8.45 libpcap-1.10.4 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: kqueue poll select

Apparently today, September 1st, 2023 is the 26th anniversary of the first nmap release!

Also see: https://social.scriptjunkie.us/@sj/110993555840404548

comment:3 Changed 15 months ago by danielluke (Daniel J. Luke)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.