[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
Thu Dec 13 17:03:06 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=192612

--- Comment #10 from Andy Estes <aestes at apple.com> ---
Comment on attachment 357259
  --> https://bugs.webkit.org/attachment.cgi?id=357259
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=357259&action=review

> Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig:403
> +ENABLE_HTTPS_UPGRADE = ;

This is the same as just not defining ENABLE_HTTPS_UPGRADE. You shouldn't need to change any FeatureDefines files until this feature will be at least conditionally enabled somewhere.

> Source/WebKit/Configurations/WebKit.xcconfig:155
> -EXCLUDED_SOURCE_FILE_NAMES = Resources/ios/*;
> +EXCLUDED_SOURCE_FILE_NAMES_BASE_ = Resources/ios/* ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2/HTTPSUpgradeList.db;
> +EXCLUDED_SOURCE_FILE_NAMES_BASE_ENABLE_HTTPS_UPGRADE = Resources/ios/*;
> +
> +EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_BASE_$(ENABLE_HTTPS_UPGRADE));

We can avoid repeating the "Resources/ios/*" part by splitting things up a little differently:

WK_EXCLUDED_HTTPS_UPGRADE_FILE = $(WK_EXCLUDED_HTTPS_UPGRADE_FILE_$(ENABLE_HTTPS_UPGRADE));
WK_EXCLUDED_HTTPS_UPGRADE_FILE_ = HTTPSUpgradeList.db;

EXCLUDED_SOURCE_FILE_NAMES = Resources/ios/* $(WK_EXCLUDED_HTTPS_UPGRADE_FILE);

(I *think* you can specify HTTPSUpgradeList.db without its path as long as it's included in the project).

> Source/WebKit/DerivedSources.make:320
> +HTTPSUpgradeList.db : $(WebKit2)/Scripts/generate-https-upgrade-database.sh

HTTPSUpgradeList.txt also needs to be a dependency here (as well as the script) because HTTPSUpgradeList.db needs to rebuild when it changes. See below about using VPATH to make this easier.

> Source/WebKit/Scripts/generate-https-upgrade-database.sh:24
> +RELATIVE_SOURCE_PATH="usr/local/include/WebKitAdditions"
> +SOURCE_PATH="${BUILT_PRODUCTS_DIR}/${RELATIVE_SOURCE_PATH}"
> +
> +if [[ ! -d "$SOURCE_PATH" ]]; then
> +  SOURCE_PATH="${SDK_DIR}/${RELATIVE_SOURCE_PATH}"
> +fi
> +
> +INPUT_FILE_PATH="${SOURCE_PATH}/HTTPSUpgradeList.txt"

I don't think you need all this. Note that DerivedSources.make has $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) in its VPATH, so it's set up to search $SDKROOT and $BUILT_PRODUCTS_DIR in the right order. I'd just have the makefile find HTTPSUpgradeList.txt in the VPATH then pass that path to the script as a command-line argument.

-- 
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/20181214/46cd724f/attachment.html>


More information about the webkit-unassigned mailing list