From e802c8b9dd230301f257ac9151d446d16eeb12f5 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 8 May 2020 14:29:14 +1000 Subject: [PATCH 1/3] Update util/check-categories.sh for logging-categories.rst and call from CI --- .gitlab-ci.yml | 1 + util/check-categories.sh | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a58f62588..e1627c0dd4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -396,6 +396,7 @@ misc: - xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'` - xmllint --noout --nonet --html `git ls-files '*.html'` - sh util/check-win32util-configure + - sh util/check-categories.sh needs: [] artifacts: paths: diff --git a/util/check-categories.sh b/util/check-categories.sh index dff066796d..4e582f5d9b 100644 --- a/util/check-categories.sh +++ b/util/check-categories.sh @@ -7,12 +7,21 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -list1=`grep LOGCATEGORY lib/*/include/*/*.h bin/named/include/named/*.h | -grep "#define.*(&" | -sed -e 's/.*LOGCATEGORY_\([A-Z_]*\).*/\1/' -e 's/^RRL$/rate-limit/' | -tr '[A-Z]' '[a-z]' | -tr _ - | sed 's/^tat$/trust-anchor-telemetry/' | sort -u` -list2=`sed -n 's;.*\(.*\);\1;p' doc/arm/logging-categories.xml | tr '[A-Z]' '[a-z]' | sort -u` +list1=$( + grep LOGCATEGORY lib/*/include/*/*.h bin/named/include/named/*.h | + grep "#define.*(&" | + sed -e 's/.*LOGCATEGORY_\([A-Z_]*\).*/\1/' -e 's/^RRL$/rate-limit/' | + tr '[A-Z]' '[a-z]' | + tr _ - | + sed 's/^tat$/trust-anchor-telemetry/' | + sort -u +) +list2=$( + awk '$1 == "|" && $3 == "|" && $NF == "|" && $2 ~ /^``.*``$/ { print $2 }' doc/arm/logging-categories.rst | + sed 's/``//g' | + sort -u +) +status=0 for i in $list1 do ok=no @@ -26,6 +35,7 @@ do if test $ok = no then echo "$i missing from documentation." + status=1 fi done for i in $list2 @@ -41,5 +51,7 @@ do if test $ok = no then echo "$i not in code." + status=1 fi done +exit $status From 9e100f919623aeb6a4cf2cfb10ff6529f3e7e3de Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 8 May 2020 14:34:34 +1000 Subject: [PATCH 2/3] remove xmllint of .html files --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e1627c0dd4..5ddb268400 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -394,7 +394,6 @@ misc: - perl -w util/update_copyrights < util/copyrights - 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 - sh util/check-categories.sh needs: [] From b92ab5331e6ce9373bbe7828976eb7b7cd3d610c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 8 May 2020 14:52:41 +1000 Subject: [PATCH 3/3] Add rpz-passthru category to logging-categories.rst --- doc/arm/logging-categories.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/arm/logging-categories.rst b/doc/arm/logging-categories.rst index f3dba3c43f..9081fcf4c1 100644 --- a/doc/arm/logging-categories.rst +++ b/doc/arm/logging-categories.rst @@ -145,6 +145,10 @@ | | files, rewritten responses, and at the highest | | | ``debug`` levels, mere rewriting attempts. | +----------------------------+----------------------------------------------------+ +| ``rpz-passthru`` | Information about RPZ PASSTHRU policy activity. | +| | This category allows the whitelist policy activity | +| | to be logged into a dedicated channel. | ++----------------------------+----------------------------------------------------+ | ``security`` | Approval and denial of requests. | +----------------------------+----------------------------------------------------+ | ``serve-stale`` | Whether or not a stale answer is used following a |