xref: /spdk/test/common/config/pkgdep/git (revision 8d3f8fb818735d717730489685debac3c814d0ac)
1function install_qat() {
2	if ! hash yasm; then
3		install yasm
4	fi
5
6	install libnl3 libnl3-devel || install libnl-3-200 libnl-3-dev libnl-genl-3-dev
7
8	in_syms() {
9		local syms
10		if [[ -e /proc/kallsyms ]]; then
11			syms=/proc/kallsyms
12		elif [[ -e /boot/System.map-$kernel_ver ]]; then
13			syms=/boot/System.map-$kernel_ver
14		else
15			return 0
16		fi
17
18		grep -q "$1" "$syms"
19	}
20
21	if [[ -e /sys/module/qat_c62x ]]; then
22		sudo modprobe -r qat_c62x || :
23	fi
24	if [[ -d $GIT_REPOS/QAT ]]; then
25		sudo rm -rf "$GIT_REPOS/QAT"
26	fi
27
28	mkdir "$GIT_REPOS/QAT"
29
30	tar -C "$GIT_REPOS/QAT" -xzof - < <(wget -O- "$DRIVER_LOCATION_QAT")
31
32	patch --dir="$GIT_REPOS/QAT" -p1 \
33		< "$rootdir/test/common/config/pkgdep/patches/qat/0001-old-style-declaration.patch"
34	patch --dir="$GIT_REPOS/QAT" -p1 \
35		< "$rootdir/test/common/config/pkgdep/patches/qat/0001-empty-body.patch"
36
37	(cd "$GIT_REPOS/QAT" && sudo ./configure --enable-icp-sriov=host && sudo make install)
38
39	if ! sudo service qat_service start; then
40		echo "failed to start the qat service. Something may be wrong with your device or package."
41	fi
42}
43
44function install_rocksdb() {
45	# Rocksdb is installed for use with the blobfs tests.
46	if [ ! -d /usr/src/rocksdb ]; then
47		git clone "${GIT_REPO_ROCKSDB}" "$GIT_REPOS/rocksdb"
48		git -C "$GIT_REPOS/rocksdb" checkout 6.15.fb
49		sudo mv "$GIT_REPOS/rocksdb" /usr/src/
50	else
51		sudo git -C /usr/src/rocksdb checkout spdk-v8.1.1
52		echo "rocksdb already in /usr/src. Not checking out again"
53	fi
54}
55
56function install_ittapi() {
57	# Install Intel Instrumentation and Trace API
58	local ittapi_version=v3.24.5 ittapi_dir=/usr/src/ittapi
59
60	rm -rf "$ittapi_dir"
61	git clone "${GIT_REPO_ITTAPI}" --branch "$ittapi_version" "$GIT_REPOS/ittapi"
62	make -C "$GIT_REPOS/ittapi/src/ittnotify_refcol"
63
64	mv "$GIT_REPOS/ittapi" "$ittapi_dir"
65	ln -s . "$ittapi_dir/sdk"
66}
67
68function install_fio() {
69	# This version of fio is installed in /usr/src/fio to enable
70	# building the spdk fio plugin.
71	local fio_version="fio-3.35"
72
73	if [ ! -d /usr/src/fio ]; then
74		if [ ! -d fio ]; then
75			git clone "${GIT_REPO_FIO}" "$GIT_REPOS/fio"
76			sudo mv "$GIT_REPOS/fio" /usr/src/
77		else
78			sudo mv "$GIT_REPOS/fio" /usr/src/
79		fi
80		(
81			git -C /usr/src/fio checkout master \
82				&& git -C /usr/src/fio pull \
83				&& git -C /usr/src/fio checkout $fio_version \
84				&& if [ $OSID == 'freebsd' ]; then
85					gmake -C /usr/src/fio -j${jobs} \
86						&& sudo gmake -C /usr/src/fio install
87				else
88					make -C /usr/src/fio -j${jobs} \
89						&& sudo make -C /usr/src/fio install
90				fi
91		)
92	else
93		echo "fio already in /usr/src/fio. Not installing"
94	fi
95}
96
97function install_flamegraph() {
98	# Flamegraph is used when printing out timing graphs for the tests.
99	if [ ! -d /usr/local/FlameGraph ]; then
100		git clone "${GIT_REPO_FLAMEGRAPH}" "$GIT_REPOS/FlameGraph"
101		mkdir -p /usr/local
102		sudo mv "$GIT_REPOS/FlameGraph" /usr/local/FlameGraph
103	else
104		echo "flamegraph already installed. Skipping"
105	fi
106}
107
108function _install_qemu() {
109	local repo=$1
110	local branch=$2
111	local prefix=${3:-}
112	local name=${4:-}
113
114	mkdir -p "$GIT_REPOS/qemu"
115
116	local repo_dir=$GIT_REPOS/qemu/$branch
117	if [[ -n $prefix ]]; then
118		repo_dir=$GIT_REPOS/qemu/$prefix-$branch
119	fi
120
121	if [[ ! -d $repo_dir ]]; then
122		git clone "$repo" -b "$branch" "$repo_dir"
123	else
124		echo "qemu already checked out. Skipping"
125	fi
126
127	declare -a opt_params=("--prefix=/usr/local/qemu/${repo_dir##*/}")
128	declare -a extra_cflags=()
129
130	opt_params+=("--disable-docs")
131	if ((gcc_version >= 9)); then
132		opt_params+=("--disable-glusterfs")
133	fi
134
135	extra_cflags+=("-Wno-error")
136
137	# Most tsocks proxies rely on a configuration file in /etc/tsocks.conf.
138	# If using tsocks, please make sure to complete this config before trying to build qemu.
139	if [[ $INSTALL_TSOCKS == true && $NO_TSOCKS != true ]]; then
140		if hash tsocks 2> /dev/null; then
141			opt_params+=("--with-git='tsocks git'")
142		fi
143	fi
144	opt_params+=("--extra-cflags=${extra_cflags[*]}")
145
146	if [[ $prefix == vanilla ]]; then
147		# Latest qemu seems to take sysconfdir from the prefix and instead of checking /etc
148		# it looks under /usr/local/qemu/vanilla*/bin/../etc which is a bit peculiar. Fix it.
149		opt_params+=("--sysconfdir=/etc/")
150	fi
151
152	# The qemu configure script places several output files in the CWD.
153	(cd "$repo_dir" && ./configure "${opt_params[@]}" --target-list="x86_64-softmmu" --enable-kvm --enable-linux-aio --enable-numa)
154
155	make -C "$repo_dir" -j${jobs}
156	sudo make -C "$repo_dir" install
157
158	# Add a symlink to point at a latest build - this is useful to easily track QEMU flavors for which
159	# branches change quite often (e.g. vfio-user's).
160	[[ -n $name ]] || return 0
161	[[ -L /usr/local/qemu/$name-latest ]] && sudo rm "/usr/local/qemu/$name-latest"
162	sudo ln -s "/usr/local/qemu/${repo_dir##*/}" "/usr/local/qemu/$name-latest"
163}
164
165function install_qemu() {
166	# Four versions of QEMU are used in the tests, three are installed
167	# directly from the source. Each QEMU is dedicated for different
168	# use-cases:
169	#  - Packed QEMU: version provided by given distro. Used to boot VMs
170	#    from within vhost tests.
171	#  - vfio-user QEMU: A special fork to test libvfio-user components.
172	#  - Vanilla QEMU: Used by the CI to boot the testing VMs.
173
174	_install_qemu $GIT_REPO_QEMU_VFIO $VFIO_QEMU_BRANCH "" vfio-user
175	_install_qemu "$GIT_REPO_QEMU" "$VANILLA_QEMU_BRANCH" vanilla vanilla
176}
177
178function install_nvmecli() {
179	# nvme-cli >1.11.1 should be used.
180	rm -rf "$GIT_REPOS/nvme-cli-cuse"
181	git clone "https://github.com/linux-nvme/nvme-cli.git" "$GIT_REPOS/nvme-cli-cuse"
182	git -C "$GIT_REPOS/nvme-cli-cuse" checkout v2.5
183
184	meson setup --force-fallback-for=libnvme \
185		"$GIT_REPOS/nvme-cli-cuse/.build" \
186		"$GIT_REPOS/nvme-cli-cuse"
187	meson compile -C "$GIT_REPOS/nvme-cli-cuse/.build"
188
189	rm -rf /usr/local/src/nvme-cli
190	mv "$GIT_REPOS/nvme-cli-cuse" /usr/local/src/nvme-cli
191
192	# Make sure binary is available for the cuse tests
193	if [[ -e /usr/local/src/nvme-cli/.build/nvme ]]; then
194		sudo ln -s .build/nvme /usr/local/src/nvme-cli/
195	fi
196}
197
198# This function install version of nvme-cli, that support listing spdk nvme
199# devices, should be remove after changes present in nvme-cli upstream.
200function install_nvmecli_plugin() {
201	rm -rf "$GIT_REPOS/nvme-cli-plugin"
202
203	git clone $GIT_REPO_NVME_CLI "$GIT_REPOS/nvme-cli-plugin"
204	git -C "$GIT_REPOS/nvme-cli-plugin" fetch $GIT_REPO_NVME_CLI refs/changes/95/16795/12
205	git -C "$GIT_REPOS/nvme-cli-plugin" checkout FETCH_HEAD
206
207	meson setup --force-fallback-for=libnvme,json-c \
208		"$GIT_REPOS/nvme-cli-plugin/.build" \
209		"$GIT_REPOS/nvme-cli-plugin"
210	meson compile -C "$GIT_REPOS/nvme-cli-plugin/.build"
211
212	rm -rf /usr/local/src/nvme-cli-plugin
213	mv "$GIT_REPOS/nvme-cli-plugin" /usr/local/src/nvme-cli-plugin
214
215	# Make sure binary is available for the plugin tests
216	if [[ -e /usr/local/src/nvme-cli-plugin/.build/nvme ]]; then
217		sudo ln -s .build/nvme /usr/local/src/nvme-cli-plugin/
218	fi
219}
220
221function install_libiscsi() {
222	# We currently don't make any changes to the libiscsi repository for our tests, but it is possible that we will need
223	# to later. Cloning from git is just future proofing the machines.
224	if [[ ! -d $GIT_REPOS/libiscsi ]]; then
225		git clone "${GIT_REPO_LIBISCSI}" "$GIT_REPOS/libiscsi"
226	else
227		echo "libiscsi already checked out. Skipping"
228	fi
229	(cd "$GIT_REPOS/libiscsi" && ./autogen.sh && ./configure --prefix=/usr/local/libiscsi)
230	make -C "$GIT_REPOS/libiscsi" -j${jobs} WARN_CFLAGS=
231	sudo make -C "$GIT_REPOS/libiscsi" install
232}
233
234function install_git() {
235	if type -P git; then
236		if ge "$(git --version | awk '{print $3}')" "$GIT_VERSION"; then
237			return 0
238		fi
239	fi >/dev/null
240
241	install zlib-devel curl-devel
242	tar -C "$GIT_REPOS" -xzof <(wget -qO- "$GIT_REPO_GIT")
243	(cd "$GIT_REPOS/git-$GIT_VERSION" \
244		&& make configure \
245		&& ./configure \
246		&& sudo make -j${jobs} install)
247}
248
249function install_extra_pkgs() {
250	if [[ $INSTALL_QAT == true ]]; then
251		install libudev-devel || install libudev-dev || :
252	fi
253
254	if [[ $INSTALL_QEMU == true ]]; then
255		install qemu-system-x86 qemu-img \
256			|| install qemu-system-x86 qemu-utils \
257			|| install qemu
258
259		# Install extra dependency which was removed from Qemu 7.2 source tree
260		install libslirp-devel \
261			|| install libslirp-dev
262	fi || :
263}
264
265function install_vagrant() {
266	local vagrant_version="2.2.7"
267	local vagrant_installer="vagrant_${vagrant_version}_x86_64.deb"
268	local vagrant_plugins=(vagrant-libvirt vagrant-sshfs vagrant-cachier vagrant-proxyconf)
269
270	if [[ $OSID != ubuntu ]]; then
271		echo "Currently, Vagrant installation is supported only on ubuntu"
272		return 0
273	fi
274
275	# Install vagrant and it's plugins dependencies
276	# function should be defined in pkgdep/$package_manager file
277	install_vagrant_dependencies
278
279	# Download and install vagrant
280	if hash vagrant &> /dev/null; then
281		echo "Vagrant is already installed"
282	else
283		wget "https://releases.hashicorp.com/vagrant/${vagrant_version}/${vagrant_installer}"
284		sudo dpkg -i "${vagrant_installer}"
285	fi
286	vagrant --version
287
288	# Install vagrant plugins
289	local vagrant_plugin_list
290	vagrant_plugin_list=$(vagrant plugin list)
291
292	local plugin
293	for plugin in "${vagrant_plugins[@]}"; do
294		if grep -Fq "$plugin" <<< "$vagrant_plugin_list"; then
295			echo "$plugin already installed"
296		else
297			vagrant plugin install "$plugin"
298		fi
299	done
300}
301
302function install_igb_uio() {
303	git clone "${GIT_REPO_DPDK_KMODS}" "$GIT_REPOS/dpdk-kmods"
304
305	(cd "$GIT_REPOS/dpdk-kmods/linux/igb_uio" && make -j ${jobs})
306	sudo mkdir -p "/lib/modules/$(uname -r)/extra/dpdk"
307	sudo cp "$GIT_REPOS/dpdk-kmods/linux/igb_uio/igb_uio.ko" "/lib/modules/$(uname -r)/extra/dpdk"
308	sudo depmod
309}
310
311function install_irdma() {
312	local RDMA_CORE_VERSION=51.0
313	local RDMA_CORE=https://github.com/linux-rdma/rdma-core/releases/download/v$RDMA_CORE_VERSION/rdma-core-$RDMA_CORE_VERSION.tar.gz
314
315	if [[ $ID != fedora ]]; then
316		echo "Installation of the irdma can be attempted only on Fedora"
317		return 0
318	fi
319
320	# Install extra dependencies needed by the rdma-core
321	install ninja-build pandoc perl-generators valgrind-devel python-docutils libnl3 libnl3-devel python3-Cython
322
323	rm -rf "$GIT_REPOS/irdma-$IRDMA_VERSION"
324	rm -rf "$GIT_REPOS/rdma-core-$RDMA_CORE_VERSION"
325
326	curl -L -o- "$IRDMA_DRIVER" | tar -C "$GIT_REPOS" -xzf -
327
328	if ge "$kernel_ver" 6.10; then
329		patch --dir="$GIT_REPOS/irdma-$IRDMA_VERSION" -p1  \
330			< "$rootdir/test/common/config/pkgdep/patches/irdma/0001-ip_route_output.patch"
331	fi
332
333	[[ -e $GIT_REPOS/irdma-$IRDMA_VERSION/build.sh ]]
334
335	(
336		cd "$GIT_REPOS/irdma-$IRDMA_VERSION"
337		sed -i "s/IRDMA_FLUSH_DELAY_MS 1500/IRDMA_FLUSH_DELAY_MS 50/" \
338			"$GIT_REPOS/irdma-$IRDMA_VERSION/src/irdma/verbs.h"
339		"$GIT_REPOS/irdma-$IRDMA_VERSION/build.sh"
340	)
341
342	# Fetch and build the rdma-core irdma depends on
343	curl -L -o- "$RDMA_CORE" | tar -C "$GIT_REPOS" -xzf -
344	[[ -e $GIT_REPOS/irdma-$IRDMA_VERSION/libirdma-$RDMA_CORE_VERSION.patch ]]
345
346	patch --dir="$GIT_REPOS/rdma-core-$RDMA_CORE_VERSION" -p2 \
347		< "$GIT_REPOS/irdma-$IRDMA_VERSION/libirdma-$RDMA_CORE_VERSION.patch"
348
349	# Note that paths and the name of the package are hardcoded into .spec, hence they need to stay like this.
350	[[ -e $GIT_REPOS/rdma-core-$RDMA_CORE_VERSION/redhat/rdma-core.spec ]]
351	mkdir -p "$HOME/rpmbuild/"{SOURCES,SPECS}
352	cp "$GIT_REPOS/rdma-core-$RDMA_CORE_VERSION/redhat/rdma-core.spec" "$HOME/rpmbuild/SPECS"
353
354	# Re-package the source
355	tar -czf "$HOME/rpmbuild/SOURCES/rdma-core-$RDMA_CORE_VERSION.tar.gz" -C "$GIT_REPOS" "rdma-core-$RDMA_CORE_VERSION"
356
357	# Build the rpms
358	(
359		cd "$HOME/rpmbuild/SPECS"
360		# Make sure stock ninja-build is used
361		PATH="/usr/bin:$PATH" rpmbuild -ba rdma-core.spec
362	)
363
364	# Now, don't install the packages since this will, most likely, conflict with packages already installed
365	# in the system. Instead, simply inform user what the next step is and note what potential issues it may
366	# have with the installation.
367
368	shopt -s nullglob
369	local rpms=("$HOME/rpmbuild/RPMS/x86_64/"*.rpm)
370	shopt -u nullglob
371	((${#rpms[@]} > 0))
372
373	cat <<-EOF
374
375		INFO: rdma-core-$RDMA_CORE_VERSION was successfully built, following packages are
376		available for installation:
377
378		$(printf '  - %s\n' "${rpms[@]##*/}")
379
380		Note that installing the above packages may raise conflicts with their
381		potentially newer versions already installed on the system. Dependent
382		packages may be uninstalled during the process as well. Please, run the
383		following command to finish the installation:
384
385		  $package_manager install [--allowerasing] $HOME/rpmbuild/RPMS/x86_64/*.rpm
386
387	EOF
388}
389
390function install_ice() {
391	rm -rf "$GIT_REPOS/ice-$ICE_VERSION"
392
393	curl -L -o- "$ICE_DRIVER" | tar -C "$GIT_REPOS" -xzf -
394
395	if ge "$kernel_ver" 6.10; then
396		patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1  \
397			< "$rootdir/test/common/config/pkgdep/patches/ice/0001-__assign_str.patch"
398		patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1  \
399			< "$rootdir/test/common/config/pkgdep/patches/ice/0001-napi_alloc_skb.patch"
400		patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1  \
401			< "$rootdir/test/common/config/pkgdep/patches/ice/0001-devlink_param.patch"
402		patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1  \
403			< "$rootdir/test/common/config/pkgdep/patches/ice/0001-xsk_buff_dma.patch"
404	fi
405
406	(
407		cd "$GIT_REPOS/ice-$ICE_VERSION/src"
408		sudo make -j"$(nproc)" install
409	)
410}
411
412function install_libbpf() {
413	local libbpf_version=v1.4.5
414
415	rm -rf "$GIT_REPOS/libbpf"
416	git clone "$GIT_REPO_LIBBPF" --branch "$libbpf_version" "$GIT_REPOS/libbpf"
417
418	make -C "$GIT_REPOS/libbpf/src" -j install
419	# install target doesn't include the kernel header files
420	make -C "$GIT_REPOS/libbpf/src" install_uapi_headers
421}
422
423function install_bpftrace() {
424	local deps_fedora=() deps_ubuntu=() bcc_rev
425
426	deps_fedora+=(cereal-devel)
427	deps_fedora+=(clang-devel)
428	deps_fedora+=(dwarves)
429	deps_fedora+=(gmock-devel)
430	deps_fedora+=(gtest-devel)
431	deps_fedora+=(llvm-devel)
432	deps_fedora+=(bcc-devel)
433	deps_fedora+=(libbpf-devel)
434
435	deps_ubuntu+=(libcereal-dev)
436	deps_ubuntu+=(libclang-dev)
437	deps_ubuntu+=(llvm-dev)
438	# Under jammy (2204) the libbpf version is not compatible with the version of
439	# bpftrace that we are using. Instead, we are going to provide our own build
440	# of libbpf, including both up-to-date bpf.h and linux/bpf.h.
441	[[ $VERSION_CODENAME == jammy ]] || deps_ubuntu+=(libbpf-dev)
442	deps_ubuntu+=(libbpfcc-dev)
443	deps_ubuntu+=(libelf-dev)
444	deps_ubuntu+=(binutils-dev)
445
446	local -n deps="deps_$ID"
447
448	((${#deps[@]} > 0)) || return 1
449
450	deps+=(clang cmake)
451
452	install "${deps[@]}"
453
454	if [[ $VERSION_CODENAME == jammy ]]; then
455		install_libbpf
456	fi
457
458	rm -rf $GIT_REPOS/bpftrace
459
460	git clone "$GIT_REPO_BPFTRACE" "$GIT_REPOS/bpftrace"
461	git -C $GIT_REPOS/bpftrace checkout $BPFTRACE_VERSION
462
463	mkdir -p "$GIT_REPOS/bpftrace/build"
464	cmake \
465		-DCMAKE_BUILD_TYPE=Release \
466		-DBUILD_TESTING=OFF \
467		-B "$GIT_REPOS/bpftrace/build" \
468		-S "$GIT_REPOS/bpftrace"
469
470	make -C $GIT_REPOS/bpftrace/build -j$(nproc)
471	sudo make -C $GIT_REPOS/bpftrace/build install
472}
473
474function install_doxygen() {
475	# Stable, 1.10 commit that works for our docs
476	local release=78422d3905e57acebf0374feefafa6578dbe86aa
477
478	rm -rf "$GIT_REPOS/doxygen"
479
480	git clone "$GIT_REPO_DOXYGEN" "$GIT_REPOS/doxygen"
481	git -C "$GIT_REPOS/doxygen" checkout "$release"
482
483	mkdir -p "$GIT_REPOS/doxygen/build"
484
485	cmake -G "Unix Makefiles" \
486		-B "$GIT_REPOS/doxygen/build" \
487		-S "$GIT_REPOS/doxygen"
488
489	# This build is quite heavy, so let's not go crazy with -j here
490	make -C "$GIT_REPOS/doxygen/build" -j$(($(nproc) / 2))
491	make -C "$GIT_REPOS/doxygen/build" install
492}
493
494function install_sources() {
495	if [[ $ID == centos ]] && (( VERSION_ID == 7 )); then
496		# install proper version of the git first
497		install_git
498	fi
499
500	IFS="," read -ra conf_env <<< "$CONF"
501	for conf in "${conf_env[@]}"; do
502		export "INSTALL_${conf^^}=true"
503	done
504
505	if [[ $OSID == freebsd ]]; then
506		jobs=$(($(sysctl -n hw.ncpu) * 2))
507	else
508		jobs=$(($(nproc) * 2))
509		sources+=(
510			install_irdma
511			install_libiscsi
512			install_nvmecli
513			install_nvmecli_plugin
514			install_qat
515			install_rocksdb
516			install_qemu
517			install_igb_uio
518			install_ice
519			install_bpftrace
520			install_doxygen
521		)
522		install_extra_pkgs
523	fi
524	sources+=(install_fio)
525	sources+=(install_flamegraph)
526	sources+=(install_vagrant)
527	sources+=(install_ittapi)
528
529	sudo mkdir -p /usr/{,local}/src
530	sudo mkdir -p "$GIT_REPOS"
531
532	for source in "${sources[@]}"; do
533		source_conf=${source^^}
534		if [[ ${!source_conf} == true ]]; then
535			"$source"
536		fi
537	done
538}
539
540GIT_VERSION=2.25.1
541IRDMA_VERSION=1.14.31
542ICE_VERSION=1.14.9
543
544BPFTRACE_VERSION=${BPFTRACE_VERSION:-f7bdfb44}
545VFIO_QEMU_BRANCH=${VFIO_QEMU_BRANCH:-vfio-user-p3.0}
546VANILLA_QEMU_BRANCH=${VANILLA_QEMU_BRANCH:-v8.0.0}
547
548: ${GIT_REPO_ROCKSDB=https://review.spdk.io/spdk/rocksdb}
549export GIT_REPO_ROCKSDB
550: ${GIT_REPO_FIO=https://github.com/axboe/fio.git}
551export GIT_REPO_FIO
552: ${GIT_REPO_FLAMEGRAPH=https://github.com/brendangregg/FlameGraph.git}
553export GIT_REPO_FLAMEGRAPH
554: ${GIT_REPO_QEMU=https://github.com/qemu/qemu}
555export GIT_REPO_QEMU
556: ${GIT_REPO_QEMU_VFIO=https://github.com/oracle/qemu}
557export GIT_REPO_QEMU_VFIO
558: ${GIT_REPO_LIBISCSI=https://github.com/sahlberg/libiscsi}
559export GIT_REPO_LIBISCSI
560: ${DRIVER_LOCATION_QAT=https://downloadmirror.intel.com/828487/QAT.L.4.26.0-00008.tar.gz}
561export DRIVER_LOCATION_QAT
562: ${GIT_REPO_GIT=https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz}
563export GIT_REPO_GIT
564: ${GIT_REPO_DPDK_KMODS=http://dpdk.org/git/dpdk-kmods}
565export GIT_REPO_DPDK_KMODS
566: ${IRDMA_DRIVER=https://downloadmirror.intel.com/823677/irdma-$IRDMA_VERSION.tgz}
567export IRDMA_DRIVER
568: ${ICE_DRIVER="https://sourceforge.net/projects/e1000/files/ice%20stable/$ICE_VERSION/ice-$ICE_VERSION.tar.gz"}
569export ICE_DRIVER
570: ${GIT_REPO_BCC=https://github.com/iovisor/bcc.git}
571export GIT_REPO_BCC
572: ${GIT_REPO_BPFTRACE=https://github.com/iovisor/bpftrace.git}
573export GIT_REPO_BPFTRACE
574: ${GIT_REPO_NVME_CLI=https://review.spdk.io/gerrit/spdk/nvme-cli}
575export GIT_REPO_NVME_CLI
576: ${GIT_REPO_ITTAPI=https://github.com/intel/ittapi.git}
577export GIT_REPO_ITTAPI
578: ${GIT_REPO_DOXYGEN="https://github.com/doxygen/doxygen"}
579export GIT_REPO_DOXYGEN
580: ${GIT_REPO_LIBBPF="https://github.com/libbpf/libbpf"}
581export GIT_REPO_LIBBPF
582
583GIT_REPOS=${GIT_REPOS:-$HOME}
584
585gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}
586if [[ -e /proc/sys/kernel/osrelease ]]; then
587	kernel_ver=$(< /proc/sys/kernel/osrelease)
588fi
589