## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 24; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global awslc_ver_maj 5 %global awslc_ver_min 12 %global awslc_ver_patch 0 # util/fipstools/acvp/modulewrapper/main.cc #errors on any other target, so # s390x, riscv64, i686 and loongarch64 must build with FIPS disabled. %global fips_arches x86_64 aarch64 ppc64le %{arm} %ifarch %{fips_arches} %global awslc_fips 1 %else %global awslc_fips 0 %endif # Rust bindings for the aws-lc-sys crate need bindgen-cli, which AL2023 lacks. # Old-style bcond: AL2023's rpm 4.16 predates %%bcond with a default value. %if 0%{?amzn} == 2023 %bcond_with rust_bindings %else %bcond_without rust_bindings %endif %if %{awslc_fips} # FIPS module boundary detection requires LTO to be disabled. %global _lto_cflags %{nil} %endif Name: aws-lc Version: %{awslc_ver_maj}.%{awslc_ver_min}.%{awslc_ver_patch} Release: %autorelease Summary: AWS-LC cryptographic library # Derived by auditing the compiled trees, not from upstream's LICENSE summary, # which names three licenses that do not apply to what we build. OpenSSL and # SSLeay-standalone: AWS-LC relicensed all OpenSSL-derived code to Apache-2.0, # and the Eric Young cryptsoft lines are copyright attributions, not grants. # CC0-1.0: the files upstream attributes it to are Apache-2.0 and ISC. MIT comes # from third_party/fiat and BSD-3-Clause from third_party/jitterentropy; the # public domain files are md5-x86_64.pl and poly1305_arm_asm.S. License: Apache-2.0 AND ISC AND MIT AND BSD-3-Clause AND LicenseRef-Fedora-Public-Domain URL: https://github.com/aws/aws-lc Source0: https://github.com/aws/aws-lc/archive/refs/tags/v%{version}.tar.gz#/aws-lc-%{version}.tar.gz Source1: aws-lc-provider.cnf # Accept the "PROFILE=SYSTEM" (crypto-policies) cipher string by mapping # it to AWS-LC's default cipher list instead of returning an error. # Drop once AWS-LC gains real system crypto policy support upstream. Patch: aws-lc-5.2.0-profile-system-cipher-string.patch # Search path for aws-lc-sys (Rust) system-library auto-detection; the # directory holds only AWS-LC symlinks so it cannot resolve to OpenSSL. Patch: aws-lc-5.11.0-pkgconfig-awslc-libdir.patch Patch: aws-lc-5.12.0-rehash.patch # awslc_provider_linkage_test misreads objdump -T output on ppc64le, where a # non-zero st_other column sits between the version and the symbol name. Patch: aws-lc-5.12.0-verify-linkage-st-other.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang BuildRequires: golang BuildRequires: perl-interpreter %if %{with rust_bindings} BuildRequires: bindgen-cli %endif BuildRequires: git-core Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description AWS-LC is a general-purpose cryptographic library maintained by the AWS Cryptography team for AWS and their customers. It is based on code from the Google BoringSSL project and the OpenSSL project. %prep %autosetup -n aws-lc-%{version} -S git -p1 %build # Do not add an $ORIGIN rpath here: the libraries install into %%{_libdir}, # which needs no rpath, and $ORIGIN does not survive to the linker intact, so # check-rpaths rejects the result. # # ENABLE_DIST_PKG applies AWS-LC's shipped symbol version scripts # (crypto/libcrypto.map, ssl/libssl.map) automatically. # # ENABLE_CRYPTO_POLICIES seeds every SSL_CTX from the system crypto-policies # OpenSSL back-end. The AWSLC_CRYPTO_POLICY_FILE override points AWS-LC at the # dedicated aws-lc.config back-end that newer crypto-policies generated. %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DFIPS=%{awslc_fips} \ -DBUILD_SHARED_LIBS=1 \ -DENABLE_PRE_SONAME_BUILD=0 \ -DENABLE_DIST_PKG=1 \ -DENABLE_DIST_PKG_OPENSSL_SHIM=0 \ -DENABLE_CRYPTO_POLICIES=1 \ -DAWSLC_CRYPTO_POLICY_FILE="/etc/crypto-policies/back-ends/aws-lc.config" \ -DDISABLE_GO=0 \ -DDISABLE_PERL=0 \ -DBUILD_TESTING=1 \ -DGENERATE_RUST_BINDINGS=%{?with_rust_bindings:ON}%{!?with_rust_bindings:OFF} \ -DBUILD_AWSLC_PROVIDER=ON %cmake_build # HTML API reference. doc.config sets BaseDirectory to "..", so run from util/. export GOPROXY=off mkdir -p html-doc (cd util && go run doc.go -config doc.config -out ../html-doc) %install %cmake_install # Drop upstream's CMake config files rather than relocate them to # %%{_libdir}/cmake: they export find_package(crypto) and find_package(ssl), # names far too generic to claim, and their install paths would have this # package own %%{_libdir}/crypto and %%{_libdir}/ssl. Consumers use pkg-config. rm -rf %{buildroot}%{_libdir}/crypto/cmake rm -rf %{buildroot}%{_libdir}/ssl/cmake mkdir -p %{buildroot}%{_libdir}/aws-lc ln -sf %{_libdir}/libcrypto-awslc.so %{buildroot}%{_libdir}/aws-lc/libcrypto.so ln -sf %{_libdir}/libssl-awslc.so %{buildroot}%{_libdir}/aws-lc/libssl.so %if %{with rust_bindings} mv %{buildroot}%{_includedir}/rust_wrapper.h %{buildroot}%{_includedir}/aws-lc/ %endif install -m 755 -d %{buildroot}%{_sysconfdir}/pki/tls/openssl.d install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pki/tls/openssl.d/aws-lc-provider.cnf mkdir -p %{buildroot}%{_docdir}/%{name}-doc cp -a html-doc/. %{buildroot}%{_docdir}/%{name}-doc/ install -p -m 0644 README.md %{buildroot}%{_docdir}/%{name}-doc/ %check export GOPATH=$(pwd)/.gopath export GOMODCACHE=${GOPATH}/pkg/mod # all_tests.go imports only stdlib and in-module packages, so module graph # pruning keeps it offline. Fail loudly rather than hang if that ever changes. export GOPROXY=off # The ssl tests assert AWS-LC's built-in defaults, which the buildroot's # crypto-policies back-end would override now that ENABLE_CRYPTO_POLICIES is # on. Point the loader at a missing file; the crypto-policy tests supply their # own fixtures through this same variable. export AWSLC_CRYPTO_POLICY_FILE=%{_builddir}/no-such-opensslcnf.config # Otherwise shards by runtime.NumCPU(), which ignores cgroup CPU quotas. export AWS_LC_NUM_TEST_WORKERS=%{_smp_build_ncpus} go run util/all_tests.go -build-dir %{_vpath_builddir} # Run provider tests %{_vpath_builddir}/provider/awslc_provider_test %{_vpath_builddir}/provider/awslc_provider_backend_test # This Cmake target will check the linkage situation in the provider by # making sure that all the symbols come from the libraries we expect them to. %{__cmake} --build %{_vpath_builddir} --target awslc_provider_linkage_test %files # NOTICE is the Apache-2.0 4(d) attribution, so %%license rather than %%doc: # it has to survive --excludedocs. %license LICENSE %license NOTICE %{_bindir}/aws-lc-openssl %{_bindir}/aws-lc-bssl %{_bindir}/aws-lc-c_rehash %package libs Summary: AWS-LC shared libraries # 20260811 is the first crypto-policies to generate the aws-lc.config back-end. # AL2023's crypto-policies predates it; without the file AWS-LC falls back to # its built-in defaults, so do not make -libs uninstallable there. %if 0%{?amzn} == 2023 Requires: crypto-policies %else Requires: crypto-policies >= 20260811-1 %endif # Compiled into libcrypto/libssl. The other third_party/ trees are test-only. Provides: bundled(fiat-crypto) Provides: bundled(jitterentropy) Provides: bundled(mldsa-native) Provides: bundled(mlkem-native) Provides: bundled(s2n-bignum) %description libs The libcrypto-awslc and libssl-awslc shared libraries. These are name-suffixed so they can be installed alongside the system OpenSSL rather than replacing it. %files libs %license LICENSE %license NOTICE %{_libdir}/libcrypto-awslc.so.* %{_libdir}/libssl-awslc.so.* %package devel Summary: Development files for AWS-LC # The .so symlinks resolve into -libs, not the base package, which is tools only. Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description devel Headers, pkg-config files, linker symlinks and Rust bindings needed to build against AWS-LC. Headers are installed under %{_includedir}/aws-lc so they do not collide with the system OpenSSL headers. %files devel %doc API-CONVENTIONS.md %doc PORTING.md %dir %{_includedir}/aws-lc %{_includedir}/aws-lc/openssl %{_libdir}/pkgconfig/libcrypto-awslc.pc %{_libdir}/pkgconfig/libssl-awslc.pc %{_libdir}/pkgconfig/aws-lc.pc %{_libdir}/libcrypto-awslc.so %{_libdir}/libssl-awslc.so %dir %{_libdir}/aws-lc %{_libdir}/aws-lc/libcrypto.so %{_libdir}/aws-lc/libssl.so %if %{with rust_bindings} %{_includedir}/aws-lc/rust_wrapper.h %dir %{_datadir}/rust %{_datadir}/rust/aws_lc_bindings.rs %endif %package provider Summary: AWS-LC provider for OpenSSL BuildRequires: openssl-devel Requires: openssl-libs Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description provider An OpenSSL 3 provider module that implements OpenSSL algorithms using AWS-LC. The configuration snippet in %{_sysconfdir}/pki/tls/openssl.d activates it and makes OpenSSL prefer AWS-LC's implementations, falling back to the default provider for anything AWS-LC does not provide. %files provider %attr(0755,root,root) %{_libdir}/ossl-modules/awslc.so %config(noreplace) %{_sysconfdir}/pki/tls/openssl.d/aws-lc-provider.cnf %package doc Summary: API reference documentation for AWS-LC BuildArch: noarch %description doc HTML reference documentation for the AWS-LC public headers, generated from the header comments by upstream's util/doc.go. Start at %{_docdir}/%{name}-doc/headers.html. %files doc %license LICENSE %license NOTICE # README.md is installed into this directory, not listed with %%doc, which would # resolve to the same path and be listed twice. %{_docdir}/%{name}-doc %changelog ## START: Generated by rpmautospec * Sat Nov 14 2026 Stewart Smith - 5.12.0-24 - Only require a crypto-policies with the aws-lc back-end where one exists - libs requires crypto-policies >= 20260811-1, the first release that generates /etc/crypto-policies/back-ends/aws-lc.config. AL2023's newest crypto-policies is 20260224, so on AL2023 the build succeeds but -libs, and everything that depends on it, cannot be installed. * Sat Nov 14 2026 Stewart Smith - 5.12.0-23 - Make the Rust bindings a build conditional, off on AL2023 * Sat Nov 14 2026 Stewart Smith - 5.12.0-22 - Fix awslc_provider_linkage_test on ppc64le * Sat Nov 14 2026 Stewart Smith - 5.12.0-21 - Ignore COPR's spec= argument in the SRPM Makefile * Sat Nov 14 2026 Stewart Smith - 5.12.0-20 - Add COPR make_srpm build support * Thu Oct 29 2026 Stephen A. Zarkos - 5.12.0-1.amzn2027 - Rebase aws-lc to v5.12 - Build the AWS-LC OpenSSL provider. Adds new package: awslc-provider - Fix aws-lc-c_rehash, and ship aws-lc-openssl * Mon Oct 05 2026 Stephen A. Zarkos - 5.11.0-2.amzn2027 - Build Rust bindings. Also adjust aws-lc.pc to ensure aws-lc-sys Rust crate auto-detects a system AWS-LC via pkg-config. - Fixup lint warnings about directory ownership (%{_includedir}/aws-lc and %dir %{_datadir}/rust). - Update AWSLC_CRYPTO_POLICY_FILE to point to 'aws-lc.config', which is generated by crypto-policies >= 20260811-1. * Fri Oct 02 2026 Will Childs-Klein - 5.11.0-1.amzn2027 - Update to 5.11.0 - Build with ENABLE_CRYPTO_POLICIES so every SSL_CTX is seeded from /etc/crypto-policies/back-ends/opensslcnf.config * Fri Aug 21 2026 Stephen A. Zarkos - 5.2.0-2.amzn2027 - Accept the "PROFILE=SYSTEM" (crypto-policies) cipher string by mapping it to AWS-LC's default cipher list instead of returning an error. Drop once AWS-LC gains real system crypto policy support upstream. ## END: Generated by rpmautospec