scripts/pkgdep: Add uring install function
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com> Change-Id: Idabeee49f9a0b9093136cde214e8528f1abc37e9 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2702 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
e7a86c42a4
commit
7303918290
@ -16,6 +16,7 @@ function usage() {
|
|||||||
echo " -f --fuse Additional dependencies for FUSE and NVMe-CUSE"
|
echo " -f --fuse Additional dependencies for FUSE and NVMe-CUSE"
|
||||||
echo " -r --rdma Additional dependencies for RDMA transport in NVMe over Fabrics"
|
echo " -r --rdma Additional dependencies for RDMA transport in NVMe over Fabrics"
|
||||||
echo " -b --docs Additional dependencies for building docs"
|
echo " -b --docs Additional dependencies for building docs"
|
||||||
|
echo " -u --uring Additional dependencies for io_uring"
|
||||||
echo ""
|
echo ""
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
@ -28,6 +29,23 @@ function install_all_dependencies() {
|
|||||||
INSTALL_DOCS=true
|
INSTALL_DOCS=true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function install_liburing() {
|
||||||
|
local GIT_REPO_LIBURING=https://github.com/axboe/liburing.git
|
||||||
|
local liburing_dir=/usr/local/src/liburing
|
||||||
|
|
||||||
|
if [[ -e /usr/lib/liburing.so ]]; then
|
||||||
|
echo "liburing is already installed. skipping"
|
||||||
|
else
|
||||||
|
if [[ -d $liburing_dir ]]; then
|
||||||
|
echo "liburing source already present, not cloning"
|
||||||
|
else
|
||||||
|
mkdir $liburing_dir
|
||||||
|
git clone "${GIT_REPO_LIBURING}" "$liburing_dir"
|
||||||
|
fi
|
||||||
|
(cd "$liburing_dir" && ./configure && make install)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function install_shfmt() {
|
function install_shfmt() {
|
||||||
# Fetch version that has been tested
|
# Fetch version that has been tested
|
||||||
local shfmt_version=3.1.0
|
local shfmt_version=3.1.0
|
||||||
@ -81,8 +99,9 @@ INSTALL_PMEM=false
|
|||||||
INSTALL_FUSE=false
|
INSTALL_FUSE=false
|
||||||
INSTALL_RDMA=false
|
INSTALL_RDMA=false
|
||||||
INSTALL_DOCS=false
|
INSTALL_DOCS=false
|
||||||
|
INSTALL_LIBURING=false
|
||||||
|
|
||||||
while getopts 'abdfhipr-:' optchar; do
|
while getopts 'abdfhipru-:' optchar; do
|
||||||
case "$optchar" in
|
case "$optchar" in
|
||||||
-)
|
-)
|
||||||
case "$OPTARG" in
|
case "$OPTARG" in
|
||||||
@ -93,6 +112,7 @@ while getopts 'abdfhipr-:' optchar; do
|
|||||||
fuse) INSTALL_FUSE=true ;;
|
fuse) INSTALL_FUSE=true ;;
|
||||||
rdma) INSTALL_RDMA=true ;;
|
rdma) INSTALL_RDMA=true ;;
|
||||||
docs) INSTALL_DOCS=true ;;
|
docs) INSTALL_DOCS=true ;;
|
||||||
|
uring) INSTALL_LIBURING=true ;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid argument '$OPTARG'"
|
echo "Invalid argument '$OPTARG'"
|
||||||
usage
|
usage
|
||||||
@ -106,6 +126,7 @@ while getopts 'abdfhipr-:' optchar; do
|
|||||||
f) INSTALL_FUSE=true ;;
|
f) INSTALL_FUSE=true ;;
|
||||||
r) INSTALL_RDMA=true ;;
|
r) INSTALL_RDMA=true ;;
|
||||||
b) INSTALL_DOCS=true ;;
|
b) INSTALL_DOCS=true ;;
|
||||||
|
u) INSTALL_LIBURING=true ;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid argument '$OPTARG'"
|
echo "Invalid argument '$OPTARG'"
|
||||||
usage
|
usage
|
||||||
|
@ -72,3 +72,6 @@ if [[ $INSTALL_DOCS == "true" ]]; then
|
|||||||
cd .. && rm -rf mscgen;
|
cd .. && rm -rf mscgen;
|
||||||
popd"
|
popd"
|
||||||
fi
|
fi
|
||||||
|
if [[ $INSTALL_LIBURING == "true" ]]; then
|
||||||
|
install_liburing
|
||||||
|
fi
|
||||||
|
@ -53,3 +53,6 @@ if [[ $INSTALL_DOCS == "true" ]]; then
|
|||||||
# Additional dependencies for building docs
|
# Additional dependencies for building docs
|
||||||
apt-get install -y doxygen mscgen graphviz
|
apt-get install -y doxygen mscgen graphviz
|
||||||
fi
|
fi
|
||||||
|
if [[ $INSTALL_LIBURING == "true" ]]; then
|
||||||
|
install_liburing
|
||||||
|
fi
|
||||||
|
@ -68,3 +68,6 @@ if [[ $INSTALL_DOCS == "true" ]]; then
|
|||||||
yum install -y mscgen || echo "Warning: couldn't install mscgen via yum. Please install mscgen manually."
|
yum install -y mscgen || echo "Warning: couldn't install mscgen via yum. Please install mscgen manually."
|
||||||
yum install -y doxygen graphviz
|
yum install -y doxygen graphviz
|
||||||
fi
|
fi
|
||||||
|
if [[ $INSTALL_LIBURING == "true" ]]; then
|
||||||
|
install_liburing
|
||||||
|
fi
|
||||||
|
@ -29,3 +29,6 @@ if [[ $INSTALL_DOCS == "true" ]]; then
|
|||||||
# Additional dependencies for building docs
|
# Additional dependencies for building docs
|
||||||
zypper install -y doxygen mscgen graphviz
|
zypper install -y doxygen mscgen graphviz
|
||||||
fi
|
fi
|
||||||
|
if [[ $INSTALL_LIBURING == "true" ]]; then
|
||||||
|
install_liburing
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user