mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
Merge branch 'allowlist-blocklist' into 'master'
switch to allow/block list terminology throughout code base See merge request fdroid/fdroidserver!964
This commit is contained in:
commit
63444f8654
7 changed files with 11 additions and 11 deletions
|
|
@ -752,8 +752,8 @@ include tests/source-files/fdroid/fdroidclient/AndroidManifest.xml
|
||||||
include tests/source-files/fdroid/fdroidclient/build.gradle
|
include tests/source-files/fdroid/fdroidclient/build.gradle
|
||||||
include tests/source-files/firebase-suspect/app/build.gradle
|
include tests/source-files/firebase-suspect/app/build.gradle
|
||||||
include tests/source-files/firebase-suspect/build.gradle
|
include tests/source-files/firebase-suspect/build.gradle
|
||||||
include tests/source-files/firebase-whitelisted/app/build.gradle
|
include tests/source-files/firebase-allowlisted/app/build.gradle
|
||||||
include tests/source-files/firebase-whitelisted/build.gradle
|
include tests/source-files/firebase-allowlisted/build.gradle
|
||||||
include tests/source-files/info.guardianproject.ripple/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/build.gradle
|
||||||
include tests/source-files/open-keychain/open-keychain/OpenKeychain/build.gradle
|
include tests/source-files/open-keychain/open-keychain/OpenKeychain/build.gradle
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ done
|
||||||
cd /vagrant/cache
|
cd /vagrant/cache
|
||||||
|
|
||||||
# make links for `android update sdk` to use and delete
|
# 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.0.1-linux.zip
|
||||||
build-tools_r18.1-linux.zip
|
build-tools_r18.1-linux.zip
|
||||||
build-tools_r18.1.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`
|
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
|
for f in $latestm2 android-[0-9]*.zip platform-[0-9]*.zip build-tools_r*-linux.zip; do
|
||||||
rm -f ${ANDROID_HOME}/temp/$f
|
rm -f ${ANDROID_HOME}/temp/$f
|
||||||
if [[ $blacklist != *$f* ]]; then
|
if [[ $blocklist != *$f* ]]; then
|
||||||
ln -s /vagrant/cache/$f ${ANDROID_HOME}/temp/
|
ln -s /vagrant/cache/$f ${ANDROID_HOME}/temp/
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -806,7 +806,7 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
|
||||||
str(build.versionCode)))
|
str(build.versionCode)))
|
||||||
if (options.scan_binary or config.get('scan_binary')) and not options.skipscan:
|
if (options.scan_binary or config.get('scan_binary')) and not options.skipscan:
|
||||||
if scanner.scan_binary(src):
|
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
|
# Copy the unsigned APK to our destination directory for further
|
||||||
# processing (by publish.py)...
|
# processing (by publish.py)...
|
||||||
|
|
|
||||||
|
|
@ -136,18 +136,18 @@ def scan_source(build_dir, build=metadata.Build()):
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
whitelisted = [
|
allowlisted = [
|
||||||
'firebase-jobdispatcher', # https://github.com/firebase/firebase-jobdispatcher-android/blob/master/LICENSE
|
'firebase-jobdispatcher', # https://github.com/firebase/firebase-jobdispatcher-android/blob/master/LICENSE
|
||||||
'com.firebaseui', # https://github.com/firebase/FirebaseUI-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
|
'geofire-android' # https://github.com/firebase/geofire-java/blob/master/LICENSE
|
||||||
]
|
]
|
||||||
|
|
||||||
def is_whitelisted(s):
|
def is_allowlisted(s):
|
||||||
return any(wl in s for wl in whitelisted)
|
return any(al in s for al in allowlisted)
|
||||||
|
|
||||||
def suspects_found(s):
|
def suspects_found(s):
|
||||||
for n, r in NON_FREE_GRADLE_LINES.items():
|
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
|
yield n
|
||||||
|
|
||||||
allowed_repos = [re.compile(r'^https://' + re.escape(repo) + r'/*') for repo in [
|
allowed_repos = [re.compile(r'^https://' + re.escape(repo) + r'/*') for repo in [
|
||||||
|
|
|
||||||
|
|
@ -1376,8 +1376,8 @@ class CommonTest(unittest.TestCase):
|
||||||
'source-files/fdroid/fdroidclient/build.gradle',
|
'source-files/fdroid/fdroidclient/build.gradle',
|
||||||
'source-files/firebase-suspect/app/build.gradle',
|
'source-files/firebase-suspect/app/build.gradle',
|
||||||
'source-files/firebase-suspect/build.gradle',
|
'source-files/firebase-suspect/build.gradle',
|
||||||
'source-files/firebase-whitelisted/app/build.gradle',
|
'source-files/firebase-allowlisted/app/build.gradle',
|
||||||
'source-files/firebase-whitelisted/build.gradle',
|
'source-files/firebase-allowlisted/build.gradle',
|
||||||
'source-files/org.mozilla.rocket/app/build.gradle',
|
'source-files/org.mozilla.rocket/app/build.gradle',
|
||||||
'source-files/realm/react-native/android/build.gradle',
|
'source-files/realm/react-native/android/build.gradle',
|
||||||
'triple-t-2/build/org.piwigo.android/app/build.gradle',
|
'triple-t-2/build/org.piwigo.android/app/build.gradle',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue