Skip to content

Commit

Permalink
Fixed issue where rhel >8 packages would not have correct openssl dep…
Browse files Browse the repository at this point in the history
…endency version

libcurl will likely have a hard dependency on the exact version so include it in our Requires: entries.

Ticket: ENT-12587
Changelog: title
  • Loading branch information
craigcomstock committed Jan 16, 2025
1 parent d2a90d6 commit 6fc4077
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions build-scripts/package
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,18 @@ case "$PACKAGING" in
echo "error: unable to determine selinux-policy package version"
exit 1
fi
OPENSSL_VERSION=$(rpm -q --qf '%{VERSION}\n' openssl | sed 's/\([0-9]*.[0-9]*.\)[0-9]*/\10/')
if [ -z "$OPENSSL_VERSION" ]; then
echo "error: unable to determine openssl package version"
exit 1
fi
fi

sed \
-e "s/@@VERSION@@/$RPM_VERSION/g" \
-e "s/@@RELEASE@@/$safe_prefix$RPM_RELEASE/g" \
-e "s/@@SELINUX_POLICY_VERSION@@/$SELINUX_POLICY_VERSION/g" \
-e "s/@@OPENSSL_VERSION@@/$OPENSSL_VERSION/g" \
-e "/^%pre\$/r $PREINSTALL" \
-e "/^%post\$/r $POSTINSTALL" \
-e "/^%preun\$/r $PREREMOVE" \
Expand Down
6 changes: 4 additions & 2 deletions packaging/cfengine-nova/cfengine-nova.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ Requires: libssl.so.1.1()(64bit) libssl.so.1.1(OPENSSL_1_1_0)(64bit) libssl.so.1
Requires: libcrypto.so.1.1()(64bit) libcrypto.so.1.1(OPENSSL_1_1_0)(64bit)
%endif

# libcurl will end up depending on the specific version we build with so list that as a requirement.
# OPENSSL_VERSION is determined in build-scripts/package script in this same project.
%if %{?rhel}%{!?rhel:0} > 8
Requires: libcrypto.so.3()(64bit) libcrypto.so.3(OPENSSL_3.0.0)(64bit) libcrypto.so.3(OPENSSL_3.0.1)(64bit)
Requires: libssl.so.3()(64bit) libssl.so.3(OPENSSL_3.0.0)(64bit)
Requires: libcrypto.so.3()(64bit) libcrypto.so.3(OPENSSL_@@OPENSSL_VERSION@@)(64bit)
Requires: libssl.so.3()(64bit) libssl.so.3(OPENSSL_@@OPENSSL_VERSION@@)(64bit)
%endif

AutoReqProv: no
Expand Down

0 comments on commit 6fc4077

Please sign in to comment.