From 18da9839709c28b8557a02230bde7b5803515e98 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Thu, 2 Dec 2021 13:26:11 +0100 Subject: [PATCH 1/3] Run gcc:pkcs11 CI jobs on Fedora image SoftHSM v2.4 was dropped from the base image because it is being upgraded to Debian Bullseye, which has SoftHSM v2.6, the same version we already have in the Fedora image, and use it in the "main" branch for PKCS#11 testing. However, on the "v9_11" branch, to sustain PKCS#11 testing, gcc:pkcs11 CI jobs need to be ported from the base image to the Fedora image. --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a91d1d671d..2e417e22a1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1192,25 +1192,25 @@ unit:clang:buster:amd64: - job: clang:buster:amd64 artifacts: true -# Jobs for PKCS#11-enabled GCC builds on Debian Sid (amd64) +# Jobs for PKCS#11-enabled GCC builds on Fedora 34 (amd64) gcc:pkcs11: variables: CC: gcc CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib/softhsm/libsofthsm2.so" - <<: *base_image + EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib64/pkcs11/libsofthsm2.so" + <<: *fedora_34_amd64_image <<: *build_job system:gcc:pkcs11: - <<: *base_image + <<: *fedora_34_amd64_image <<: *system_test_job needs: - job: gcc:pkcs11 artifacts: true unit:gcc:pkcs11: - <<: *base_image + <<: *fedora_34_amd64_image <<: *unit_test_job needs: - job: gcc:pkcs11 From fd9e100b423d734acc371d85b9126e6627a4ad2d Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Thu, 2 Dec 2021 13:33:13 +0100 Subject: [PATCH 2/3] Drop gcc:fedora34 CI jobs With switching the gcc:pkcs11 CI jobs from Debian Buster to Fedora, we don't need two Fedora CI jobs, which differ only by leveraging PKCS#11 or OpenSSL. --- .gitlab-ci.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e417e22a1..beb114a9c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -905,30 +905,6 @@ unit:gcc:tumbleweed:amd64: - job: gcc:tumbleweed:amd64 artifacts: true -# Jobs for regular GCC builds on Fedora 34 (amd64) - -gcc:fedora34:amd64: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON} -O1" - EXTRA_CONFIGURE: "--with-libidn2" - <<: *fedora_34_amd64_image - <<: *build_job - -system:gcc:fedora34:amd64: - <<: *fedora_34_amd64_image - <<: *system_test_job - needs: - - job: gcc:fedora34:amd64 - artifacts: true - -unit:gcc:fedora34:amd64: - <<: *fedora_34_amd64_image - <<: *unit_test_job - needs: - - job: gcc:fedora34:amd64 - artifacts: true - # Jobs for regular GCC builds on Ubuntu 18.04 Bionic Beaver (amd64) gcc:bionic:amd64: From 99e127ffc83f2862176cb32fe86da30dbcc93a23 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Thu, 2 Dec 2021 13:50:30 +0100 Subject: [PATCH 3/3] Configure gcc:pkcs11 CI job with "--disable-warn-error" "--disable-warn-error" ./configure option disables compiler warnings. This ensures that the job will not fail because of warnings (e.g., array inconsistencies in lib/isc/sha2.c) we don't want to fix on BIND 9.11 because the version is in security-fixes-only mode. sha2.c:310:26: error: argument 1 of type 'uint8_t[]' {aka 'unsigned char[]'} with mismatched bound [-Werror=array-parameter=] 310 | isc_sha224_final(uint8_t digest[], isc_sha224_t *context) { | ~~~~~~~~^~~~~~~~ In file included from sha2.c:58: ./include/isc/sha2.h:132:24: note: previously declared as 'uint8_t[28]' {aka 'unsigned char[28]'} 132 | void isc_sha224_final (uint8_t[ISC_SHA224_DIGESTLENGTH], isc_sha224_t *); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sha2.c:376:26: error: argument 1 of type 'uint8_t[]' {aka 'unsigned char[]'} with mismatched bound [-Werror=array-parameter=] 376 | isc_sha256_final(uint8_t digest[], isc_sha256_t *context) { | ~~~~~~~~^~~~~~~~ In file included from sha2.c:58: ./include/isc/sha2.h:139:24: note: previously declared as 'uint8_t[32]' {aka 'unsigned char[32]'} 139 | void isc_sha256_final (uint8_t[ISC_SHA256_DIGESTLENGTH], isc_sha256_t *); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sha2.c:442:26: error: argument 1 of type 'uint8_t[]' {aka 'unsigned char[]'} with mismatched bound [-Werror=array-parameter=] 442 | isc_sha512_final(uint8_t digest[], isc_sha512_t *context) { | ~~~~~~~~^~~~~~~~ In file included from sha2.c:58: ./include/isc/sha2.h:153:24: note: previously declared as 'uint8_t[64]' {aka 'unsigned char[64]'} 153 | void isc_sha512_final (uint8_t[ISC_SHA512_DIGESTLENGTH], isc_sha512_t *); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sha2.c:508:26: error: argument 1 of type 'uint8_t[]' {aka 'unsigned char[]'} with mismatched bound [-Werror=array-parameter=] 508 | isc_sha384_final(uint8_t digest[], isc_sha384_t *context) { | ~~~~~~~~^~~~~~~~ In file included from sha2.c:58: ./include/isc/sha2.h:146:24: note: previously declared as 'uint8_t[48]' {aka 'unsigned char[48]'} 146 | void isc_sha384_final (uint8_t[ISC_SHA384_DIGESTLENGTH], isc_sha384_t *); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index beb114a9c1..be773af7a4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1170,11 +1170,15 @@ unit:clang:buster:amd64: # Jobs for PKCS#11-enabled GCC builds on Fedora 34 (amd64) +# "--disable-warn-error" ./configure option disables compiler warnings. This +# ensures that the job will not fail because of warnings (e.g., array +# inconsistencies in lib/isc/sha2.c) we don't want to fix on BIND 9.11 because +# the version is in security-fixes-only mode. gcc:pkcs11: variables: CC: gcc CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib64/pkcs11/libsofthsm2.so" + EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib64/pkcs11/libsofthsm2.so --disable-warn-error" <<: *fedora_34_amd64_image <<: *build_job