From b644e2d25b04ab1227b5e76b0accb020531ea13f Mon Sep 17 00:00:00 2001 From: MKLeb Date: Wed, 8 Mar 2023 14:13:16 -0500 Subject: [PATCH 1/2] Update ssl shared object locations --- pkg/rpm/salt.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/rpm/salt.spec b/pkg/rpm/salt.spec index b327584f32e..23ca707fbdb 100644 --- a/pkg/rpm/salt.spec +++ b/pkg/rpm/salt.spec @@ -365,8 +365,8 @@ if [ $1 -lt 2 ]; then # ensure hmac are up to date, master or minion, rest install one or the other # key used is from openssl/crypto/fips/fips_standalone_hmac.c openssl 1.1.1k if [ $(cat /etc/os-release | grep VERSION_ID | cut -d '=' -f 2 | sed 's/\"//g' | cut -d '.' -f 1) = "8" ]; then - /bin/openssl sha256 -r -hmac orboDeJITITejsirpADONivirpUkvarP /opt/saltstack/salt/run/libssl.so.1.1 | cut -d ' ' -f 1 > /opt/saltstack/salt/run/.libssl.so.1.1.hmac || : - /bin/openssl sha256 -r -hmac orboDeJITITejsirpADONivirpUkvarP /opt/saltstack/salt/run/libcrypto.so.1.1 | cut -d ' ' -f 1 > /opt/saltstack/salt/run/.libcrypto.so.1.1.hmac || : + /bin/openssl sha256 -r -hmac orboDeJITITejsirpADONivirpUkvarP /opt/saltstack/salt/lib/libssl.so.1.1 | cut -d ' ' -f 1 > /opt/saltstack/salt/lib/.libssl.so.1.1.hmac || : + /bin/openssl sha256 -r -hmac orboDeJITITejsirpADONivirpUkvarP /opt/saltstack/salt/lib/libcrypto.so.1.1 | cut -d ' ' -f 1 > /opt/saltstack/salt/lib/.libcrypto.so.1.1.hmac || : fi fi @@ -384,8 +384,8 @@ if [ $1 -lt 2 ]; then # ensure hmac are up to date, master or minion, rest install one or the other # key used is from openssl/crypto/fips/fips_standalone_hmac.c openssl 1.1.1k if [ $(cat /etc/os-release | grep VERSION_ID | cut -d '=' -f 2 | sed 's/\"//g' | cut -d '.' -f 1) = "8" ]; then - /bin/openssl sha256 -r -hmac orboDeJITITejsirpADONivirpUkvarP /opt/saltstack/salt/run/libssl.so.1.1 | cut -d ' ' -f 1 > /opt/saltstack/salt/run/.libssl.so.1.1.hmac || : - /bin/openssl sha256 -r -hmac orboDeJITITejsirpADONivirpUkvarP /opt/saltstack/salt/run/libcrypto.so.1.1 | cut -d ' ' -f 1 > /opt/saltstack/salt/run/.libcrypto.so.1.1.hmac || : + /bin/openssl sha256 -r -hmac orboDeJITITejsirpADONivirpUkvarP /opt/saltstack/salt/lib/libssl.so.1.1 | cut -d ' ' -f 1 > /opt/saltstack/salt/lib/.libssl.so.1.1.hmac || : + /bin/openssl sha256 -r -hmac orboDeJITITejsirpADONivirpUkvarP /opt/saltstack/salt/lib/libcrypto.so.1.1 | cut -d ' ' -f 1 > /opt/saltstack/salt/lib/.libcrypto.so.1.1.hmac || : fi fi @@ -402,8 +402,8 @@ if [ $1 -eq 0 ]; then if [ $(cat /etc/os-release | grep VERSION_ID | cut -d '=' -f 2 | sed 's/\"//g' | cut -d '.' -f 1) = "8" ]; then if [ -z "$(rpm -qi salt-minion | grep Name | grep salt-minion)" ]; then # uninstall and no minion running - /bin/rm -f /opt/saltstack/salt/run/.libssl.so.1.1.hmac || : - /bin/rm -f /opt/saltstack/salt/run/.libcrypto.so.1.1.hmac || : + /bin/rm -f /opt/saltstack/salt/lib/.libssl.so.1.1.hmac || : + /bin/rm -f /opt/saltstack/salt/lib/.libcrypto.so.1.1.hmac || : fi fi fi @@ -417,8 +417,8 @@ if [ $1 -eq 0 ]; then if [ $(cat /etc/os-release | grep VERSION_ID | cut -d '=' -f 2 | sed 's/\"//g' | cut -d '.' -f 1) = "8" ]; then if [ -z "$(rpm -qi salt-master | grep Name | grep salt-master)" ]; then # uninstall and no master running - /bin/rm -f /opt/saltstack/salt/run/.libssl.so.1.1.hmac || : - /bin/rm -f /opt/saltstack/salt/run/.libcrypto.so.1.1.hmac || : + /bin/rm -f /opt/saltstack/salt/lib/.libssl.so.1.1.hmac || : + /bin/rm -f /opt/saltstack/salt/lib/.libcrypto.so.1.1.hmac || : fi fi fi From a3293afcca91070f88b74772eb8ee19c28069c82 Mon Sep 17 00:00:00 2001 From: MKLeb Date: Wed, 8 Mar 2023 17:16:45 -0500 Subject: [PATCH 2/2] Add check for leftover old file locations when installing the packages --- pkg/tests/support/helpers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/tests/support/helpers.py b/pkg/tests/support/helpers.py index f9353c52bbe..89e418ceb12 100644 --- a/pkg/tests/support/helpers.py +++ b/pkg/tests/support/helpers.py @@ -591,6 +591,10 @@ class SaltPkgInstall: else: log.info("Installing packages:\n%s", pprint.pformat(self.pkgs)) ret = self.proc.run(self.pkg_mngr, "install", "-y", *self.pkgs) + if not (platform.is_darwin() or platform.is_windows()): + # Make sure we don't have any trailing references to old package file locations + assert "No such file or directory" not in ret.stdout + assert "/saltstack/salt/run" not in ret.stdout log.info(ret) self._check_retcode(ret)