-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-120522: Apply App Store compliance patch to installed products, not source #121830
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -695,7 +695,7 @@ list-targets: | |
@grep -E '^[A-Za-z][-A-Za-z0-9]+:' Makefile | awk -F : '{print $$1}' | ||
|
||
.PHONY: build_all | ||
build_all: check-clean-src @APP_STORE_COMPLIANCE_PATCH_TARGET@ $(BUILDPYTHON) platform sharedmods \ | ||
build_all: check-clean-src $(BUILDPYTHON) platform sharedmods \ | ||
gdbhooks Programs/_testembed scripts checksharedmods rundsymutil | ||
|
||
.PHONY: build_wasm | ||
|
@@ -936,12 +936,9 @@ $(BUILDPYTHON)-gdb.py: $(SRC_GDB_HOOKS) | |
# known modifications to the source tree before building. The patch will be | ||
# applied in a dry-run mode (validating, but not applying the patch) on builds | ||
# that *have* a compliance patch, but where compliance has not been enabled. | ||
build/app-store-compliant: | ||
patch @APP_STORE_COMPLIANCE_PATCH_FLAGS@ --forward --strip=1 --directory="$(srcdir)" --input "$(APP_STORE_COMPLIANCE_PATCH)" | ||
@if test "@APP_STORE_COMPLIANCE_PATCH_FLAGS@" == ""; then \ | ||
mkdir -p build ; \ | ||
echo "$(APP_STORE_COMPLIANCE_PATCH)" > build/app-store-compliant ; \ | ||
fi | ||
.PHONY: app-store-compliant | ||
app-store-compliant: libinstall | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Continuing to have a separate Makefile rule to do the patch seems like a good idea at first, but unfortunately it doesn't play well with how the I think we can simplify this by just moving the patch step directly into the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤦 I completely forgot about the PYC compilation. It's obvious when I think about it. |
||
patch @APP_STORE_COMPLIANCE_PATCH_FLAGS@ --forward --strip=2 --directory="$(LIBDEST)" --input "$(abs_srcdir)/$(APP_STORE_COMPLIANCE_PATCH)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The install location needs to include DESTDIR:
Also, should include the |
||
|
||
# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary | ||
# minimal framework (not including the Lib directory and such) in the current | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
The app store compliance patch is now applied to the installed products, | ||
rather than to the original source tree. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the original PR hasn't been in a release yet, there's no need to add a blurb for this change. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -710,17 +710,17 @@ AC_ARG_WITH( | |
Darwin|iOS) | ||
# iOS is able to share the macOS patch | ||
APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" | ||
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" | ||
APP_STORE_COMPLIANCE_PATCH_FLAGS= | ||
INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" | ||
;; | ||
*) AC_MSG_ERROR([no default app store compliance patch available for $ac_sys_system]) ;; | ||
esac | ||
AC_MSG_RESULT([applying default app store compliance patch]) | ||
;; | ||
*) | ||
APP_STORE_COMPLIANCE_PATCH="${withval}" | ||
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" | ||
APP_STORE_COMPLIANCE_PATCH_FLAGS= | ||
INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" | ||
AC_MSG_RESULT([applying custom app store compliance patch]) | ||
;; | ||
esac | ||
|
@@ -729,28 +729,26 @@ AC_ARG_WITH( | |
iOS) | ||
# Always apply the compliance patch on iOS; we can use the macOS patch | ||
APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" | ||
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" | ||
APP_STORE_COMPLIANCE_PATCH_FLAGS= | ||
INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" | ||
AC_MSG_RESULT([applying default app store compliance patch]) | ||
;; | ||
Darwin) | ||
# Always *check* the compliance patch on macOS | ||
APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" | ||
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" | ||
APP_STORE_COMPLIANCE_PATCH_FLAGS="--dry-run" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While reviewing the Makefile changes, I was reminded of the
So the net effect for this patch is kinda OK, since urlib/parse.py was successfully patched and the It appears that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't know about Ignoring patch errors seems like a bad idea to me - we want the patch to be noisy if it can't be applied, so that we know the patch needs to be updated. Maybe we could split the difference - always do a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose that could work assuming we can trust |
||
INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" | ||
AC_MSG_RESULT([checking (not applying) default app store compliance patch]) | ||
;; | ||
*) | ||
# No app compliance patching on any other platform | ||
APP_STORE_COMPLIANCE_PATCH= | ||
APP_STORE_COMPLIANCE_PATCH_TARGET= | ||
APP_STORE_COMPLIANCE_PATCH_FLAGS= | ||
AC_MSG_RESULT([not patching for app store compliance]) | ||
;; | ||
esac | ||
]) | ||
AC_SUBST([APP_STORE_COMPLIANCE_PATCH]) | ||
AC_SUBST([APP_STORE_COMPLIANCE_PATCH_TARGET]) | ||
AC_SUBST([APP_STORE_COMPLIANCE_PATCH_FLAGS]) | ||
|
||
AC_SUBST([_PYTHON_HOST_PLATFORM]) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll have to amend this comment to align it with the new behaviour :)
I may also be worth mentioning that this target is added to
INSTALLTARGETS
by the configure script.