Skip to content

Commit

Permalink
Remove installation through meson
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Arroutbi <[email protected]>
  • Loading branch information
sarroutbi committed Jan 31, 2025
1 parent 234c8bb commit 557bbf3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 21 deletions.
3 changes: 1 addition & 2 deletions Sanity/pkcs11/basic/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ PACKAGE="clevis"

rlJournalStart
rlPhaseStartSetup
install_clevis_pkcs11
rlAssertRpm $PACKAGE
# Include utils library containing critical functions
rlRun ". ../../../TestHelpers/utils.sh" || rlDie "cannot import function script"
Expand All @@ -54,8 +55,6 @@ rlJournalStart
TOKEN_SERIAL_NUM=$(pkcs11-tool --module $SOFTHSM_LIB -L | grep "serial num" | awk '{print $4}')
rlAssertNotEquals "Test that the serial number is not empty" "" $TOKEN_SERIAL_NUM
URI="{\"uri\": \"pkcs11:model=SoftHSM%20v2;manufacturer=SoftHSM%20project;serial=$TOKEN_SERIAL_NUM;token=$TOKEN_LABEL;id=$ID;module-path=$SOFTHSM_LIB?pin-value=$PINVALUE\", \"mechanism\": \"RSA-PKCS\"}"

development_clevis
rlPhaseEnd

rlPhaseStart FAIL "clevis pkcs11 - Simple text encryption and decryption"
Expand Down
4 changes: 1 addition & 3 deletions Sanity/pkcs11/luks-tpm2/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ PACKAGE="clevis"

rlJournalStart
rlPhaseStartSetup
install_clevis_pkcs11
rlAssertRpm $PACKAGE
# Include utils library containing critical functions
rlRun ". ../../../TestHelpers/utils.sh" || rlDie "cannot import function script"
Expand All @@ -56,9 +57,6 @@ rlJournalStart
TOKEN_SERIAL_NUM=$(pkcs11-tool --module $SOFTHSM_LIB -L | grep "serial num" | awk '{print $4}')
rlAssertNotEquals "Test that the serial number is not empty" "" $TOKEN_SERIAL_NUM
URI="{\"uri\": \"pkcs11:model=SoftHSM%20v2;manufacturer=SoftHSM%20project;serial=$TOKEN_SERIAL_NUM;token=$TOKEN_LABEL;id=$ID;module-path=$SOFTHSM_LIB?pin-value=$PINVALUE\", \"mechanism\": \"RSA-PKCS\"}"

development_clevis

luks_setup
rlPhaseEnd

Expand Down
4 changes: 1 addition & 3 deletions Sanity/pkcs11/single-encrypted-disk/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ PACKAGE="clevis"
rlJournalStart
rlPhaseStartSetup
if [ $TMT_REBOOT_COUNT == 0 ]; then
install_clevis_pkcs11
rlAssertRpm $PACKAGE
# Include utils library containing critical functions
rlRun ". ../../../TestHelpers/utils.sh" || rlDie "cannot import function script"
Expand All @@ -99,10 +100,7 @@ rlJournalStart
rlAssertNotEquals "Test that the serial number is not empty" "" $TOKEN_SERIAL_NUM
URI="{\"uri\": \"pkcs11:model=SoftHSM%20v2;serial=$TOKEN_SERIAL_NUM;token=$TOKEN_LABEL;id=$ID;module-path=$SOFTHSM_LIB?pin-value=$PINVALUE\", \"mechanism\": \"RSA-PKCS\"}"

development_clevis

setup_luks_encrypted_single_disk

fi
rlPhaseEnd

Expand Down
15 changes: 2 additions & 13 deletions TestHelpers/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,13 @@ install_softhsm() {
rlRun "dnf install softhsm -y"
}

development_clevis() {
# TODO: remove this whole function once the clevis pkcs11 feature development is done
install_clevis_pkcs11() {
if rpm -qa | grep -q clevis-pin-pkcs11; then
export PKCS11_IMPLEMENTED=1
rlRun "rpm -q clevis-pin-pkcs11"
rlLogInfo "Package is already installed on system!"
else
rlIsRHEL 9
if [ $? -eq 0 ]; then
rlRun "dnf install python-pip gcc clang cmake jose libjose cryptsetup socat tpm2-tools luksmeta libluksmeta -y"
else
rlRun "dnf install python-pip gcc clang cmake jose libjose-devel cryptsetup-devel socat tpm2-tools luksmeta libluksmeta-devel -y"
fi
rlRun "pip3 install ninja meson"
rlRun "git clone https://github.com/latchset/clevis"
rlRun "pushd clevis"
rlRun "rm -fr build; mkdir build; pushd build; meson setup --prefix=/usr --wipe ..; meson compile -v; meson install; popd"
rlRun "popd"
rlRun "dnf info clevis-pin-pkcs11 && dnf install -y clevis-pin-pkcs11 || :"
fi
}

Expand Down

0 comments on commit 557bbf3

Please sign in to comment.