-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2024.1] Separate FIPS version from other OpenSSL version, bump OpenS…
…SL to 3.0.15 (#289) Bumping OpenSSL to 3.0.15. FIPS must stay on 3.0.8, so separating the two. Same as #285 Also moved aarch64 builds from CircleCI (which no longer works) to GitHub Actions and removed EOL CentOS 7 builds.
- Loading branch information
Showing
6 changed files
with
137 additions
and
131 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# | ||
# Copyright (c) YugaByte, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
# in compliance with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
import os | ||
from typing import List | ||
|
||
from yugabyte_db_thirdparty.build_definition_helpers import * # noqa | ||
|
||
|
||
def use_arm64_bash_in_script(script_path: str) -> None: | ||
with open(script_path) as script_file: | ||
lines = [line.rstrip() for line in script_file] | ||
|
||
if not lines: | ||
return | ||
if not lines[0].startswith('#!') and lines[0].endswith('bash'): | ||
return | ||
lines[0] = '#!/opt/homebrew/bin/bash' | ||
with open(script_path, 'w') as output_file: | ||
output_file.write('\n'.join(lines) + '\n') | ||
|
||
|
||
class OpenSSLFIPSDependency(Dependency): | ||
def __init__(self) -> None: | ||
super(OpenSSLFIPSDependency, self).__init__( | ||
name='openssl_fips', | ||
version='3.0.8', | ||
url_pattern='https://www.openssl.org/source/openssl-{0}.tar.gz', | ||
build_group=BuildGroup.COMMON) | ||
self.copy_sources = True | ||
# Patch fixes the following error on kernel versions < 4.1.0: | ||
# ld.lld: error: version script assignment of 'global' to symbol 'bind_engine' failed: | ||
# symbol not defined | ||
# ld.lld: error: version script assignment of 'global' to symbol 'v_check' failed: | ||
# symbol not defined | ||
self.patches = ['openssl-fix-afalg-link-on-centos7.patch'] | ||
|
||
def build(self, builder: BuilderInterface) -> None: | ||
common_configure_options = ['shared', 'no-tests', 'enable-fips'] | ||
install_path = os.path.join( | ||
builder.fs_layout.tp_installed_common_dir, "lib") | ||
if is_macos_arm64_build(): | ||
use_arm64_bash_in_script('config') | ||
configure_cmd = ['./config'] + common_configure_options | ||
if not is_macos(): | ||
configure_cmd += ['-Wl,-rpath=' + install_path] | ||
|
||
builder.build_with_configure( | ||
dep=self, | ||
configure_cmd=configure_cmd, | ||
install=['install_fips'] | ||
) | ||
|
||
def use_cppflags_env_var(self) -> bool: | ||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters