-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprep-source
executable file
·47 lines (43 loc) · 1.97 KB
/
prep-source
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
#!/bin/bash
SCRIPT_DIR="$(cd "$(dirname "$0")" || exit ; pwd -P)"
# shellcheck source=/dev/null
source "${SCRIPT_DIR}/common-functions.sh"
cd "${SCRIPT_DIR}" || die "Can't cd to ${SCRIPT_DIR}! This is weird."
if [ -f /etc/redhat-release ]; then
log_info "Trying redhat commands"
yum -y makecache
yum -y groupinstall "Development Tools"
yum -y install \
perl-IPC-Run perl-IPC-Cmd perl-IPC-System-Simple perl-Digest-SHA \
openssl-devel zlib-devel pcre2-devel \
systemd-devel autoconf automake binutils bison flex \
gcc gcc-c++ gettext libtool make patch pkgconfig \
redhat-rpm-config rpm-build rpm-sign byacc cscope ctags \
diffstat doxygen elfutils gcc-gfortran git \
intltool patchutils subversion swig systemtap python3-psutil \
# blank line above is intentional
else
log_info "Trying debian/ubuntu commands"
DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND
/bin/cp -a /etc/apt/sources.list /etc/apt/sources.list.before
if [ -n "${RUNNING_IN_DOCKER}" ]; then
echo "deb-src http://deb.debian.org/debian/ bookworm main" >> /etc/apt/sources.list
echo "deb-src http://security.debian.org/debian-security bookworm/updates main" >> /etc/apt/sources.list
fi
/bin/sed -i "s/^#.*deb-src/deb-src/g" /etc/apt/sources.list
/usr/bin/apt-get -y update
/usr/bin/apt-get -y install build-essential git zlib1g-dev python3-psutil python-is-python3 procps bc
/usr/bin/apt-get -y build-dep haproxy
/usr/bin/apt-get -y build-dep openssl
# /usr/bin/apt-get -y dist-upgrade
fi
rm -rf old.git-quictls git-quictls > /dev/null
echo "Fresh clone of quictls"
git clone -v https://github.com/quictls/openssl.git git-quictls 2>&1
echo "Fresh clone of haproxy"
git clone -v https://git.haproxy.org/git/haproxy-3.0.git git-haproxy-3.0 2>&1
rm -rf git-haproxy-2.9 git-haproxy-2.8 git-haproxy-2.7 git-haproxy-master old.git-haproxy-2.8 old.git-haproxy-2.7 old.git-haproxy-2.9 old-git-haproxy-master > /dev/null
# force the build to happen the first time
touch force
true