]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add util/check-win32util-configure to precheck
authorMark Andrews <marka@isc.org>
Tue, 5 Mar 2019 02:46:29 +0000 (13:46 +1100)
committerMark Andrews <marka@isc.org>
Tue, 5 Mar 2019 22:41:33 +0000 (17:41 -0500)
(cherry picked from commit c3dd8bb9f0bd21410b8bb15b4a92da0636cc4d47)

.gitlab-ci.yml
util/check-win32util-configure [new file with mode: 0644]
util/copyrights
win32utils/Configure

index e1e45d13ea87db1c46c42dcee2dc34eb2fe44a2c..10da3e33654fc05f6260983264f31d9bf793c0e6 100644 (file)
@@ -167,6 +167,7 @@ misc:sid:amd64:
     - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
     - xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
     - xmllint --noout --nonet --html `git ls-files '*.html'`
+    - sh util/check-win32util-configure
   artifacts:
     paths:
       - util/newcopyrights
diff --git a/util/check-win32util-configure b/util/check-win32util-configure
new file mode 100644 (file)
index 0000000..bc07b58
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# See the COPYRIGHT file distributed with this work for additional
+# information regarding copyright ownership.
+
+status=0
+find */*/win32 win32utils -name \*.in |
+sed -e '/\/Makefile.in$/d' \
+    -e 's/\//\\\\\\\\/g' \
+    -e 's/.in$/"/' \
+    -e 's/^/"..\\\\\\\\/' \
+    -e 's/"..\\\\\\\\win32utils\\\\\\\\/"/' |
+while read f
+do
+       if grep -F "$f" win32utils/Configure > /dev/null
+       then
+               :
+       else
+               echo "missing $f from win32utils/Configure"
+               status=1
+       fi
+done
+if test -f win32utils/Configure
+then
+       cd win32utils
+       perl Configure checkfiles 2> /dev/null || status=1
+fi
+exit $status
index 9bbcbcf54964b77b38fb67b7635438878a4f0f60..ea719293ed89ad4ad820a00bda8baf58c2ae89fe 100644 (file)
 ./util/check-instincludes.sh                   SH      2000,2001,2004,2007,2012,2016,2018,2019
 ./util/check-pullups.pl                                PERL    2001,2002,2003,2004,2007,2012,2016,2018,2019
 ./util/check-sources.pl                                PERL    2000,2001,2004,2007,2012,2013,2016,2018,2019
+./util/check-win32util-configure               SH      2019
 ./util/checklibs.sh                            SH      2017,2018,2019
 ./util/commit-arm.sh                           SH      2012,2016,2018,2019
 ./util/copyrights                              X       1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
index c92b43fcf13528a2f3ed6a9194f9375b3b4f6cc1..e5332be000c4f452465bc1f93e3400f1689d5eb7 100644 (file)
@@ -202,12 +202,12 @@ my @substdefh = ("AES_CC",
                  "HAVE_LIBXML2",
                  "HAVE_OPENSSL_ED25519",
                  "HAVE_OPENSSL_ED448",
-                "HAVE_DH_GET0_KEY",
-                "HAVE_ECDSA_SIG_GET0",
-                "HAVE_RSA_SET0_KEY",
-                "USE_BACKTRACE",
-                "USE_OPENSSL",
-                "USE_PKCS11",
+                 "HAVE_DH_GET0_KEY",
+                 "HAVE_ECDSA_SIG_GET0",
+                 "HAVE_RSA_SET0_KEY",
+                 "USE_BACKTRACE",
+                 "USE_OPENSSL",
+                 "USE_PKCS11",
                  "HAVE_PKCS11_ED25519",
                  "HAVE_PKCS11_ED448",
                  "HAVE_READLINE",
@@ -218,18 +218,18 @@ my @substdefh = ("AES_CC",
                  "TUNE_LARGE",
                  "WANT_QUERYTRACE",
                  "WITH_IDN",
-                "CPU_RELAX",
+                 "CPU_RELAX",
                  "VALIDATION_DEFAULT",
-                "HAVE_CRYPTO_ZALLOC",
-                "HAVE_EVP_CIPHER_CTX_FREE",
-                "HAVE_EVP_CIPHER_CTX_NEW",
-                "HAVE_EVP_MD_CTX_FREE",
-                "HAVE_EVP_MD_CTX_NEW",
-                "HAVE_EVP_MD_CTX_RESET",
-                "HAVE_HMAC_CTX_FREE",
-                "HAVE_HMAC_CTX_GET_MD",
-                "HAVE_HMAC_CTX_NEW",
-                "HAVE_HMAC_CTX_RESET",
+                 "HAVE_CRYPTO_ZALLOC",
+                 "HAVE_EVP_CIPHER_CTX_FREE",
+                 "HAVE_EVP_CIPHER_CTX_NEW",
+                 "HAVE_EVP_MD_CTX_FREE",
+                 "HAVE_EVP_MD_CTX_NEW",
+                 "HAVE_EVP_MD_CTX_RESET",
+                 "HAVE_HMAC_CTX_FREE",
+                 "HAVE_HMAC_CTX_GET_MD",
+                 "HAVE_HMAC_CTX_NEW",
+                 "HAVE_HMAC_CTX_RESET",
     );
 
 # for platform.h
@@ -550,19 +550,26 @@ if ($legacy_only) {
 }
 
 if ($want_checkfiles eq "yes") {
+        my $status=0;
         foreach (@filelist) {
+                my $name = $_;
+                $name =~ s/\\/\\\\/g;
                 next if -r $_ . ".in";
                 s/\\/\//g;
                 next if -r $_ . ".in";
-                print "missing $_.in from filelist\n";
+                print "remove '$name' from filelist in win32utils/Configure or add to repository\n";
+                $status = 1;
         }
         foreach (@projectlist) {
+                my $name = $_;
+                $name =~ s/\\/\\\\/g;
                 next if -r $_ . ".in";
                 s/\\/\//g;
                 next if -r $_ . ".in";
-                print "missing $_.in from projectlist\n";
+                print "remove '$name' from projectlist in win32utils/Configure or add to repository\n";
+                $status = 1;
         }
-        exit(0);
+        exit($status);
 }
 
 # configure the platform
@@ -674,9 +681,9 @@ sub myenable {
             $enable_querytrace = "yes";
         }
     } elsif ($key =~ /^auto-validation$/i) {
-       if ($val =~ /^no$/i) {
-           $validation_default = "yes";
-       }
+        if ($val =~ /^no$/i) {
+            $validation_default = "yes";
+        }
     } else {
         $want_unknown = "yes";
         if ($val eq "no") {
@@ -727,7 +734,7 @@ sub mywith {
         }
     } elsif ($key =~ /^openssl$/i) {
         if ($val =~ /^no$/i) {
-           die "OpenSSL support is now mandatory\n";
+            die "OpenSSL support is now mandatory\n";
         } elsif ($val !~ /^yes$/i) {
             $use_openssl = "yes";
             $openssl_path = $val;
@@ -807,12 +814,12 @@ sub mywith {
             }
         }
     } elsif ($key =~ /^pssuspend$/i) {
-       if ($val =~ /^no$/i) {
-           $with_pssuspend = "no";
-       } else {
-           if ($val !~ /^yes$/i) {
-               $pssuspend_command = $val;
-           }
+        if ($val =~ /^no$/i) {
+            $with_pssuspend = "no";
+        } else {
+            if ($val !~ /^yes$/i) {
+                $pssuspend_command = $val;
+            }
         }
     } elsif ($key =~ /^python$/i) {
         if ($val =~ /^no$/i) {
@@ -1447,7 +1454,7 @@ EOF
 # check OpenSSL built-in support for DH/ECDSA/RSA/CRYPTO_ZALLOC/EVP_CIPHER_CTX/EVP_MD_CTX/HMAC_CTX functions
 if ($use_openssl eq "yes") {
     if ($verbose) {
-       printf "checking OpenSSL built-in support for DH/ECDSA/RSA/CRYPTO_ZALLOC/EVP_CIPHER_CTX/EVP_MD_CTX/HMAC_CTX functions\n";
+        printf "checking OpenSSL built-in support for DH/ECDSA/RSA/CRYPTO_ZALLOC/EVP_CIPHER_CTX/EVP_MD_CTX/HMAC_CTX functions\n";
     }
     open F, ">testosslfunc.c" || die $!;
     print F << 'EOF';
@@ -1460,7 +1467,7 @@ int main() {
         }
         printf("\n\nFound   OPENSSL_VERSION_NUMBER %#010x\n",
                OPENSSL_VERSION_NUMBER);
-       printf("This version has no built-in support for DH/ECDSA/RSA/CRYPTO_ZALLOC/EVP_CIPHER_CTX/EVP_MD_CTX/HMAC_CTX functions.\n\n");
+        printf("This version has no built-in support for DH/ECDSA/RSA/CRYPTO_ZALLOC/EVP_CIPHER_CTX/EVP_MD_CTX/HMAC_CTX functions.\n\n");
         return (1);
 }
 EOF
@@ -1474,15 +1481,15 @@ EOF
             $configdefh{"HAVE_DH_GET0_KEY"} = 1;
             $configdefh{"HAVE_ECDSA_SIG_GET0"} = 1;
             $configdefh{"HAVE_RSA_SET0_KEY"} = 1;
-           $configdefh{"HAVE_EVP_CIPHER_CTX_FREE"} = 1;
-           $configdefh{"HAVE_EVP_CIPHER_CTX_NEW"} = 1;
-           $configdefh{"HAVE_EVP_MD_CTX_FREE"} = 1;
-           $configdefh{"HAVE_EVP_MD_CTX_NEW"} = 1;
-           $configdefh{"HAVE_EVP_MD_CTX_RESET"} = 1;
-           $configdefh{"HAVE_HMAC_CTX_FREE"} = 1;
-           $configdefh{"HAVE_HMAC_CTX_GET_MD"} = 1;
-           $configdefh{"HAVE_HMAC_CTX_NEW"} = 1;
-           $configdefh{"HAVE_HMAC_CTX_RESET"} = 1;
+            $configdefh{"HAVE_EVP_CIPHER_CTX_FREE"} = 1;
+            $configdefh{"HAVE_EVP_CIPHER_CTX_NEW"} = 1;
+            $configdefh{"HAVE_EVP_MD_CTX_FREE"} = 1;
+            $configdefh{"HAVE_EVP_MD_CTX_NEW"} = 1;
+            $configdefh{"HAVE_EVP_MD_CTX_RESET"} = 1;
+            $configdefh{"HAVE_HMAC_CTX_FREE"} = 1;
+            $configdefh{"HAVE_HMAC_CTX_GET_MD"} = 1;
+            $configdefh{"HAVE_HMAC_CTX_NEW"} = 1;
+            $configdefh{"HAVE_HMAC_CTX_RESET"} = 1;
         }
     }
 }