-
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
openssl: provide official variables in cmake_find_package #4597
openssl: provide official variables in cmake_find_package #4597
Conversation
Failure in build 1 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
I detected other pull requests that are modifying openssl/1.x.x recipe: This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there. |
recipes/openssl/1.x.x/conanfile.py
Outdated
@staticmethod | ||
def _create_cmake_module_variables(module_file): | ||
content = ( | ||
"if(OpenSSL_FOUND)\n" |
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.
Let's have this as a separate file in the repo if it's possible?
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 know, I don't want to see the content of this file too far from package_info()
because it's tightly related. It would be easy to change some values in package_info()
and forget to update this file.
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 you want to keep it embedded maybe use a multi line string ("""
)?
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 multi lines because it breaks indentation and looks ugly in a python file.
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.
Taste is different I guess :)
I actually prefer the zero indentation but for those who like to keep it I have seen this pattern used:
import textwrap
def foo():
content = """\
for
bar
baz
"""
print(textwrap.dedent(content))
foo()
This is of course not an important topic, just want to share the pattern.
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.
It does not produce the same string. You'll have plenty of unwanted spaces at the beginning of each line.
EDIT: ok I didn't see the textwrap, thanks good to know.
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.
changed in d5cb67d, indeed it's neater ;)
Great change, @SpaceIm, I think it will make the life of many recipe creators much easier 👍 |
Failure in build 3 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
What is that? |
Maybe because of tools.os_info.is_windows in nams recipe, something like that almost always messes up CCI. |
it happened also in We have no clear explanation yet on what is causing this :/ |
I am opening an issue with that. Thanks @ericLemanissier |
TBH, neither do we. The first time we thought it was a glitch, but now it can no longer be a random failure. There is a bug somewhere and we need to find it 🕵️ |
I'm wondering if we can use this approach to add |
@ericriff , my pedantic two cents 😅 : in a generic scenario (which is a cross-compiling one) you want the executable from the |
That's the wrong Eric! |
@ericriff take a look at ec87edc I've decided to not implement this feature in above mentioned PR because imported executable target will be implemented in conan from what I've understood. Important part:
|
All green in build 4 (
|
All green in build 5 (
|
Failure in build 6 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
All green in build 7 (
|
useless now that conan-io#4597 is merged
* civetweb: bump openssl * remove openssl patching useless now that #4597 is merged * disable lto this avoids following error in test recipe: libcivetweb-cpp.a: error adding symbols: Archive has no index; run ranlib to add one
…_find_package Co-Authored-By: SpaceIm <[email protected]>
* openssl: create 3.x.x directory * openssl/3.x.x: Update license to Apache-2.0 * openssl/3.x.x: Update reporting issues URL * openssl/3.x.x: Add no_deprecated, no_legacy and no_fips options * openssl/3.x.x: Delete patch for 1.1.1 * openssl/3.x.x: Update option from no_zlib to zlib * openssl/3.x.x: Remove removed options no_md2 and no_rc5 * openssl/3.x.x.: no_rc4 is still a valid option https://github.com/openssl/openssl/blob/1b495200436b57309ca958a7a72affaf75171c1a/INSTALL.md#no-algorithm * openssl/3.x.x: Remove legacy target names * openssl/3.x.x.: Remove more legacy conditions * openssl/3.x.x: Fix zlib option name * Revert "openssl/3.x.x: Update license to Apache-2.0" This reverts commit 13852ab1da9678d3700440bee862561af7878b37. * openssl/3.x.x: Actually update license to Apache-2.0 * openssl/3.x.x.: Remove all legacy version switches * openssl/3.x.x: Use OpenSSL_version instead of legacy SSLeay_version * openssl/3.x.x.: update test_package to never use find_package() Several reasons for this decision: 1) No matter the value of the paramter use_find_package CMake did always use a FindOpenSSL.cmake file 2) On my machine that meant that CMake used a FindOpenSSL.cmake file from my Python installation, which can't yet handle version 3.0.0 due to a regex error 3) Even when I addded the Conan cmake_find_package generator, it did not work (more cpp_info work needed, maybe?) 4) Even when 3) would be fixed, it would still always use the FindOpenSSL.cmake approach for some reason (I guess), so the entire use_find_package switch is pointless * openssl/3.x.x.: Remove custom OpenSSLVersion object * openssl/3.x.x.: Remove legacy target_prefix * openssl/3.x.x.: Remove custom _cross_building method Since tools.cross_building() has now a skip_x64_x86 flag * openssl/3.x.x: Some formatting * openssl/3.x.x: Remove old workaround for MinGW This got fixed in the meantime via openssl/openssl@9694ebf See also openssl/openssl#7653 * openssl/3.x.x: add no_engine option * openssl/3.x.x: Add 3.0.0-alpha5 * openssl/3.x.x: Port #1782 from @syoliver - add components * openssl/3.x.x: Fix license test The LICENSE file got renamed to LICENSE.txt * openssl/3.x.x: add old/ URLs as mirrors * openssl/3.x.x: threat URLs explicit as strings * openssl/3.x.x: add 3.0.0-alpha6 * openssl/3.x.x: the downloads have permament locations now This seems to be the case for a while now, but not for all old versions we support in the recipe for the 1.x.x versions It also does not seem to apply for pre-release versions, which rather seem to get de-published See also here: openssl/openssl#4469 * openssl: Update Conan conventions Automatically created by bincrafters-conventions 0.26.0 * openssl/3.x.x: reorder methods * openssl/3.x.x: add 3.0.0-alpha7 * openssl/3.x.x: test upstream PR 13225 openssl/openssl#13225 * openssl/3.x.x: update patch from upstream PR13225 * openssl/3.x.x: port #2944 Require installation of msys2 for MinGW builds * openssl/3.x.x: port #3214 fix openssl/** build with shared and fPIC option for OS Neutrino * openssl/3.x.x: add 3.0.0-alpha8 * openssl/3.x.x: remove fPIC when shared Co-authored-by: Anonymous Maarten <[email protected]> * openssl/3.x.x: add 3.0.0-alpha9 * openssl/3.x.x: use get_safe for fPIC * openssl/3.x.x: don't use get_safe for zlib option Co-authored-by: Anonymous Maarten <[email protected]> * openssl/3.x.x: add 3.0.0-alpha10 * openssl/3.x.x: add openssl/3.0.0-alpha11 * openssl: Update Conan conventions Automatically created by bincrafters-conventions 0.30.2 * openssl/3.x.x: add openssl/3.0.0 * openssl: Update Conan conventions Automatically created by bincrafters-conventions 0.30.5 * openssl/3.x.x: modernize Co-Authored-By: Anonymous Maarten <[email protected]> * openssl/3.x.x: modernize Co-Authored-By: Anonymous Maarten <[email protected]> * openssl/3.x.x: replace os.rename -> tools.rename * opeensl/3.x.x.: nit Co-authored-by: Anonymous Maarten <[email protected]> * openssl/3.x.x: readd old versions to config.yml Co-Authored-By: Anonymous Maarten <[email protected]> * openssl/3.x.x: remove platform import Co-authored-by: Anonymous Maarten <[email protected]> * openssl/3.x.x: fix typo in option name * openssl/3.x.x: more tools modernizations * openssl/3.x.x: use textwrap Co-authored-by: Anonymous Maarten <[email protected]> * openssl/3.x.x: remove MD5 and SHA1 from test_package * openssl/3.x.x: use self.options.get_safe() * openssl: add openssl.pc + fix libdir * openssl: convert test to pure C source * openssl: use spaces in test source * openssl/3.x.x: remove SSL_library_init from test_package * openssl: run openssl binary in test package * openssl: digest.c only needs crypto library * openssl: remove unused definitions for cmake * openssl: enable fPIC when not enabled + use zlib's shared option correctly * openssl: don't echo args (there is log.print_run_commands) + don't add shared/zlib multiple times * openssl: tools.XCRun only acceps Settings object * openssl: use self.settings.os * openssl: reformatting + be the first to use f-strings + functools.lru_cache * openssl: ./Configure --help does not print any targets. * openssl: fix critical typo * openssl: fix sneaky usage of tools.os_info in build_requirements * openssl/3.x.x: remove patch for macOS shared Co-Authored-By: Bowb <[email protected]> * openssl/3.x.x: port #4460 remove explicit apple deployment target flag Co-Authored-By: SSE4 <[email protected]> * openssl/3.x.x: port #4597 provide official variables in cmake_find_package Co-Authored-By: SpaceIm <[email protected]> * openssl/3.x.x: port #4698 fix rt dependency for SUSE11 Co-Authored-By: Alexey Klimkin <[email protected]> * openssl/3.x.x: port #4772 fix builddirs and add vars module to cmake_find_package only Co-Authored-By: SpaceIm <[email protected]> * openssl/3.x.x: port #5441 closes #4740 Co-Authored-By: Dmitry Bely <[email protected]> * openssl/3.x.x: port #3998 add libatomic in build dependency for Neutrino OS Co-Authored-By: Arenoros <[email protected]> * openssl/3.x.x: port #6337 OpenSSL on Windows: multi-profile support Co-Authored-By: Stefan Floeren <[email protected]> * openssl/3.x.x: port #6588 Add macOS ARM target Co-Authored-By: gmeeker <[email protected]> * openssl/3.x.x: port #6884 Build openssl for emscripten Co-Authored-By: Volodymyr B. <[email protected]> * openssl: reformatting fixes * openssl: make method property + remove unused import * openssl: reverse sort openssl's config.yml * openssl: only run openssl when not cross building * openssl: port options of openssl 1.1.1 * openssl: fix MSVC install + remove options unsupported by openssl 3 + openssl exe is only available when building with no_stio=False * force push Signed-off-by: Uilian Ries <[email protected]> * openssl: add missing options + various reformatting Co-authored-by: bincrafters-user <[email protected]> Co-authored-by: Anonymous Maarten <[email protected]> Co-authored-by: Anonymous Maarten <[email protected]> Co-authored-by: Bowb <[email protected]> Co-authored-by: SSE4 <[email protected]> Co-authored-by: SpaceIm <[email protected]> Co-authored-by: Alexey Klimkin <[email protected]> Co-authored-by: Dmitry Bely <[email protected]> Co-authored-by: Arenoros <[email protected]> Co-authored-by: Stefan Floeren <[email protected]> Co-authored-by: gmeeker <[email protected]> Co-authored-by: Volodymyr B. <[email protected]> Co-authored-by: Uilian Ries <[email protected]>
Specify library name and version: openssl/all
conan-center hook activated.
No more ugliness in downstream recipes forced to replace official cmake variables of openssl due to casing issues in cmake_find_package generator.
Requires conan >= 1.33.0