Skip to content

Adjusted compile-options to not bundle OpenSSL on newer SuSE systems due to libpam/openssl incompatability#1868

Merged
larsewi merged 2 commits intocfengine:masterfrom
craigcomstock:ENT-12528/master
Sep 3, 2025
Merged

Adjusted compile-options to not bundle OpenSSL on newer SuSE systems due to libpam/openssl incompatability#1868
larsewi merged 2 commits intocfengine:masterfrom
craigcomstock:ENT-12528/master

Conversation

@craigcomstock
Copy link
Copy Markdown
Contributor

  • some random suse related requirements for non-aws instances
  • Adjusted compile-options to not bundle OpenSSL on newer SuSE systems due to libpam/openssl incompatability

@craigcomstock
Copy link
Copy Markdown
Contributor Author

jenkins build label suse_15: Build Status

@craigcomstock
Copy link
Copy Markdown
Contributor Author

try again, it turned out the OS is sles instead of suse in our CI environment. Build Status

@craigcomstock
Copy link
Copy Markdown
Contributor Author

craigcomstock commented Aug 28, 2025

OS_VERSION can include a dot which doesn't work with bash [[ expressions, so cut that off if it is there :)
Also, the two options for SuSE are opensuse and sles, so check for those.

Build Status

Comment thread build-scripts/compile-options Outdated
if [ "$OS" = "rhel" ] && expr "$OS_VERSION" ">=" "8" >/dev/null
# We don't bundle OpenSSL on some redhat-derived systems due to incompatability with libpam and our openssl.
_OS_MAJOR_VERSION="$(echo "$OS_VERSION" | cut -d. -f1)"
if [[ ( ( "$OS" == "rhel" ) && ( $(( _OS_MAJOR_VERSION >= 8 )) == 1 ) ) ||
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the double square bracket syntax available on all platforms? I guess we'll find out soon enough 😉

Copy link
Copy Markdown
Contributor Author

@craigcomstock craigcomstock Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, it is variable in terms of what shell we are using. I will re-write it in sh-specific :)

@craigcomstock
Copy link
Copy Markdown
Contributor Author

craigcomstock commented Aug 29, 2025

typo, had OS_MAJOR_VERSION which I had not assigned, rather I was setting _OS_MAJOR_VERSION.
Also reworked as POSIX sh since we don't really know what we will get everwhere.

so retry: Build Status

@craigcomstock craigcomstock force-pushed the ENT-12528/master branch 2 times, most recently from a3b016e to ae019a5 Compare August 29, 2025 21:43
@craigcomstock
Copy link
Copy Markdown
Contributor Author

oops, typo, retry: Build Status

This is due to dependency trouble with libpam and libcrypto when cf-agent tries to run chpasswd for example. In that case pam-unix.so wont load.

Ticket: ENT-12528
Changelog: title
@craigcomstock
Copy link
Copy Markdown
Contributor Author

added openssl-dev to build host setup: Build Status

@craigcomstock craigcomstock force-pushed the ENT-12528/master branch 2 times, most recently from 74e307a to 6331918 Compare September 2, 2025 18:31
…due to libpam/openssl incompatability

Ticket: ENT-12528
Changelog: title
(cherry picked from commit ae019a5)
@craigcomstock
Copy link
Copy Markdown
Contributor Author

Build Status

@craigcomstock craigcomstock marked this pull request as ready for review September 2, 2025 19:55
@craigcomstock
Copy link
Copy Markdown
Contributor Author

@larsewi I think this is ready to go now. See a green build above. I hacked a suse-15 instance in jenkins and ran that so should be OK in a greenfield pr-pipeline situation from this PR.

Copy link
Copy Markdown
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @craigcomstock 🚀 You are a 🪨 ⭐ when it comes to debugging these types of things 🎸

# We don't bundle OpenSSL on RHEL 8 (and newer in the future)
if [ "$OS" = "rhel" ] && expr "$OS_VERSION" ">=" "8" >/dev/null
# We don't bundle OpenSSL on some redhat-derived systems due to incompatability with libpam and our openssl.
_OS_MAJOR_VERSION="$(echo "$OS_VERSION" | cut -d. -f1)"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably define these types of variables in the detect-environment script. I see this pattern many places throughout build-scripts. Out of scope for this PR pfc, but I created a ticket CFE-4586

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. makes sense.

@larsewi larsewi merged commit 513198d into cfengine:master Sep 3, 2025
1 of 2 checks passed
@craigcomstock craigcomstock deleted the ENT-12528/master branch September 3, 2025 13:51
@craigcomstock
Copy link
Copy Markdown
Contributor Author

cherry picked to 3.21.x #1888
and 3.24.x #1887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants