Package: openscap
Version: 1.3.10+dfsg-2
Severity: Serious

Hello, I found the package to require internet in one test, and this can be 
seen in Ubuntu
builders, where internet is more strictly forbidden

test 5
      Start  5: curl/test_curl_encoding.sh

5: Test command: /<<PKGBUILDDIR>>/tests/curl/test_curl_encoding.sh
5: Working Directory: /<<PKGBUILDDIR>>/build-py3.12/tests/curl
5: Environment variables:
5:  srcdir=/<<PKGBUILDDIR>>/tests/curl
5:  top_srcdir=/<<PKGBUILDDIR>>
5:  builddir=/<<PKGBUILDDIR>>/build-py3.12
5: Test timeout computed to be: 10000000
5: + cURL: Accept-Encoding
5: TEST: cURL: Accept-Encoding
5: OK
5: Couldn't assert gzip encoding in the log:
 5/37 Test  #5: curl/test_curl_encoding.sh .....................***Failed    
0.15 sec
+ cURL: Accept-Encoding
TEST: cURL: Accept-Encoding
OK
Couldn't assert gzip encoding in the log:

test 6
      Start  6: CPE/all.sh



some tests, e.g. test-curl-encoding, clearly needs internet to run

function curl_accept_encoding {
        # --fetch-remote-resources uses internet
        require_internet || return 255

        local DF="${srcdir}/ds.xml"
        local RF="results.xml"
        local LOG="verbose.log"

        $OSCAP xccdf --verbose=DEVEL eval --fetch-remote-resources --results $RF $DF 
2>$LOG || echo "OK"

        case $(uname) in
                FreeBSD)
                        grep -iE "Accept-Encoding.*gzip" "$LOG"
                        ;;
                *)
                        grep -iP "Accept-Encoding.*gzip" "$LOG"
                        ;;
        esac || die "Couldn't assert gzip encoding in the log: $(grep -i 'curl 
header' $LOG)"

        return 0
}

test_init

test_run "cURL: Accept-Encoding" curl_accept_encoding

test_exit



probably also
function test_ds_error_remote_resources() {
        # --fetch-remote-resources uses internet
        require_internet || return 255

        local DS="${srcdir}/$1"
        local PROFILE="$2"
        local result=$(mktemp)
        local stderr=$(mktemp)

        $OSCAP xccdf eval --fetch-remote-resources --profile "$PROFILE" --results "$result" 
"$DS" 2>"$stderr" || ret=$?
        grep -q "Downloading: https://www.example.com/security/data/oval/oval.xml.bz2 ... 
error" "$stderr"
        grep -q "OpenSCAP Error: Download failed" "$stderr"

        rm -f "$result" "$stderr"
}


needs patching.

thanks for having a look

G.

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to