-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathci-setup-src
executable file
·85 lines (77 loc) · 2.25 KB
/
ci-setup-src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/sh
set -e
if [ -f ./autogen.sh ]; then
echo "./autogen.sh"
./autogen.sh
fi
if [ -f ./configure ]; then
# workaround bug in pacemaker test suite
case "${project}" in
pacemaker)
echo "./configure $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH"
./configure $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH
;;
pcs)
sleeptimer=$(( $$ % 240 ))
echo "Random sleep: $sleeptimer"
sleep $sleeptimer
pcspython=python3
pcspipinstall=no
case "${NODE_NAME}" in
rhel-9*)
if [ "$target" != "pcs-0.11" ]; then
pcspython=python3.12
pcspipinstall=yes
fi
;;
esac
rm -rf .venv
$pcspython -m venv --system-site-packages .venv
. .venv/bin/activate
export PATH="$(pwd)/.venv"/bin/:$PATH
case "${NODE_NAME}" in
debian*|ubuntu*)
localbuild=""
;;
rhel-8*)
python3 -m pip install concurrencytest
localbuild=--enable-local-build
;;
rhel-9*)
localbuild=--enable-local-build
if [ "$pcspipinstall" = "yes" ]; then
python3 -m pip install pyparsing setuptools-scm six
localbuild="$localbuild --with-python-version=3.12 --enable-ci-rpm-workarounds"
fi
;;
*)
localbuild=--enable-local-build
;;
esac
echo "./configure --enable-destructive-tests --enable-parallel-tests $localbuild $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH"
./configure --enable-destructive-tests --enable-parallel-tests $localbuild $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH
;;
*)
installpath=/srv/${project}/origin/${target}
case "${project}" in
kronosnet|corosync)
if [ -n "$RUSTBINDINGS" ] && [ "$RUSTBINDINGS" = yes ]; then
extraopts="--enable-rust-bindings"
fi
;;
sbd)
installpath=${installpath}-pacemaker-${pacemakerver}/
;;
booth)
installpath=${installpath}-pacemaker-${pacemakerver}/
extraopts="--with-ocfdir=$installpath/lib/ocf"
;;
*)
installpath=${installpath}/
;;
esac
echo "./configure --prefix=$installpath --exec-prefix=$installpath $extraopts $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH"
./configure --prefix=$installpath --exec-prefix=$installpath $extraopts $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH
;;
esac
fi