Hello community,

here is the log from the commit of package nmap for openSUSE:Factory checked in 
at 2012-12-10 17:17:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nmap (Old)
 and      /work/SRC/openSUSE:Factory/.nmap.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nmap", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/nmap/nmap.changes        2012-12-03 
10:52:38.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.nmap.new/nmap.changes   2012-12-10 
17:17:14.000000000 +0100
@@ -1,0 +2,8 @@
+Sat Dec  8 13:42:44 UTC 2012 - [email protected]
+
+- run available unit tests
+- add nmap-ncat-fail-test-addrset.patch to make ncat tests effective
+- add nmap-ncat-skip-network-tests.patch to skip tests requiring
+  name resolution
+
+-------------------------------------------------------------------

New:
----
  nmap-ncat-fail-test-addrset.patch
  nmap-ncat-skip-network-tests.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nmap.spec ++++++
--- /var/tmp/diff_new_pack.ocGWQE/_old  2012-12-10 17:17:15.000000000 +0100
+++ /var/tmp/diff_new_pack.ocGWQE/_new  2012-12-10 17:17:15.000000000 +0100
@@ -47,6 +47,8 @@
 Patch2:         nmap-5.61-desktop_files.patch
 Patch3:         nmap-4.75-nostrip.patch
 Patch5:         su-to-zenmap.patch
+Patch6:         nmap-ncat-fail-test-addrset.patch
+Patch7:         nmap-ncat-skip-network-tests.patch
 
 %description
 Nmap is designed to allow system administrators and curious individuals
@@ -144,6 +146,8 @@
 %patch2 -p0
 %patch3 -p0
 %patch5 -p0
+%patch6 -p1
+%patch7 -p1
 
 #fix locale dir
 mv zenmap/share/zenmap/locale zenmap/share
@@ -187,6 +191,15 @@
 %fdupes -s %{buildroot}
 
 %check
