-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix OpenSSL versions 1.1.1 & newer for tvOS #1586
Conversation
`fork()` is unavailable on tvOS. This adds and applies a patch file when building for tvOS and sets an argument for the compiler.
Sorry, the build is only launched for Early Access Program users. You can request access writing in this issue. |
@faithfracture |
Yes - that doesn't work. See openssl/openssl#7607 (sorry, I should have added this to the original PR.) |
What needs to happen to move this forward? Looks like the 3 review approvals have happened. What's next? |
recipes/openssl/1.x.x/conanfile.py
Outdated
@@ -413,6 +414,8 @@ def _configure_args(self): | |||
if self._full_version >= "1.1.0": | |||
args.append("--debug" if self.settings.build_type == "Debug" else "--release") | |||
|
|||
if str(self.settings.os) == "tvOS": |
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.
if str(self.settings.os) == "tvOS": | |
if self.settings.os == "tvOS": |
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.
If this is changed, then the rest of the if self.settings.os ==
statements that follow should also be changed. I didn't notice it before, but the usage of this is horribly inconsistent though the entire recipe. Is there a standardization somewhere that says one should be used over the other? I typically don't do "standardization" type changes for commits for things like this, but I'm happy to do it if you'd prefer it.
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.
By dropping the str
, conan
is able to check whether tvOS
is a valid os.
That way typos can be catched.
If the code is equivalent, I'ld say 'why not?'
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.
Yeah, it doesn't matter to me one way or the other - I suck at Python & honestly don't know the difference.
Just because I'm curious and would like to know - how is it that Conan can check if it's a valid OS by doing self.settings.os
rather than str(self.settings.os)
? If self.settings.os
is a string, then using str()
really just turns an existing string into a string, right?
Maybe a better way to put it is - how is it that dropping str()
makes it so Conan can check if tvOS
is a valid OS?
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.
When you compare against self.settings.os
, you're comparing against a SettingsItem
object.
This class checks whether strings to which it is compared against would also be a valid setting (ie it is present in your settings.yml file).
By doing str
, you compare against a string without an additional check.
if self.settings.os == "tvOS": | ||
tools.patch(patch_file=os.path.join("patches", "1.1.1-tvos.patch"), | ||
base_path=self._source_subfolder) |
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.
I don't like the conditional patching.
Can the patch be rewritten so it only changes behavior for WatchOS?
Maybe by checking for the existence for a certain preprocessor variable that can be set in the conanfile.py
?
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.
Considering this is the patch that is being used as the fix for this in the official OpenSSL repository, I don't think that makes sense. Furthermore, since even if you pass -DNO_FORK
, it gets undefined in apps/ocsp.c
, that is a bug in OpenSSL itself that is not specific to tvOS, so I would argue that it shouldn't be made specific to tvOS.
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.
Ok. Good point.
This allows Conan to check against valid OSes, rather than just doing a basic string comparison.
83fba72
Sorry, the build is only launched for Early Access Program users. You can request access writing in this issue. |
Sorry, the build is only launched for Early Access Program users. You can request access writing in this issue. |
Sorry, the build is only launched for Early Access Program users. You can request access writing in this issue. |
bump |
@faithfracture it seems that you did not request access to EAP in #4 |
Oh - it wasn’t clear to me that I had to run the pr-merge build. It just says that I don’t have access to EAP. I just assumed that someone who did have access to it would run the build. I’ll request access. Also, the PR still says I don’t have all the required approvals. (1 of 3) |
@faithfracture It's documented in the Wiki: https://github.com/conan-io/conan-center-index/wiki#adding-packages-to-conancenter One of required approvals is the EAP. Once approved, your recipe will be checked by the CCI. |
Ok - I requested EAP access. |
All green in build 5 (
|
@SSE4 looks like this is waiting on you for the final review |
fork()
is unavailable on tvOS. This adds and applies a patch file whenbuilding for tvOS and sets an argument for the compiler.
Specify library name and version: lib/1.0
conan-center hook activated.