mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-08 18:02:05 +03:00
make openssl install less confusing, align openssl version
Summary: X-link: https://github.com/facebookincubator/fizz/pull/152 X-link: https://github.com/facebookincubator/zstrong/pull/1073 On linux getdeps uses system openssl, on macOS we mostly use the homebrew one on github CI. Both of these are openssl3.x, however the fallback build from source version is still set as openssl1.1. This can be confusing, giving the impression getdeps based builds need openssl1.1 * Update the openssl manifest source url to openssl-3.0.15, this version picked to match the ubuntu 22.04 LTS system packages. The other potentially confusing part was that the openssl source tarball was downloaded even when on on a platform like Linux where openssl is always taken from the system packages. * Make the download configurable so that does nothing if satisfied from system packages, and no need to check the cache. Reviewed By: ckwalsh Differential Revision: D66495352 fbshipit-source-id: 4d24bb82bfabe44c7764b819de7f4a05f80daed1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8c3e17873e
commit
1cf2c66666
@@ -333,6 +333,12 @@ class FetchCmd(ProjectCmdBase):
|
||||
|
||||
cache = cache_module.create_cache()
|
||||
for m in projects:
|
||||
fetcher = loader.create_fetcher(m)
|
||||
if isinstance(fetcher, SystemPackageFetcher):
|
||||
# We are guaranteed that if the fetcher is set to
|
||||
# SystemPackageFetcher then this item is completely
|
||||
# satisfied by the appropriate system packages
|
||||
continue
|
||||
cached_project = CachedProject(cache, loader, m)
|
||||
if cached_project.download():
|
||||
continue
|
||||
@@ -348,7 +354,6 @@ class FetchCmd(ProjectCmdBase):
|
||||
continue
|
||||
|
||||
# We need to fetch the sources
|
||||
fetcher = loader.create_fetcher(m)
|
||||
fetcher.update()
|
||||
|
||||
|
||||
|
@@ -430,23 +430,27 @@ class ManifestParser(object):
|
||||
# We can use the code from fbsource
|
||||
return ShipitTransformerFetcher(build_options, self.shipit_project)
|
||||
|
||||
# If both of these are None, the package can only be coming from
|
||||
# preinstalled toolchain or system packages
|
||||
repo_url = self.get_repo_url(ctx)
|
||||
url = self.get("download", "url", ctx=ctx)
|
||||
|
||||
# Can we satisfy this dep with system packages?
|
||||
if build_options.allow_system_packages:
|
||||
if (repo_url is None and url is None) or build_options.allow_system_packages:
|
||||
if self._is_satisfied_by_preinstalled_environment(ctx):
|
||||
return PreinstalledNopFetcher()
|
||||
|
||||
if build_options.host_type.get_package_manager():
|
||||
packages = self.get_required_system_packages(ctx)
|
||||
package_fetcher = SystemPackageFetcher(build_options, packages)
|
||||
if package_fetcher.packages_are_installed():
|
||||
return package_fetcher
|
||||
|
||||
repo_url = self.get_repo_url(ctx)
|
||||
if repo_url:
|
||||
rev = self.get("git", "rev")
|
||||
depth = self.get("git", "depth")
|
||||
return GitFetcher(build_options, self, repo_url, rev, depth)
|
||||
|
||||
url = self.get("download", "url", ctx=ctx)
|
||||
if url:
|
||||
# We need to defer this import until now to avoid triggering
|
||||
# a cycle when the facebook/__init__.py is loaded.
|
||||
@@ -464,7 +468,8 @@ class ManifestParser(object):
|
||||
)
|
||||
|
||||
raise KeyError(
|
||||
"project %s has no fetcher configuration matching %s" % (self.name, ctx)
|
||||
"project %s has no fetcher configuration or system packages matching %s"
|
||||
% (self.name, ctx)
|
||||
)
|
||||
|
||||
def create_fetcher(self, build_options, loader, ctx):
|
||||
|
@@ -5,7 +5,7 @@ name = openssl
|
||||
libssl-dev
|
||||
|
||||
[homebrew]
|
||||
openssl@1.1
|
||||
openssl
|
||||
# on homebrew need the matching curl and ca-
|
||||
|
||||
[rpms]
|
||||
@@ -16,9 +16,11 @@ openssl-libs
|
||||
[pps]
|
||||
openssl
|
||||
|
||||
[download]
|
||||
url = https://www.openssl.org/source/openssl-1.1.1l.tar.gz
|
||||
sha256 = 0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
|
||||
# no need to download on the systems where we always use the system libs
|
||||
[download.not(any(os=linux, os=freebsd))]
|
||||
# match the openssl version packages in ubuntu LTS folly current supports
|
||||
url = https://www.openssl.org/source/openssl-3.0.15.tar.gz
|
||||
sha256 = 23c666d0edf20f14249b3d8f0368acaee9ab585b09e1de82107c66e1f3ec9533
|
||||
|
||||
# We use the system openssl on these platforms even without --allow-system-packages
|
||||
[build.any(os=linux, os=freebsd)]
|
||||
@@ -26,7 +28,7 @@ builder = nop
|
||||
|
||||
[build.not(any(os=linux, os=freebsd))]
|
||||
builder = openssl
|
||||
subdir = openssl-1.1.1l
|
||||
subdir = openssl-3.0.15
|
||||
|
||||
[dependencies.os=windows]
|
||||
perl
|
||||
|
Reference in New Issue
Block a user