+
+pushd ncat
+%__make check
+popd
+
+pushd libdnet-stripped
+%__make check
+popd
+
 # retrieve list of compiled in modules
 compiled_with=$("${RPM_BUILD_ROOT}%{_bindir}/nmap" -V | %__grep "Compiled 
with:" )
 # for the following tests, the leading space is relevant

++++++ nmap-ncat-fail-test-addrset.patch ++++++
From: Andreas Stieger <[email protected]>
Date: 2012-12-06 18:46:29 +0000
Subject: [PATCH] ncat - make check succeeds despite test failures
References: http://seclists.org/nmap-dev/2012/q4/373
Upstream: merged

For ncat, "make check" succeeds despite test failures. Patch corrects 
ncat/test/test-addrset.sh by exiting the script with a non-zero return value.

$ svn log -r30341:30350 https://svn.nmap.org/nmap/ncat/test/test-addrset.sh
------------------------------------------------------------------------
r30341 | david | 2012-12-05 06:48:15 +0000 (Wed, 05 Dec 2012) | 4 lines

Make test-addrset.sh exit with nonzero status if any tests fail.

Patch by Andreas Stieger.
http://seclists.org/nmap-dev/2012/q4/385
------------------------------------------------------------------------
r30350 | dmiller | 2012-12-06 18:46:29 +0000 (Thu, 06 Dec 2012) | 1 line

Change test-addrset.sh to be POSIX sh compliant
------------------------------------------------------------------------

---
 ncat/test/test-addrset.sh |   26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

Index: nmap-6.25/ncat/test/test-addrset.sh
===================================================================
--- nmap-6.25.orig/ncat/test/test-addrset.sh    2009-06-14 18:12:56.000000000 
+0100
+++ nmap-6.25/ncat/test/test-addrset.sh 2012-12-08 13:29:30.000000000 +0000
@@ -1,46 +1,56 @@
-#!/usr/bin/env bash
+#!/bin/sh
 
 # Automated tests for the addrset functions in ncat_hostmatch.c. This
 # program runs various addresses against different host specifications
 # and checks that the output is what is expected.
 
 ADDRSET=./addrset
+TESTS=0
+TEST_PASS=0
+TEST_FAIL=0
 
 # Takes as arguments a whitespace-separated list of host specifications
 # and a space-separated list of expected matching addresses. Tests hosts
 # are passed in stdin.
-function test_addrset() {
+test_addrset() {
        specs=$1
        expected=$2
        result=$($ADDRSET $specs)
        ret=$?
        # Change newlines to spaces.
        result=$(echo $result)
+       TESTS=$((TESTS + 1));
        if [ "$ret" != "0" ]; then
                echo "FAIL $ADDRSET returned $ret."
+               TEST_FAIL=$((TEST_FAIL + 1))
        elif [ "$result" != "$expected" ]; then
                echo "FAIL \"$result\" !="
                echo "     \"$expected\"."
+               TEST_FAIL=$((TEST_FAIL + 1))
        else
                echo "PASS $specs"
+               TEST_PASS=$((TEST_PASS + 1))
        fi
 }
 
 # Takes as an argument a host specification with invalid syntax. The
 # test passes if addrset returns with a non-zero exit code.
-function expect_fail() {
+expect_fail() {
        specs=$1
        $ADDRSET $specs < /dev/null 2> /dev/null
        ret=$?
-       if [ "$ret" == "0" ]; then
+       TESTS=$((TESTS + 1))
+       if [ "$ret" = "0" ]; then
                echo "FAIL $ADDRSET $specs was expected to fail, but didn't."
+               TEST_FAIL=$((TEST_FAIL + 1))
        else
                echo "PASS $specs"
+               TEST_PASS=$((TEST_PASS + 1))
        fi
 }
 
 # seq replacement for systems without seq.
-function seq() {
+seq() {
        low=$1
        high=$2
        while [ $low -le $high ]; do
@@ -296,3 +306,9 @@ expect_fail "FF::FF/129"
 # 1.2.0.3
 # 1.2.3.4
 # EOF
+
+if [ "$TEST_FAIL" -gt 0 ]; then
+       echo "$TEST_PASS / $TESTS passed, $TEST_FAIL failed"
+       exit 1
+fi
+echo "$TEST_PASS / $TESTS passed"
++++++ nmap-ncat-skip-network-tests.patch ++++++
From: Andreas Stieger <[email protected]>
Date: 2012-12-08 13:31:24 +0000
Subject: [PATCH] ncat - skip tests requiring name resolution
References: http://seclists.org/nmap-dev/2012/q4/373
Upstream: never

Some tests in the ncat test script require name resolution which is not 
available in OBS. Remove tests.

---
 ncat/test/test-addrset.sh |   20 --------------------
 1 file changed, 20 deletions(-)

Index: nmap-6.25/ncat/test/test-addrset.sh
===================================================================
--- nmap-6.25.orig/ncat/test/test-addrset.sh    2012-12-08 13:30:07.000000000 
+0000
+++ nmap-6.25/ncat/test/test-addrset.sh 2012-12-08 13:30:37.000000000 +0000
@@ -227,26 +227,6 @@ test_addrset "1:2::0003/0" "1:2::3 1:2::
 ff::00
 EOF
 
-# Name lookup.
-test_addrset "google.com" "google.com" <<EOF
-1:2::3:4
-1.2.3.4
-google.com
-EOF
-
-# Name lookup combined with CIDR netmask.
-test_addrset "google.com/30" "google.com" <<EOF
-1:2::3:4
-1.2.3.4
-google.com
-EOF
-
-# Name lookup combined with /0 CIDR netmask.
-test_addrset "google.com/0" "1.2.3.4 google.com" <<EOF
-1.2.3.4
-google.com
-EOF
-
 expect_fail "."
 expect_fail "-"
 expect_fail ","
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to