[Webkit-unassigned] [Bug 192612] HTTPS Upgrade: Scripts / preprocessing necessary to create new database in future
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 11 21:49:06 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=192612
--- Comment #3 from Vivek Seth <v_seth at apple.com> ---
This is the script used in my new build stage:
```
# This script requires that HTTPSUpgradeList.txt has the following format:
# 1. It must be a plain text file with domains delimited by new lines ("\n").
# 2. The file must not contain duplicate domains.
# 3. All domains must be lowercase.
# 4. All domains must be IDNA encoded.
set -e
# Do not create database if feature flag is disabled.
if [[ -z "${ENABLE_HTTPS_UPGRADE}" ]]; then
exit 0
fi
WK_ADDITIONS_PATH="usr/local/include/WebKitAdditions"
INPUT_FILE_PATH="${BUILT_PRODUCTS_DIR}/${WK_ADDITIONS_PATH}/HTTPSUpgradeList.txt"
OUTPUT_FILE_PATH="${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/HTTPSUpgradeList.db"
DB_VERSION="1";
DB_SCHEMA="CREATE TABLE hosts (host TEXT PRIMARY KEY);"
# Return early if we don't have HTTPSUpgradeList.txt
if [[ ! -f "${INPUT_FILE_PATH}" ]]; then
exit 0
fi
# Only create database for macOS and iOS.
if [[ "${WK_PLATFORM_NAME}" != "macosx" && "${WK_PLATFORM_NAME}" != "iphoneos" ]]; then
exit 0
fi
# Delete database if it exists.
if [[ -f "${OUTPUT_FILE_PATH}" ]]; then
rm "${OUTPUT_FILE_PATH}"
fi
# Create database.
sqlite3 "${OUTPUT_FILE_PATH}" "PRAGMA user_version=${DB_VERSION}" "${DB_SCHEMA}" ".import ${INPUT_FILE_PATH} hosts" ".exit"
```
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181212/ea1c3ce6/attachment.html>
More information about the webkit-unassigned
mailing list