Skip to content

Commit 6fc4077

Browse files
committed
Fixed issue where rhel >8 packages would not have correct openssl dependency version
libcurl will likely have a hard dependency on the exact version so include it in our Requires: entries. Ticket: ENT-12587 Changelog: title
1 parent d2a90d6 commit 6fc4077

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

build-scripts/package

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,18 @@ case "$PACKAGING" in
136136
echo "error: unable to determine selinux-policy package version"
137137
exit 1
138138
fi
139+
OPENSSL_VERSION=$(rpm -q --qf '%{VERSION}\n' openssl | sed 's/\([0-9]*.[0-9]*.\)[0-9]*/\10/')
140+
if [ -z "$OPENSSL_VERSION" ]; then
141+
echo "error: unable to determine openssl package version"
142+
exit 1
143+
fi
139144
fi
140145

141146
sed \
142147
-e "s/@@VERSION@@/$RPM_VERSION/g" \
143148
-e "s/@@RELEASE@@/$safe_prefix$RPM_RELEASE/g" \
144149
-e "s/@@SELINUX_POLICY_VERSION@@/$SELINUX_POLICY_VERSION/g" \
150+
-e "s/@@OPENSSL_VERSION@@/$OPENSSL_VERSION/g" \
145151
-e "/^%pre\$/r $PREINSTALL" \
146152
-e "/^%post\$/r $POSTINSTALL" \
147153
-e "/^%preun\$/r $PREREMOVE" \

packaging/cfengine-nova/cfengine-nova.spec.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ Requires: libssl.so.1.1()(64bit) libssl.so.1.1(OPENSSL_1_1_0)(64bit) libssl.so.1
2929
Requires: libcrypto.so.1.1()(64bit) libcrypto.so.1.1(OPENSSL_1_1_0)(64bit)
3030
%endif
3131

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

3739
AutoReqProv: no

0 commit comments

Comments
 (0)