switch to allow/block list terminology throughout code base

allowlist and blocklist are much clearer terms with no cultural baggage.
This changes all "whitelist" references to "allowlist", and all "blacklist"
references to "blocklist".
This commit is contained in:
Hans-Christoph Steiner 2021-06-17 14:46:51 +02:00 committed by Jochen Sprickerhof
parent 8667073188
commit 78d37bb13b
7 changed files with 11 additions and 11 deletions

View File

@ -752,8 +752,8 @@ include tests/source-files/fdroid/fdroidclient/AndroidManifest.xml
include tests/source-files/fdroid/fdroidclient/build.gradle
include tests/source-files/firebase-suspect/app/build.gradle
include tests/source-files/firebase-suspect/build.gradle
include tests/source-files/firebase-whitelisted/app/build.gradle
include tests/source-files/firebase-whitelisted/build.gradle
include tests/source-files/firebase-allowlisted/app/build.gradle
include tests/source-files/firebase-allowlisted/build.gradle
include tests/source-files/info.guardianproject.ripple/build.gradle
include tests/source-files/open-keychain/open-keychain/build.gradle
include tests/source-files/open-keychain/open-keychain/OpenKeychain/build.gradle

View File

@ -44,7 +44,7 @@ done
cd /vagrant/cache
# make links for `android update sdk` to use and delete
blacklist="build-tools_r17-linux.zip
blocklist="build-tools_r17-linux.zip
build-tools_r18.0.1-linux.zip
build-tools_r18.1-linux.zip
build-tools_r18.1.1-linux.zip
@ -66,7 +66,7 @@ blacklist="build-tools_r17-linux.zip
latestm2=`ls -1 android_m2repository*.zip | sort -n | tail -1`
for f in $latestm2 android-[0-9]*.zip platform-[0-9]*.zip build-tools_r*-linux.zip; do
rm -f ${ANDROID_HOME}/temp/$f
if [[ $blacklist != *$f* ]]; then
if [[ $blocklist != *$f* ]]; then
ln -s /vagrant/cache/$f ${ANDROID_HOME}/temp/
fi
done

View File

@ -806,7 +806,7 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
str(build.versionCode)))
if (options.scan_binary or config.get('scan_binary')) and not options.skipscan:
if scanner.scan_binary(src):
raise BuildException("Found blacklisted packages in final apk!")
raise BuildException("Found blocklisted packages in final apk!")
# Copy the unsigned APK to our destination directory for further
# processing (by publish.py)...

View File

@ -136,18 +136,18 @@ def scan_source(build_dir, build=metadata.Build()):
count = 0
whitelisted = [
allowlisted = [
'firebase-jobdispatcher', # https://github.com/firebase/firebase-jobdispatcher-android/blob/master/LICENSE
'com.firebaseui', # https://github.com/firebase/FirebaseUI-Android/blob/master/LICENSE
'geofire-android' # https://github.com/firebase/geofire-java/blob/master/LICENSE
]
def is_whitelisted(s):
return any(wl in s for wl in whitelisted)
def is_allowlisted(s):
return any(al in s for al in allowlisted)
def suspects_found(s):
for n, r in NON_FREE_GRADLE_LINES.items():
if r.match(s) and not is_whitelisted(s):
if r.match(s) and not is_allowlisted(s):
yield n
allowed_repos = [re.compile(r'^https://' + re.escape(repo) + r'/*') for repo in [

View File

@ -1376,8 +1376,8 @@ class CommonTest(unittest.TestCase):
'source-files/fdroid/fdroidclient/build.gradle',
'source-files/firebase-suspect/app/build.gradle',
'source-files/firebase-suspect/build.gradle',
'source-files/firebase-whitelisted/app/build.gradle',
'source-files/firebase-whitelisted/build.gradle',
'source-files/firebase-allowlisted/app/build.gradle',
'source-files/firebase-allowlisted/build.gradle',
'source-files/org.mozilla.rocket/app/build.gradle',
'source-files/realm/react-native/android/build.gradle',
'triple-t-2/build/org.piwigo.android/app/build.gradle',