Commit 5e75b913 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

scripts/pkgdep: Simplify mdl installation



On subsequent executions, the main check might have falsely assumed
mdl is installed even though gem installs might have failed during the
first run.

Move core dependencies to packaged versions. In practice, mdl is used
solely for check_format which is executed under fedora, but we have
been courteously providing support for it under ubuntu and freebsd so
add it there as well.

Change-Id: I6b6a621e8e0dad0be78d879c7558e92cc0f5f02d
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22465


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent ba909a45
Loading
Loading
Loading
Loading
+8 −15
Original line number Diff line number Diff line
@@ -92,21 +92,14 @@ install_spdk_bash_completion() {
install_markdownlint() {
	local git_repo_mdl="https://github.com/markdownlint/markdownlint.git"
	local mdl_version="v0.11.0"
	if [ ! -d /usr/src/markdownlint ]; then
		sudo -E git clone --branch "$mdl_version" "$git_repo_mdl" "/usr/src/markdownlint"
	local srcdir=/usr/src/markdownlint

	rm -rf "$srcdir"
	git clone --branch "$mdl_version" "$git_repo_mdl" "$srcdir"
	(
			cd /usr/src/markdownlint
			if ! hash rake &> /dev/null; then
				sudo -E gem install rake
			fi
			if ! hash bundler &> /dev/null; then
				sudo -E gem install bundler
			fi
			sudo -E rake install
		cd "$srcdir"
		rake install
	)
	else
		echo "Markdown lint tool already in /usr/src/markdownlint. Not installing"
	fi
}

install_protoc() {
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ apt-get install -y systemtap-sdt-dev
if [[ $INSTALL_DEV_TOOLS == "true" ]]; then
	# Tools for developers
	apt-get install -y git astyle lcov clang sg3-utils pciutils shellcheck \
		abigail-tools bash-completion ruby-dev pycodestyle
		abigail-tools bash-completion ruby-dev pycodestyle bundler rake
	# Additional dependencies for nvmf performance test script
	apt-get install -y python3-paramiko
fi
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ if [[ $INSTALL_DEV_TOOLS == "true" ]]; then
	pkg install -g -y "py*-pycodestyle"
	# ruby and ruby-gems are not preinstalled on FreeBSD but are needed to
	# build mdl - make sure they are in place.
	pkg install -y ruby devel/ruby-gems
	pkg install -y ruby devel/ruby-gems rubygem-{bundler,rake}
fi
if [[ $INSTALL_DOCS == "true" ]]; then
	# Additional dependencies for building docs
+4 −0
Original line number Diff line number Diff line
@@ -175,6 +175,10 @@ if [[ $INSTALL_DEV_TOOLS == "true" ]]; then
		devtool_pkgs+=(python-pycodestyle astyle lcov ShellCheck)
	fi

	if [[ $ID == fedora ]]; then
		devtool_pkgs+=(rubygem-{bundler,rake})
	fi

	yum install -y "${devtool_pkgs[@]}"
fi
if [[ $INSTALL_PMEM == "true" ]]; then