From d8b9ca2f5ad16eeca0e24d2d7c89ee841d8124d9 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 5 Mar 2019 13:46:29 +1100 Subject: [PATCH] add util/check-win32util-configure to precheck (cherry picked from commit c3dd8bb9f0bd21410b8bb15b4a92da0636cc4d47) --- .gitlab-ci.yml | 1 + util/check-win32util-configure | 32 ++++++++++++++++++++++++++++++++ util/copyrights | 1 + win32utils/Configure | 25 ++++++++++++++++--------- 4 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 util/check-win32util-configure diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0363246179..308bd0cf96 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 index 0000000000..bc07b58dc5 --- /dev/null +++ b/util/check-win32util-configure @@ -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 diff --git a/util/copyrights b/util/copyrights index f61f723751..62963456d5 100644 --- a/util/copyrights +++ b/util/copyrights @@ -4449,6 +4449,7 @@ ./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 diff --git a/win32utils/Configure b/win32utils/Configure index ad99f8997b..03550fcb88 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -719,19 +719,26 @@ if ($legacy_only && ($want_x64 ne "yes")) { } 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 @@ -1006,12 +1013,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) {