Merge branch 'tkrizek/gitignore-fixes-v9_18' into 'v9_18'

[9.18] Don't track gitignored files in the repo

See merge request isc-projects/bind9!7274
This commit is contained in:
Tom Krizek
2022-12-23 14:14:28 +00:00
32 changed files with 39 additions and 13 deletions

View File

@@ -450,6 +450,7 @@ misc:
- test ! -f CHANGES.SE || sh util/check-line-length.sh CHANGES.SE
- rm CHANGES.tmp
- sh util/check-categories.sh
- sh util/check-gitignore.sh
- if git grep SYSTEMTESTTOP -- ':!.gitlab-ci.yml'; then echo 'Please use relative paths instead of $SYSTEMTESTTOP.'; exit 1; fi
- bash util/unused-headers.sh
- bash util/xmllint-html.sh

View File

@@ -4,7 +4,6 @@
/ns3/named.conf
/ns3/named2.conf
/ns4/named.conf
/ans5/ans.pl
/ans5/ans.pid
/dnsrps-secondary.conf
/dnsrps.conf

View File

@@ -1,3 +1,8 @@
/*.local
/*.queries
/*.conf
/named.1*.conf
/named.2*.conf
/named.3*.conf
/named.4*.conf
/named.5*.conf
/named.6*.conf

View File

@@ -41,7 +41,7 @@ if $test_fixed; then
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
dig_cmd @10.53.0.1 fixed.example > dig.out.fixed || ret=1
diff dig.out.fixed dig.out.fixed.good >/dev/null || ret=1
diff dig.out.fixed reference.dig.out.fixed.good >/dev/null || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
@@ -133,7 +133,7 @@ do
match=0
for j in $GOOD_RANDOM
do
eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
eval "diff dig.out.random reference.dig.out.random.good$j >/dev/null && match$j=1 match=1"
if [ $match -eq 1 ]; then break; fi
done
if [ $match -eq 0 ]; then ret=1; fi
@@ -172,7 +172,7 @@ if $test_fixed; then
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
dig_cmd @10.53.0.2 fixed.example > dig.out.fixed || ret=1
diff dig.out.fixed dig.out.fixed.good || ret=1
diff dig.out.fixed reference.dig.out.fixed.good || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
@@ -242,7 +242,7 @@ do
match=0
for j in $GOOD_RANDOM
do
eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
eval "diff dig.out.random reference.dig.out.random.good$j >/dev/null && match$j=1 match=1"
if [ $match -eq 1 ]; then break; fi
done
if [ $match -eq 0 ]; then ret=1; fi
@@ -297,7 +297,7 @@ if $test_fixed; then
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
dig_cmd @10.53.0.2 fixed.example > dig.out.fixed || ret=1
diff dig.out.fixed dig.out.fixed.good || ret=1
diff dig.out.fixed reference.dig.out.fixed.good || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
@@ -367,7 +367,7 @@ do
match=0
for j in $GOOD_RANDOM
do
eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
eval "diff dig.out.random reference.dig.out.random.good$j >/dev/null && match$j=1 match=1"
if [ $match -eq 1 ]; then break; fi
done
if [ $match -eq 0 ]; then ret=1; fi
@@ -406,7 +406,7 @@ if $test_fixed; then
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
dig_cmd @10.53.0.3 fixed.example > dig.out.fixed || ret=1
diff dig.out.fixed dig.out.fixed.good || ret=1
diff dig.out.fixed reference.dig.out.fixed.good || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
@@ -480,7 +480,7 @@ do
match=0
for j in $GOOD_RANDOM
do
eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
eval "diff dig.out.random reference.dig.out.random.good$j >/dev/null && match$j=1 match=1"
if [ $match -eq 1 ]; then break; fi
done
if [ $match -eq 0 ]; then ret=1; fi
@@ -522,7 +522,7 @@ do
match=0
for j in $GOOD_RANDOM
do
eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
eval "diff dig.out.random reference.dig.out.random.good$j >/dev/null && match$j=1 match=1"
if [ $match -eq 1 ]; then break; fi
done
if [ $match -eq 0 ]; then ret=1; fi

View File

@@ -1,5 +1,4 @@
/ans2/ans.pid
/ans2/ans.pl
/ns1/named.conf
/ns3/named.conf
/ns3/root.bk

View File

@@ -1 +0,0 @@
Makefile

23
util/check-gitignore.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# 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 https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
ignored_yet_tracked="$(git ls-files --cached --ignored --exclude-standard | git check-ignore --verbose --stdin --no-index)"
if [ -n "${ignored_yet_tracked}" ]; then
echo "The following .gitignore files contain patterns matching tracked files:"
echo
echo "${ignored_yet_tracked}"
echo
echo "Please adjust the contents of the above .gitignore files and/or the names of the tracked files."
exit 1
fi