Select Git revision
make.sh 1.85 KiB
#!/bin/bash
set -x
# Nastaveni promennych
export DEBIAN_FRONTEND=noninteractive
export DEBEMAIL="Pavel Vondruska <vondruska@cesnet.cz>"
# Nacteni promennych o bezicim systemu vcetne verzi
. /etc/os-release
# Od Debian 11 Bullseye ma debian-security trochu jinou cestu, abychom mohli pouzit heredoc, rozskocime si pres funkci
function get_debian_security() {
if [ "${VERSION_ID}" -lt "11" ]; then echo "${VERSION_CODENAME}/updates"; else echo "${VERSION_CODENAME}-security"; fi
}
# Vygenerovani sources.list podle verze Debianu
cat > /etc/apt/sources.list << EOSOURCES
deb http://ftp.zcu.cz/pub/linux/debian ${VERSION_CODENAME} main contrib non-free
deb http://ftp.zcu.cz/pub/linux/debian ${VERSION_CODENAME}-updates main contrib non-free
deb http://ftp.zcu.cz/pub/linux/debian-security $(get_debian_security) main contrib non-free
deb-src http://ftp.zcu.cz/pub/linux/debian ${VERSION_CODENAME} main contrib non-free
deb-src http://ftp.zcu.cz/pub/linux/debian ${VERSION_CODENAME}-updates main contrib non-free
deb-src http://ftp.zcu.cz/pub/linux/debian-security $(get_debian_security) main contrib non-free
EOSOURCES
# Instalace buildovacich veci a zavislosti
apt update -qqq
apt install -yqqq git devscripts build-essential wget
dget https://deb.debian.org/debian/pool/main/o/open-vm-tools/open-vm-tools_10.3.10-1+deb10u2.dsc
cd open-vm-tools-10.3.10
mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --yes' debian/control
wget https://salsa.debian.org/vmware-packaging-team/pkg-open-vm-tools/-/raw/67b16ff62228304dfe96d33a0ba663c2e8d3167d/debian/patches/1125-Properly-check-authorization-on-incoming-guestOps-re.patch -O debian/patches/1125-Properly-check-authorization-on-incoming-guestOps-re.patch
echo '1125-Properly-check-authorization-on-incoming-guestOps-re.patch' >> debian/patches/series
dpkg-buildpackage -uc -us -b
cd ..
mkdir build
mv *.deb build/