xref: /spdk/test/common/config/pkgdep/git (revision 8a4b722644b813f499cc1ee74dfd5b8f50eedf94)
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_lcov() {
413	local lcov_version=v1.15 make=make
414
415	if [[ $OSID != freebsd ]]; then
416		install perl-IO-Compress || install perl-modules
417	else
418		make=gmake
419	fi
420
421	rm -rf /usr/src/lcov
422	git clone "$GIT_REPO_LCOV" --branch "$lcov_version" /usr/src/lcov
423	(cd /usr/src/lcov; "$make" install)
424}
425
426function install_libbpf() {
427	local libbpf_version=v1.4.5
428
429	rm -rf "$GIT_REPOS/libbpf"
430	git clone "$GIT_REPO_LIBBPF" --branch "$libbpf_version" "$GIT_REPOS/libbpf"
431
432	make -C "$GIT_REPOS/libbpf/src" -j install
433	# install target doesn't include the kernel header files
434	make -C "$GIT_REPOS/libbpf/src" install_uapi_headers
435}
436
437function install_bpftrace() {
438	local deps_fedora=() deps_ubuntu=() bcc_rev
439
440	deps_fedora+=(cereal-devel)
441	deps_fedora+=(clang-devel)
442	deps_fedora+=(dwarves)
443	deps_fedora+=(gmock-devel)
444	deps_fedora+=(gtest-devel)
445	deps_fedora+=(llvm-devel)
446	deps_fedora+=(bcc-devel)
447	deps_fedora+=(libbpf-devel)
448
449	deps_ubuntu+=(libcereal-dev)
450	deps_ubuntu+=(libclang-dev)
451	deps_ubuntu+=(llvm-dev)
452	# Under jammy (2204) the libbpf version is not compatible with the version of
453	# bpftrace that we are using. Instead, we are going to provide our own build
454	# of libbpf, including both up-to-date bpf.h and linux/bpf.h.
455	[[ $VERSION_CODENAME == jammy ]] || deps_ubuntu+=(libbpf-dev)
456	deps_ubuntu+=(libbpfcc-dev)
457	deps_ubuntu+=(libelf-dev)
458	deps_ubuntu+=(binutils-dev)
459
460	local -n deps="deps_$ID"
461
462	((${#deps[@]} > 0)) || return 1
463
464	deps+=(clang cmake)
465
466	install "${deps[@]}"
467
468	if [[ $VERSION_CODENAME == jammy ]]; then
469		install_libbpf
470	fi
471
472	rm -rf $GIT_REPOS/bpftrace
473
474	git clone "$GIT_REPO_BPFTRACE" "$GIT_REPOS/bpftrace"
475	git -C $GIT_REPOS/bpftrace checkout $BPFTRACE_VERSION
476
477	mkdir -p "$GIT_REPOS/bpftrace/build"
478	cmake \
479		-DCMAKE_BUILD_TYPE=Release \
480		-DBUILD_TESTING=OFF \
481		-B "$GIT_REPOS/bpftrace/build" \
482		-S "$GIT_REPOS/bpftrace"
483
484	make -C $GIT_REPOS/bpftrace/build -j$(nproc)
485	sudo make -C $GIT_REPOS/bpftrace/build install
486}
487
488function install_doxygen() {
489	# Stable, 1.10 commit that works for our docs
490	local release=78422d3905e57acebf0374feefafa6578dbe86aa
491
492	rm -rf "$GIT_REPOS/doxygen"
493
494	git clone "$GIT_REPO_DOXYGEN" "$GIT_REPOS/doxygen"
495	git -C "$GIT_REPOS/doxygen" checkout "$release"
496
497	mkdir -p "$GIT_REPOS/doxygen/build"
498
499	cmake -G "Unix Makefiles" \
500		-B "$GIT_REPOS/doxygen/build" \
501		-S "$GIT_REPOS/doxygen"
502
503	# This build is quite heavy, so let's not go crazy with -j here
504	make -C "$GIT_REPOS/doxygen/build" -j$(($(nproc) / 2))
505	make -C "$GIT_REPOS/doxygen/build" install
506}
507
508function install_sources() {
509	if [[ $ID == centos ]] && (( VERSION_ID == 7 )); then
510		# install proper version of the git first
511		install_git
512	fi
513
514	IFS="," read -ra conf_env <<< "$CONF"
515	for conf in "${conf_env[@]}"; do
516		export "INSTALL_${conf^^}=true"
517	done
518
519	if [[ $OSID == freebsd ]]; then
520		jobs=$(($(sysctl -n hw.ncpu) * 2))
521	else
522		jobs=$(($(nproc) * 2))
523		sources+=(
524			install_irdma
525			install_libiscsi
526			install_nvmecli
527			install_nvmecli_plugin
528			install_qat
529			install_rocksdb
530			install_qemu
531			install_igb_uio
532			install_ice
533			install_bpftrace
534			install_doxygen
535		)
536		install_extra_pkgs
537	fi
538	sources+=(install_fio)
539	sources+=(install_flamegraph)
540	sources+=(install_lcov)
541	sources+=(install_vagrant)
542	sources+=(install_ittapi)
543
544	sudo mkdir -p /usr/{,local}/src
545	sudo mkdir -p "$GIT_REPOS"
546
547	for source in "${sources[@]}"; do
548		source_conf=${source^^}
549		if [[ ${!source_conf} == true ]]; then
550			"$source"
551		fi
552	done
553}
554
555GIT_VERSION=2.25.1
556IRDMA_VERSION=1.14.31
557ICE_VERSION=1.14.9
558
559BPFTRACE_VERSION=${BPFTRACE_VERSION:-f7bdfb44}
560VFIO_QEMU_BRANCH=${VFIO_QEMU_BRANCH:-vfio-user-p3.0}
561VANILLA_QEMU_BRANCH=${VANILLA_QEMU_BRANCH:-v8.0.0}
562
563: ${GIT_REPO_ROCKSDB=https://review.spdk.io/spdk/rocksdb}
564export GIT_REPO_ROCKSDB
565: ${GIT_REPO_FIO=https://github.com/axboe/fio.git}
566export GIT_REPO_FIO
567: ${GIT_REPO_FLAMEGRAPH=https://github.com/brendangregg/FlameGraph.git}
568export GIT_REPO_FLAMEGRAPH
569: ${GIT_REPO_QEMU=https://github.com/qemu/qemu}
570export GIT_REPO_QEMU
571: ${GIT_REPO_QEMU_VFIO=https://github.com/oracle/qemu}
572export GIT_REPO_QEMU_VFIO
573: ${GIT_REPO_LIBISCSI=https://github.com/sahlberg/libiscsi}
574export GIT_REPO_LIBISCSI
575: ${DRIVER_LOCATION_QAT=https://downloadmirror.intel.com/828487/QAT.L.4.26.0-00008.tar.gz}
576export DRIVER_LOCATION_QAT
577: ${GIT_REPO_GIT=https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz}
578export GIT_REPO_GIT
579: ${GIT_REPO_DPDK_KMODS=http://dpdk.org/git/dpdk-kmods}
580export GIT_REPO_DPDK_KMODS
581: ${IRDMA_DRIVER=https://downloadmirror.intel.com/823677/irdma-$IRDMA_VERSION.tgz}
582export IRDMA_DRIVER
583: ${ICE_DRIVER="https://sourceforge.net/projects/e1000/files/ice%20stable/$ICE_VERSION/ice-$ICE_VERSION.tar.gz"}
584export ICE_DRIVER
585: ${GIT_REPO_LCOV=https://github.com/linux-test-project/lcov}
586export GIT_REPO_LCOV
587: ${GIT_REPO_BCC=https://github.com/iovisor/bcc.git}
588export GIT_REPO_BCC
589: ${GIT_REPO_BPFTRACE=https://github.com/iovisor/bpftrace.git}
590export GIT_REPO_BPFTRACE
591: ${GIT_REPO_NVME_CLI=https://review.spdk.io/gerrit/spdk/nvme-cli}
592export GIT_REPO_NVME_CLI
593: ${GIT_REPO_ITTAPI=https://github.com/intel/ittapi.git}
594export GIT_REPO_ITTAPI
595: ${GIT_REPO_DOXYGEN="https://github.com/doxygen/doxygen"}
596export GIT_REPO_DOXYGEN
597: ${GIT_REPO_LIBBPF="https://github.com/libbpf/libbpf"}
598export GIT_REPO_LIBBPF
599
600GIT_REPOS=${GIT_REPOS:-$HOME}
601
602gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}
603if [[ -e /proc/sys/kernel/osrelease ]]; then
604	kernel_ver=$(< /proc/sys/kernel/osrelease)
605fi
606