ipsec: updates to require ipsec installation
Although a pre-req to crypto only, the latest ipsec library now requires root to install. This patch takes 2 approaches to making sure the ipsec module is installed properly. First, in configure, if crypto is enabled it will check to see if ipsec is already installed and if so do nothing. If it is not it will exit and instruct the user to manually install and re-run the configure script. Secondly, to be proactive, this patch adds the installation, if not already installed, to the pkg dependency script because it is already executed as root. It also does the same for nasm, checking the required versions in both places. Change-Id: I037629f21be474b88c12451733ac12ff0b1651f5 Signed-off-by: Paul Luse <paul.e.luse@intel.com> Reviewed-on: https://review.gerrithub.io/422746 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
d6d0e494bb
commit
0fb1e1c524
17
configure
vendored
17
configure
vendored
@ -338,7 +338,22 @@ than or equal to 4.14 will see significantly reduced performance.
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$CONFIG_CRYPTO" = "y" ]]; then
|
||||||
|
set +e
|
||||||
|
nasm_ver=$(nasm -v | sed 's/[^0-9]*//g' | awk '{print substr ($0, 0, 5)}')
|
||||||
|
ipsec="$(find /usr -name intel-ipsec-mb.h 2>/dev/null)"
|
||||||
|
set -e
|
||||||
|
if [[ $nasm_ver -lt "21202" ]]; then
|
||||||
|
echo Crypto requires NASM version 2.12.02 or newer. Please install
|
||||||
|
echo or upgrade then re-run this scrip.
|
||||||
|
else
|
||||||
|
if [[ "$ipsec" == "" ]]; then
|
||||||
|
echo "To enable crypto you must first go to the intel-ipsec-mb directory and "
|
||||||
|
echo "run 'make' then 'sudo make install' then re-run this script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo -n "Creating CONFIG.local..."
|
echo -n "Creating CONFIG.local..."
|
||||||
|
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
|
|
||||||
SYSTEM=`uname -s`
|
SYSTEM=`uname -s`
|
||||||
|
|
||||||
|
scriptsdir=$(readlink -f $(dirname $0))
|
||||||
|
rootdir=$(readlink -f $scriptsdir/..)
|
||||||
|
|
||||||
if [ -s /etc/redhat-release ]; then
|
if [ -s /etc/redhat-release ]; then
|
||||||
# Includes Fedora, CentOS
|
# Includes Fedora, CentOS
|
||||||
if [ -f /etc/centos-release ]; then
|
if [ -f /etc/centos-release ]; then
|
||||||
@ -62,3 +65,24 @@ else
|
|||||||
echo "pkgdep: unknown system type."
|
echo "pkgdep: unknown system type."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Only crypto needs nasm and this lib but because the lib requires root to
|
||||||
|
# install we do it here.
|
||||||
|
nasm_ver=$(nasm -v | sed 's/[^0-9]*//g' | awk '{print substr ($0, 0, 5)}')
|
||||||
|
if [[ $nasm_ver -lt "21202" ]]; then
|
||||||
|
echo Crypto requires NASM version 2.12.02 or newer. Please install
|
||||||
|
echo or upgrade and re-run this script if you are going to use Crypto.
|
||||||
|
else
|
||||||
|
ipsec="$(find /usr -name intel-ipsec-mb.h 2>/dev/null)"
|
||||||
|
if [[ "$ipsec" == "" ]]; then
|
||||||
|
if [[ -d "$rootdir/intel-ipsec-mb" ]]; then
|
||||||
|
cd $rootdir/intel-ipsec-mb
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd -
|
||||||
|
else
|
||||||
|
echo "The intel-ipsec-mb submodule has not been cloned and will not be installed."
|
||||||
|
echo "To enable crypto, run 'git submodule update --init' and then run this script again."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user