From 1a1d1603956183189d2f3981f446608a56134e29 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Sat, 1 Jul 2023 07:08:34 +0200 Subject: [PATCH] Applied updates --- appveyor.yml | 6 ------ configure.ac | 2 +- m4/libcrypto.m4 | 7 ++++--- runtests.sh | 12 +----------- synclibs.sh | 5 +++-- tests/test_sha1sum.sh | 7 ++++--- tests/test_sha2sum.sh | 17 ++++++++++------- 7 files changed, 23 insertions(+), 33 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index fead006..5e4a00d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -116,12 +116,6 @@ environment: BUILD_ENVIRONMENT: python APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PYTHON: "C:\\Python311-x64\\python.exe" - - TARGET: macos-tox-py37 - BUILD_ENVIRONMENT: python-tox - APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey - HOMEBREW_NO_INSTALL_CLEANUP: 1 - PYTHON_VERSION: 3.7 - TOXENV: py37 - TARGET: macos-tox-py38 BUILD_ENVIRONMENT: python-tox APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey diff --git a/configure.ac b/configure.ac index 2eff737..36162f0 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.71]) AC_INIT( [libhmac], - [20230418], + [20230630], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( diff --git a/m4/libcrypto.m4 b/m4/libcrypto.m4 index 4cdb573..87944a2 100644 --- a/m4/libcrypto.m4 +++ b/m4/libcrypto.m4 @@ -1,6 +1,6 @@ dnl Checks for libcrypto required headers and functions dnl -dnl Version: 20221127 +dnl Version: 20230701 dnl Function to detect whether openssl/evp.h can be used in combination with zlib.h AC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_ZLIB_COMPATIBILE], @@ -684,13 +684,14 @@ AC_DEFUN([AX_LIBCRYPTO_CHECK_LIB], [1], [Define to 1 if you have the 'crypto' library (-lcrypto).]) - ac_cv_libcrypto_LIBADD="-lcrypto" + ac_cv_libcrypto_CPPFLAGS="$openssl_CFLAGS" + ac_cv_libcrypto_LIBADD="$openssl_LIBS" dnl On Cygwin also link zlib since libcrypto relies on it AS_CASE( [$host], [*cygwin*], - [ac_cv_libcrypto_LIBADD="-lcrypto -lz"]) + [ac_cv_libcrypto_LIBADD="$ac_cv_libcrypto_LIBADD -lz"]) dnl Enforce the dynamic loader library to be included if available AC_CHECK_LIB( diff --git a/runtests.sh b/runtests.sh index 32115f4..276a2d3 100755 --- a/runtests.sh +++ b/runtests.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Script that runs the tests # -# Version: 20230410 +# Version: 20230507 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -358,11 +358,6 @@ then then exit ${EXIT_FAILURE}; fi - - if test -f "setup.py" && ! run_setup_py_tests ${PYTHON2}; - then - exit ${EXIT_FAILURE}; - fi fi # Test with Python 3. @@ -393,11 +388,6 @@ then then exit ${EXIT_FAILURE}; fi - - if test -f "setup.py" && ! run_setup_py_tests ${PYTHON3}; - then - exit ${EXIT_FAILURE}; - fi fi # Test with the default Python version. diff --git a/synclibs.sh b/synclibs.sh index c506d93..bbb15c6 100755 --- a/synclibs.sh +++ b/synclibs.sh @@ -1,7 +1,7 @@ #!/bin/sh # Script that synchronizes the local library dependencies # -# Version: 20210513 +# Version: 20230510 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -52,7 +52,8 @@ do fi LOCAL_LIB_UPPER=`echo "${LOCAL_LIB}" | tr "[a-z]" "[A-Z]"`; - LOCAL_LIB_VERSION=`grep -A 2 AC_INIT ${LOCAL_LIB}-$$/configure.ac | tail -n 1 | sed 's/^\s*\[\([0-9]*\)\],\s*$/\1/'`; + # Note that sed on FreeBSD does not support \s hence that we use [[:space:]] instead. + LOCAL_LIB_VERSION=`grep -A 2 AC_INIT ${LOCAL_LIB}-$$/configure.ac | tail -n 1 | sed 's/^[[:space:]]*\[\([0-9]*\)\],[[:space:]]*$/\1/'`; LOCAL_LIB_MAKEFILE_AM="${LOCAL_LIB}/Makefile.am"; cp ${LOCAL_LIB}-$$/${LOCAL_LIB}/*.[chly] ${LOCAL_LIB}; diff --git a/tests/test_sha1sum.sh b/tests/test_sha1sum.sh index 804c325..6342e10 100755 --- a/tests/test_sha1sum.sh +++ b/tests/test_sha1sum.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Sum tool testing script # -# Version: 20230410 +# Version: 20230701 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -24,7 +24,8 @@ test_callback() run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE}" -dsha1 > ${TMPDIR}/hmacsum; local RESULT=$?; - DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA1" | sed 's/^[^:]*[:][\t][\t]*//'`; + # Note that the $'' string notation is needed for Mac OS to correctly interpret the tabs. + DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA1" | sed $'s/^[^:]*[:][\t][\t]*//'`; cp ${TMPDIR}/hmacsum /tmp/ @@ -32,7 +33,7 @@ test_callback() then if test "${PLATFORM}" = "Darwin"; then - VERIFICATION_DIGEST_HASH=`openssl sha1 ${INPUT_FILE} | sed 's/^[^=]*=//'`; + VERIFICATION_DIGEST_HASH=`openssl sha1 ${INPUT_FILE} | sed 's/^[^=]*= //'`; else VERIFICATION_DIGEST_HASH=`sha1sum ${INPUT_FILE} | sed 's/[ ][ ]*[^ ][^ ]*$//'`; fi diff --git a/tests/test_sha2sum.sh b/tests/test_sha2sum.sh index 7fd8bf1..1de04a2 100755 --- a/tests/test_sha2sum.sh +++ b/tests/test_sha2sum.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Sum tool testing script # -# Version: 20230410 +# Version: 20230701 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -24,13 +24,14 @@ test_callback() run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE}" -dsha224,sha256,sha512 > ${TMPDIR}/hmacsum; local RESULT=$?; - DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA224" | sed 's/^[^:]*[:][\t][\t]*//'`; + # Note that the $'' string notation is needed for Mac OS to correctly interpret the tabs. + DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA224" | sed $'s/^[^:]*[:][\t][\t]*//'`; if test ${RESULT} -eq ${EXIT_SUCCESS}; then if test "${PLATFORM}" = "Darwin"; then - VERIFICATION_DIGEST_HASH=`openssl sha224 ${INPUT_FILE} | sed 's/^[^=]*=//'`; + VERIFICATION_DIGEST_HASH=`openssl sha224 ${INPUT_FILE} | sed 's/^[^=]*= //'`; else VERIFICATION_DIGEST_HASH=`sha224sum ${INPUT_FILE} | sed 's/[ ][ ]*[^ ][^ ]*$//'`; fi @@ -40,13 +41,14 @@ test_callback() fi fi - DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA256" | sed 's/^[^:]*[:][\t][\t]*//'`; + # Note that the $'' string notation is needed for Mac OS to correctly interpret the tabs. + DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA256" | sed $'s/^[^:]*[:][\t][\t]*//'`; if test ${RESULT} -eq ${EXIT_SUCCESS}; then if test "${PLATFORM}" = "Darwin"; then - VERIFICATION_DIGEST_HASH=`openssl sha256 ${INPUT_FILE} | sed 's/^[^=]*=//'`; + VERIFICATION_DIGEST_HASH=`openssl sha256 ${INPUT_FILE} | sed 's/^[^=]*= //'`; else VERIFICATION_DIGEST_HASH=`sha256sum ${INPUT_FILE} | sed 's/[ ][ ]*[^ ][^ ]*$//'`; fi @@ -56,13 +58,14 @@ test_callback() fi fi - DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA512" | sed 's/^[^:]*[:][\t][\t]*//'`; + # Note that the $'' string notation is needed for Mac OS to correctly interpret the tabs. + DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA512" | sed $'s/^[^:]*[:][\t][\t]*//'`; if test ${RESULT} -eq ${EXIT_SUCCESS}; then if test "${PLATFORM}" = "Darwin"; then - VERIFICATION_DIGEST_HASH=`openssl sha512 ${INPUT_FILE} | sed 's/^[^=]*=//'`; + VERIFICATION_DIGEST_HASH=`openssl sha512 ${INPUT_FILE} | sed 's/^[^=]*= //'`; else VERIFICATION_DIGEST_HASH=`sha512sum ${INPUT_FILE} | sed 's/[ ][ ]*[^ ][^ ]*$//'`; fi