-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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: Add a --with-app-store-compliance
configure option to patch out problematic code
#120984
Conversation
I've flagged this for backport to 3.13, and documented the option as being added in 3.13. The issue also exists in (and was originally reported against) 3.12; I'm not sure what the policy is regarding a backport of a new (strictly optional) configuration option. |
!buildbot iOS |
🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit eee0c93 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
Co-authored-by: Nice Zombies <[email protected]>
Co-authored-by: Nice Zombies <[email protected]>
Did this get fixed already? https://buildbot.python.org/all/#/builders/1382/builds/32 patch -p1 --dry-run < ../../Mac/Resources/app-store-compliance.patch
File to patch:
No file found--skip this patch? [y]
/bin/sh: line 1: 33119 Segmentation fault: 11 patch -p1 --dry-run < ../../Mac/Resources/app-store-compliance.patch
make: *** [app-store-compliance] Error 139 |
No - the patch command isn't quite right for out-of-tree builds. I need to make a small tweak. |
!buildbot iOS |
🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit 2d5a0a7 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
Hrm... that still isn't quite right. I'll need to take another look in the morning. |
Thanks @freakboy3742 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
… to patch out problematic code (pythonGH-120984) * Add --app-store-compliance configuration option. * Added blurb. * Correct tab-vs-spaces formatting issue. * Correct source file name in docs. Co-authored-by: Nice Zombies <[email protected]> * Correct source code reference in Mac docs Co-authored-by: Nice Zombies <[email protected]> * Only apply the patch forward, and ensure the working directory is correct. * Make patching reslient to multiple builds. * Documentation fixes found during review Co-authored-by: Alyssa Coghlan <[email protected]> * Documentation and configure.ac syntax improvements Co-authored-by: Erlend E. Aasland <[email protected]> * Regenerate configure script. * Silence the patch echo output. --------- (cherry picked from commit 48cd104) Co-authored-by: Russell Keith-Magee <[email protected]> Co-authored-by: Nice Zombies <[email protected]> Co-authored-by: Alyssa Coghlan <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
GH-121173 is a backport of this pull request to the 3.13 branch. |
Thanks @freakboy3742 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, @freakboy3742, I could not cleanly backport this to
|
… option to patch out problematic code (pythonGH-120984) * Add --app-store-compliance configuration option. * Added blurb. * Correct tab-vs-spaces formatting issue. * Correct source file name in docs. Co-authored-by: Nice Zombies <[email protected]> * Correct source code reference in Mac docs Co-authored-by: Nice Zombies <[email protected]> * Only apply the patch forward, and ensure the working directory is correct. * Make patching reslient to multiple builds. * Documentation fixes found during review Co-authored-by: Alyssa Coghlan <[email protected]> * Documentation and configure.ac syntax improvements Co-authored-by: Erlend E. Aasland <[email protected]> * Regenerate configure script. * Silence the patch echo output. --------- (cherry picked from commit 48cd104) Co-authored-by: Russell Keith-Magee <[email protected]> Co-authored-by: Nice Zombies <[email protected]> Co-authored-by: Alyssa Coghlan <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
… option to patch out problematic code (pythonGH-120984) * Add --app-store-compliance configuration option. * Added blurb. * Correct tab-vs-spaces formatting issue. * Correct source file name in docs. Co-authored-by: Nice Zombies <[email protected]> * Correct source code reference in Mac docs Co-authored-by: Nice Zombies <[email protected]> * Only apply the patch forward, and ensure the working directory is correct. * Make patching reslient to multiple builds. * Documentation fixes found during review Co-authored-by: Alyssa Coghlan <[email protected]> * Documentation and configure.ac syntax improvements Co-authored-by: Erlend E. Aasland <[email protected]> * Regenerate configure script. * Silence the patch echo output. --------- (cherry picked from commit 48cd104) Co-authored-by: Russell Keith-Magee <[email protected]> Co-authored-by: Nice Zombies <[email protected]> Co-authored-by: Alyssa Coghlan <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
… option to patch out problematic code (pythonGH-120984) * Add --app-store-compliance configuration option. * Added blurb. * Correct tab-vs-spaces formatting issue. * Correct source file name in docs. Co-authored-by: Nice Zombies <[email protected]> * Correct source code reference in Mac docs Co-authored-by: Nice Zombies <[email protected]> * Only apply the patch forward, and ensure the working directory is correct. * Make patching reslient to multiple builds. * Documentation fixes found during review Co-authored-by: Alyssa Coghlan <[email protected]> * Documentation and configure.ac syntax improvements Co-authored-by: Erlend E. Aasland <[email protected]> * Regenerate configure script. * Silence the patch echo output. --------- (cherry picked from commit 48cd104) Co-authored-by: Russell Keith-Magee <[email protected]> Co-authored-by: Nice Zombies <[email protected]> Co-authored-by: Alyssa Coghlan <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
GH-121174 is a backport of this pull request to the 3.12 branch. |
…n to patch out problematic code (GH-120984) (#121173) gh-120522: Add a `--with-app-store-compliance` configure option to patch out problematic code (GH-120984) * Add --app-store-compliance configuration option. * Added blurb. * Correct tab-vs-spaces formatting issue. * Correct source file name in docs. * Correct source code reference in Mac docs * Only apply the patch forward, and ensure the working directory is correct. * Make patching reslient to multiple builds. * Documentation fixes found during review * Documentation and configure.ac syntax improvements * Regenerate configure script. * Silence the patch echo output. --------- (cherry picked from commit 48cd104) Co-authored-by: Russell Keith-Magee <[email protected]> Co-authored-by: Nice Zombies <[email protected]> Co-authored-by: Alyssa Coghlan <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
… to patch out problematic code (python#120984) * Add --app-store-compliance configuration option. * Added blurb. * Correct tab-vs-spaces formatting issue. * Correct source file name in docs. Co-authored-by: Nice Zombies <[email protected]> * Correct source code reference in Mac docs Co-authored-by: Nice Zombies <[email protected]> * Only apply the patch forward, and ensure the working directory is correct. * Make patching reslient to multiple builds. * Documentation fixes found during review Co-authored-by: Alyssa Coghlan <[email protected]> * Documentation and configure.ac syntax improvements Co-authored-by: Erlend E. Aasland <[email protected]> * Regenerate configure script. * Silence the patch echo output. --------- Co-authored-by: Nice Zombies <[email protected]> Co-authored-by: Alyssa Coghlan <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
Oh, next time, remember to edit the commit message upon merging, @freakboy3742 :) |
@erlend-aasland Will do; might be worth adding notes on this to the dev guide about this; AFAICT, there's nothing about the format/style of final commit messages. |
Sorry for the late comment but I believe the approach in this PR has some incompatibilities that need to be addressed. See the comment in the issue. |
… to patch out problematic code (python#120984) * Add --app-store-compliance configuration option. * Added blurb. * Correct tab-vs-spaces formatting issue. * Correct source file name in docs. Co-authored-by: Nice Zombies <[email protected]> * Correct source code reference in Mac docs Co-authored-by: Nice Zombies <[email protected]> * Only apply the patch forward, and ensure the working directory is correct. * Make patching reslient to multiple builds. * Documentation fixes found during review Co-authored-by: Alyssa Coghlan <[email protected]> * Documentation and configure.ac syntax improvements Co-authored-by: Erlend E. Aasland <[email protected]> * Regenerate configure script. * Silence the patch echo output. --------- Co-authored-by: Nice Zombies <[email protected]> Co-authored-by: Alyssa Coghlan <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
…e option to patch out problematic code (python#120984)" This reverts commit 48cd104 prior to the release of 3.13.0b4 to allow for additional review time.
…e option to patch out problematic code" (pythongh-120984) (pythonGH-121844) This reverts commit 48cd104 prior to the release of 3.13.0b4 to allow for additional review time. (cherry picked from commit f27593a) Co-authored-by: Ned Deily <[email protected]>
… to patch out problematic code (python#120984) * Add --app-store-compliance configuration option. * Added blurb. * Correct tab-vs-spaces formatting issue. * Correct source file name in docs. Co-authored-by: Nice Zombies <[email protected]> * Correct source code reference in Mac docs Co-authored-by: Nice Zombies <[email protected]> * Only apply the patch forward, and ensure the working directory is correct. * Make patching reslient to multiple builds. * Documentation fixes found during review Co-authored-by: Alyssa Coghlan <[email protected]> * Documentation and configure.ac syntax improvements Co-authored-by: Erlend E. Aasland <[email protected]> * Regenerate configure script. * Silence the patch echo output. --------- Co-authored-by: Nice Zombies <[email protected]> Co-authored-by: Alyssa Coghlan <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
…e option to patch out problematic code" (pythongh-120984) (python#121844) This reverts commit 48cd104 prior to the release of 3.13.0b4 to allow for additional review time.
Apple’s macOS App Store is auto-rejects any app that has the string
itms-services
in it. This is the custom URL prefix used for requesting an app installation from the iTunes App Store; however, sandboxed apps are prohibited from using these URLs. Apple’s automagical review processes are catching on the code in urllib’s parser’s handling of these URLs - even if the app in question never uses anitms-services://
URL. It’s present in the standard library; therefore the app is rejected.Following a discussion on discuss.python.org, this PR adds a
--with-app-store-compliance
option to configure that will patch out any code that is known to be an issue with app store compliance.There is currently a single patch, in the Mac resources directory, patching the known occurrences of
itms-services
. This patch is optionally applied on macOS if the configure flag is enabled, but the patch is applied in as "dry run" if the flag is not enabled. This ensures that a standard macOS CI pass will identify any drift in the patch.The same patch is also used by iOS builds, as the review issues are the same. On iOS, the patch is always applied, because all apps will need to pass App Store compliance.
The option allows for a custom patch file to be provided (in case App Store rules change after support for a Python release has ceased. This also a platform other than iOS or macOS to apply a "compliance" patch by manually supplying one; although there's no known use case for this at present.
Fixes #120522.
📚 Documentation preview 📚: https://cpython-previews--120984.org.readthedocs.build/