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