From d6e198797d05415a40576d06a706e213d13260c4 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Fri, 15 Oct 2021 09:31:25 -0700 Subject: [PATCH] Switch from yasm to nasm ... and build it from source so we can build latest ISA-L (otherwise, the version shipped by some distros would complain about a %use directive). Change-Id: Iddba90e65c0eac135a71af920b3433775b9c8f0e --- bindep.txt | 2 -- tools/pip-install-with-liberasurecode.sh | 18 +++++++++++++++++- tools/test-setup.sh | 4 ++-- tox.ini | 1 + 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/bindep.txt b/bindep.txt index f45d4c2..3f49977 100644 --- a/bindep.txt +++ b/bindep.txt @@ -7,8 +7,6 @@ make [platform:rpm] autoconf automake libtool -# yasm exists everywhere but CentOS 7 -yasm [!platform:centos] liberasurecode-dev [platform:dpkg] # There's no library in CentOS 7 but Fedora and openSUSE have it. liberasurecode-devel [platform:rpm !platform:centos] diff --git a/tools/pip-install-with-liberasurecode.sh b/tools/pip-install-with-liberasurecode.sh index ce52a9e..1af2945 100755 --- a/tools/pip-install-with-liberasurecode.sh +++ b/tools/pip-install-with-liberasurecode.sh @@ -4,9 +4,25 @@ if [ -z "$VIRTUAL_ENV" ]; then exit 1 fi +if [ -n "$NASM_DIR" ]; then + if [ ! -d "$NASM_DIR" ]; then + mkdir -p "$NASM_DIR" + pushd "$NASM_DIR" + curl https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/nasm-2.16.01.tar.gz | tar -xz + popd + fi + pushd "$NASM_DIR"/nasm* + ./autogen.sh + ./configure --prefix "$VIRTUAL_ENV" + make nasm + install -c nasm "$VIRTUAL_ENV"/bin/nasm + PATH="$VIRTUAL_ENV/bin:$PATH" + popd +fi + if [ -n "$ISAL_DIR" ]; then if [ ! -d "$ISAL_DIR" ]; then - git clone https://github.com/intel/isa-l.git -b v2.30.0 "$ISAL_DIR" + git clone https://github.com/intel/isa-l.git "$ISAL_DIR" fi pushd "$ISAL_DIR" ./autogen.sh diff --git a/tools/test-setup.sh b/tools/test-setup.sh index 926a1d6..7b6bd30 100755 --- a/tools/test-setup.sh +++ b/tools/test-setup.sh @@ -23,12 +23,12 @@ if is_rhel7; then sudo yum install -y centos-release-openstack-train # Now that RDO repositories are enabled, install missing # packages. - sudo yum install -y liberasurecode-devel yasm + sudo yum install -y liberasurecode-devel fi if is_rhel8; then # Install CentOS OpenStack repos so that we have access to some extra # packages. sudo dnf install -y centos-release-openstack-ussuri - sudo dnf install -y liberasurecode-devel yasm + sudo dnf install -y liberasurecode-devel fi diff --git a/tox.ini b/tox.ini index c07c3e9..4185083 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,7 @@ deps = commands= pytest -v test/ setenv = LIBERASURECODE_DIR={envdir}/liberasurecode + NASM_DIR={envdir}/nasm ISAL_DIR={envdir}/isa-l JERASURE_DIR={envdir}/jerasure GFCOMPLETE_DIR={envdir}/gf-complete