File tree 3 files changed +17
-5
lines changed
3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -142,19 +142,25 @@ case "$PACKAGING" in
142
142
fi
143
143
fi
144
144
145
- # determine policy-version for rhel systems so we can require what we build with
145
+ # determine the system-provided versions of dependencies we build against so we can Require them later in our RPM spec files.
146
146
if [ " $OS " = " rhel" ]; then
147
147
SELINUX_POLICY_VERSION=$( rpm -q --qf ' %{VERSION}\n' selinux-policy)
148
148
if [ -z " $SELINUX_POLICY_VERSION " ]; then
149
149
echo " error: unable to determine selinux-policy package version"
150
150
exit 1
151
151
fi
152
+ OPENSSL_VERSION=$( rpm -q --provides openssl-libs | grep OPENSSL_ | sed ' s/^.*_\([0-9.]*\).*$/\1/' | sort -n | tail -1)
153
+ if [ -z " $OPENSSL_VERSION " ]; then
154
+ echo " error: unable to determine openssl package version"
155
+ exit 1
156
+ fi
152
157
fi
153
158
154
159
sed \
155
160
-e " s/@@VERSION@@/$RPM_VERSION /g" \
156
161
-e " s/@@RELEASE@@/$safe_prefix$RPM_RELEASE /g" \
157
162
-e " s/@@SELINUX_POLICY_VERSION@@/$SELINUX_POLICY_VERSION /g" \
163
+ -e " s/@@OPENSSL_VERSION@@/$OPENSSL_VERSION /g" \
158
164
-e " /^%pre\$ /r $PREINSTALL " \
159
165
-e " /^%post\$ /r $POSTINSTALL " \
160
166
-e " /^%preun\$ /r $PREREMOVE " \
Original file line number Diff line number Diff line change @@ -33,9 +33,12 @@ Requires: libssl.so.1.1()(64bit) libssl.so.1.1(OPENSSL_1_1_0)(64bit) libssl.so.1
33
33
Requires: libcrypto.so.1.1()(64bit) libcrypto.so.1.1(OPENSSL_1_1_0)(64bit)
34
34
%endif
35
35
36
+ # We build against systems with the latest available dependencies such as OpenSSL.
37
+ # libcurl builds against this OpenSSL version which can have API changes that will break functionality if used on a non-updated system.
38
+ # OPENSSL_VERSION is determined in build-scripts/package script.
36
39
%if %{?rhel}%{!?rhel:0} > 8
37
- Requires: libcrypto.so.3()(64bit) libcrypto.so.3(OPENSSL_3.0.0)(64bit) libcrypto.so.3(OPENSSL_3.0.1 )(64bit)
38
- Requires: libssl.so.3()(64bit) libssl.so.3(OPENSSL_3.0.0 )(64bit)
40
+ Requires: libcrypto.so.3()(64bit) libcrypto.so.3(OPENSSL_@@OPENSSL_VERSION@@ )(64bit)
41
+ Requires: libssl.so.3()(64bit) libssl.so.3(OPENSSL_@@OPENSSL_VERSION@@ )(64bit)
39
42
%endif
40
43
41
44
# cfbs/Build requires Python 3.5+ (not available on RHEL 6)
Original file line number Diff line number Diff line change @@ -29,9 +29,12 @@ Requires: libssl.so.1.1()(64bit) libssl.so.1.1(OPENSSL_1_1_0)(64bit) libssl.so.1
29
29
Requires: libcrypto.so.1.1()(64bit) libcrypto.so.1.1(OPENSSL_1_1_0)(64bit)
30
30
%endif
31
31
32
+ # We build against systems with the latest available dependencies such as OpenSSL.
33
+ # libcurl builds against this OpenSSL version which can have API changes that will break functionality if used on a non-updated system.
34
+ # OPENSSL_VERSION is determined in build-scripts/package script.
32
35
%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)
36
+ Requires: libcrypto.so.3()(64bit) libcrypto.so.3(OPENSSL_@@OPENSSL_VERSION@@ )(64bit)
37
+ Requires: libssl.so.3()(64bit) libssl.so.3(OPENSSL_@@OPENSSL_VERSION@@ )(64bit)
35
38
%endif
36
39
37
40
AutoReqProv: no
You can’t perform that action at this time.
0 commit comments