xref: /spdk/test/common/config/pkgdep/git (revision ee32a82bfd3ff5b1a10ed775ee06f0eaffce60eb)
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	local packages=() hint=""
315
316	case "$ID" in
317		fedora)
318			install \
319				ninja-build \
320				pandoc \
321				perl-generators \
322				valgrind-devel \
323				python-docutils \
324				libnl3 \
325				libnl3-devel \
326				python3-Cython
327				;;
328		debian | ubuntu)
329			install \
330				debhelper \
331				dh-python \
332				python3-docutils
333			;;
334		*)
335			echo "irdma installation not supported under $ID" >&2
336			return 0
337			;;
338	esac
339
340	rm -rf "$GIT_REPOS/irdma-$IRDMA_VERSION"
341	rm -rf "$GIT_REPOS/rdma-core-$RDMA_CORE_VERSION"
342
343	curl -L -o- "$IRDMA_DRIVER" | tar -C "$GIT_REPOS" -xzf -
344
345	if ge "$kernel_ver" 6.10; then
346		patch --dir="$GIT_REPOS/irdma-$IRDMA_VERSION" -p1  \
347			< "$rootdir/test/common/config/pkgdep/patches/irdma/0001-ip_route_output.patch"
348	fi
349
350	[[ -e $GIT_REPOS/irdma-$IRDMA_VERSION/build.sh ]]
351
352	(
353		cd "$GIT_REPOS/irdma-$IRDMA_VERSION"
354		sed -i "s/IRDMA_FLUSH_DELAY_MS 1500/IRDMA_FLUSH_DELAY_MS 50/" \
355			"$GIT_REPOS/irdma-$IRDMA_VERSION/src/irdma/verbs.h"
356		"$GIT_REPOS/irdma-$IRDMA_VERSION/build.sh"
357	)
358
359	# Fetch and build the rdma-core irdma depends on
360	curl -L -o- "$RDMA_CORE" | tar -C "$GIT_REPOS" -xzf -
361	[[ -e $GIT_REPOS/irdma-$IRDMA_VERSION/libirdma-$RDMA_CORE_VERSION.patch ]]
362
363	patch --dir="$GIT_REPOS/rdma-core-$RDMA_CORE_VERSION" -p2 \
364		< "$GIT_REPOS/irdma-$IRDMA_VERSION/libirdma-$RDMA_CORE_VERSION.patch"
365
366	case "$ID" in
367		fedora)
368			[[ -e $GIT_REPOS/rdma-core-$RDMA_CORE_VERSION/redhat/rdma-core.spec ]]
369			# Note that paths and the name of the package are hardcoded into .spec, hence they need
370			# to stay like this.
371			mkdir -p "$HOME/rpmbuild/"{SOURCES,SPECS}
372			cp "$GIT_REPOS/rdma-core-$RDMA_CORE_VERSION/redhat/rdma-core.spec" "$HOME/rpmbuild/SPECS"
373
374			# Re-package the source
375			tar -czf "$HOME/rpmbuild/SOURCES/rdma-core-$RDMA_CORE_VERSION.tar.gz" \
376				-C "$GIT_REPOS" "rdma-core-$RDMA_CORE_VERSION"
377
378			# Build the rpms
379			(
380				cd "$HOME/rpmbuild/SPECS"
381				# Make sure stock ninja-build is used
382				PATH="/usr/bin:$PATH" rpmbuild -ba rdma-core.spec
383			)
384
385			packages=("$HOME/rpmbuild/RPMS/x86_64/"*.rpm)
386			hint="$package_manager install [--allowerasing] $HOME/rpmbuild/RPMS/x86_64/*.rpm"
387			;;
388		debian | ubuntu)
389			[[ -e $GIT_REPOS/rdma-core-$RDMA_CORE_VERSION/debian/control ]]
390
391			# Build the debs
392			(
393				cd "$GIT_REPOS/rdma-core-$RDMA_CORE_VERSION"
394				dh clean --with python3,systemd --builddirectory=build-deb
395				dh build --with systemd --builddirectory=build-deb
396				dh binary --with systemd --builddirectory=build-deb
397			)
398
399			packages=("$GIT_REPOS/"*.deb)
400			hint="dpkg --install $GIT_REPOS/*.deb"
401			;;
402	esac
403
404	((${#packages[@]} > 0)) || return 1
405
406	cat <<-EOF
407
408		INFO: rdma-core-$RDMA_CORE_VERSION was successfully built, following packages are
409		available for installation:
410
411		$(printf '  - %s\n' "${packages[@]##*/}")
412
413		Note that installing the above packages may raise conflicts with their
414		potentially newer versions already installed on the system. Dependent
415		packages may be uninstalled during the process as well. Please, run the
416		following command to finish the installation:
417
418		  $hint
419	EOF
420}
421
422function install_ice() {
423	rm -rf "$GIT_REPOS/ice-$ICE_VERSION"
424
425	curl -L -o- "$ICE_DRIVER" | tar -C "$GIT_REPOS" -xzf -
426
427	if ge "$kernel_ver" 6.10; then
428		patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1  \
429			< "$rootdir/test/common/config/pkgdep/patches/ice/0001-__assign_str.patch"
430		patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1  \
431			< "$rootdir/test/common/config/pkgdep/patches/ice/0001-napi_alloc_skb.patch"
432		patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1  \
433			< "$rootdir/test/common/config/pkgdep/patches/ice/0001-devlink_param.patch"
434		patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1  \
435			< "$rootdir/test/common/config/pkgdep/patches/ice/0001-xsk_buff_dma.patch"
436	fi
437
438	(
439		cd "$GIT_REPOS/ice-$ICE_VERSION/src"
440		sudo make -j"$(nproc)" install
441	)
442}
443
444function install_libbpf() {
445	local libbpf_version=v1.4.5
446
447	rm -rf "$GIT_REPOS/libbpf"
448	git clone "$GIT_REPO_LIBBPF" --branch "$libbpf_version" "$GIT_REPOS/libbpf"
449
450	make -C "$GIT_REPOS/libbpf/src" -j install
451	# install target doesn't include the kernel header files
452	make -C "$GIT_REPOS/libbpf/src" install_uapi_headers
453}
454
455function install_bpftrace() {
456	local deps_fedora=() deps_ubuntu=() bcc_rev
457
458	deps_fedora+=(cereal-devel)
459	deps_fedora+=(clang-devel)
460	deps_fedora+=(dwarves)
461	deps_fedora+=(gmock-devel)
462	deps_fedora+=(gtest-devel)
463	deps_fedora+=(llvm-devel)
464	deps_fedora+=(bcc-devel)
465	deps_fedora+=(libbpf-devel)
466
467	deps_ubuntu+=(libcereal-dev)
468	deps_ubuntu+=(libclang-dev)
469	deps_ubuntu+=(llvm-dev)
470	# Under jammy (2204) the libbpf version is not compatible with the version of
471	# bpftrace that we are using. Instead, we are going to provide our own build
472	# of libbpf, including both up-to-date bpf.h and linux/bpf.h.
473	[[ $VERSION_CODENAME == jammy ]] || deps_ubuntu+=(libbpf-dev)
474	deps_ubuntu+=(libbpfcc-dev)
475	deps_ubuntu+=(libelf-dev)
476	deps_ubuntu+=(binutils-dev)
477
478	local -n deps="deps_$ID"
479
480	((${#deps[@]} > 0)) || return 1
481
482	deps+=(clang cmake)
483
484	install "${deps[@]}"
485
486	if [[ $VERSION_CODENAME == jammy ]]; then
487		install_libbpf
488	fi
489
490	rm -rf $GIT_REPOS/bpftrace
491
492	git clone "$GIT_REPO_BPFTRACE" "$GIT_REPOS/bpftrace"
493	git -C $GIT_REPOS/bpftrace checkout $BPFTRACE_VERSION
494
495	mkdir -p "$GIT_REPOS/bpftrace/build"
496	cmake \
497		-DCMAKE_BUILD_TYPE=Release \
498		-DBUILD_TESTING=OFF \
499		-B "$GIT_REPOS/bpftrace/build" \
500		-S "$GIT_REPOS/bpftrace"
501
502	make -C $GIT_REPOS/bpftrace/build -j$(nproc)
503	sudo make -C $GIT_REPOS/bpftrace/build install
504}
505
506function install_doxygen() {
507	# Stable, 1.10 commit that works for our docs
508	local release=78422d3905e57acebf0374feefafa6578dbe86aa
509
510	rm -rf "$GIT_REPOS/doxygen"
511
512	git clone "$GIT_REPO_DOXYGEN" "$GIT_REPOS/doxygen"
513	git -C "$GIT_REPOS/doxygen" checkout "$release"
514
515	mkdir -p "$GIT_REPOS/doxygen/build"
516
517	cmake -G "Unix Makefiles" \
518		-B "$GIT_REPOS/doxygen/build" \
519		-S "$GIT_REPOS/doxygen"
520
521	# This build is quite heavy, so let's not go crazy with -j here
522	make -C "$GIT_REPOS/doxygen/build" -j$(($(nproc) / 2))
523	make -C "$GIT_REPOS/doxygen/build" install
524}
525
526function install_sources() {
527	if [[ $ID == centos ]] && (( VERSION_ID == 7 )); then
528		# install proper version of the git first
529		install_git
530	fi
531
532	IFS="," read -ra conf_env <<< "$CONF"
533	for conf in "${conf_env[@]}"; do
534		export "INSTALL_${conf^^}=true"
535	done
536
537	if [[ $OSID == freebsd ]]; then
538		jobs=$(($(sysctl -n hw.ncpu) * 2))
539	else
540		jobs=$(($(nproc) * 2))
541		sources+=(
542			install_irdma
543			install_libiscsi
544			install_nvmecli
545			install_nvmecli_plugin
546			install_qat
547			install_rocksdb
548			install_qemu
549			install_igb_uio
550			install_ice
551			install_bpftrace
552			install_doxygen
553		)
554		install_extra_pkgs
555	fi
556	sources+=(install_fio)
557	sources+=(install_flamegraph)
558	sources+=(install_vagrant)
559	sources+=(install_ittapi)
560
561	sudo mkdir -p /usr/{,local}/src
562	sudo mkdir -p "$GIT_REPOS"
563
564	for source in "${sources[@]}"; do
565		source_conf=${source^^}
566		if [[ ${!source_conf} == true ]]; then
567			"$source"
568		fi
569	done
570}
571
572GIT_VERSION=2.25.1
573IRDMA_VERSION=1.14.31
574ICE_VERSION=1.14.9
575
576BPFTRACE_VERSION=${BPFTRACE_VERSION:-f7bdfb44}
577VFIO_QEMU_BRANCH=${VFIO_QEMU_BRANCH:-vfio-user-p3.0}
578VANILLA_QEMU_BRANCH=${VANILLA_QEMU_BRANCH:-v8.0.0}
579
580: ${GIT_REPO_ROCKSDB=https://review.spdk.io/spdk/rocksdb}
581export GIT_REPO_ROCKSDB
582: ${GIT_REPO_FIO=https://github.com/axboe/fio.git}
583export GIT_REPO_FIO
584: ${GIT_REPO_FLAMEGRAPH=https://github.com/brendangregg/FlameGraph.git}
585export GIT_REPO_FLAMEGRAPH
586: ${GIT_REPO_QEMU=https://github.com/qemu/qemu}
587export GIT_REPO_QEMU
588: ${GIT_REPO_QEMU_VFIO=https://github.com/oracle/qemu}
589export GIT_REPO_QEMU_VFIO
590: ${GIT_REPO_LIBISCSI=https://github.com/sahlberg/libiscsi}
591export GIT_REPO_LIBISCSI
592: ${DRIVER_LOCATION_QAT=https://downloadmirror.intel.com/828487/QAT.L.4.26.0-00008.tar.gz}
593export DRIVER_LOCATION_QAT
594: ${GIT_REPO_GIT=https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz}
595export GIT_REPO_GIT
596: ${GIT_REPO_DPDK_KMODS=http://dpdk.org/git/dpdk-kmods}
597export GIT_REPO_DPDK_KMODS
598: ${IRDMA_DRIVER=https://downloadmirror.intel.com/823677/irdma-$IRDMA_VERSION.tgz}
599export IRDMA_DRIVER
600: ${ICE_DRIVER="https://sourceforge.net/projects/e1000/files/ice%20stable/$ICE_VERSION/ice-$ICE_VERSION.tar.gz"}
601export ICE_DRIVER
602: ${GIT_REPO_BCC=https://github.com/iovisor/bcc.git}
603export GIT_REPO_BCC
604: ${GIT_REPO_BPFTRACE=https://github.com/iovisor/bpftrace.git}
605export GIT_REPO_BPFTRACE
606: ${GIT_REPO_NVME_CLI=https://review.spdk.io/gerrit/spdk/nvme-cli}
607export GIT_REPO_NVME_CLI
608: ${GIT_REPO_ITTAPI=https://github.com/intel/ittapi.git}
609export GIT_REPO_ITTAPI
610: ${GIT_REPO_DOXYGEN="https://github.com/doxygen/doxygen"}
611export GIT_REPO_DOXYGEN
612: ${GIT_REPO_LIBBPF="https://github.com/libbpf/libbpf"}
613export GIT_REPO_LIBBPF
614
615GIT_REPOS=${GIT_REPOS:-$HOME}
616
617gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}
618if [[ -e /proc/sys/kernel/osrelease ]]; then
619	kernel_ver=$(< /proc/sys/kernel/osrelease)
620fi
621