1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-19 21:30:10 +01:00
fdroidserver/buildserver/provision-apt-get-install

74 lines
1.6 KiB
Plaintext
Raw Normal View History

#!/bin/bash
echo $0
set -e
set -x
debian_mirror=$1
export DEBIAN_FRONTEND=noninteractive
printf 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";\n' \
> /etc/apt/apt.conf.d/99no-install-recommends
printf 'APT::Acquire::Retries "20";\n' \
> /etc/apt/apt.conf.d/99acquire-retries
cat <<EOF > /etc/apt/apt.conf.d/99no-auto-updates
APT::Periodic::Enable "0";
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";
EOF
printf 'APT::Get::Assume-Yes "true";\n' \
> /etc/apt/apt.conf.d/99assumeyes
cat <<EOF > /etc/apt/apt.conf.d/99quiet
Dpkg::Use-Pty "0";
quiet "1";
EOF
cat <<EOF > /etc/apt/apt.conf.d/99confdef
Dpkg::Options { "--force-confdef"; };
EOF
if echo $debian_mirror | grep '^https' 2>&1 > /dev/null; then
apt-get update || apt-get update
2021-10-17 22:58:12 +02:00
apt-get install ca-certificates
fi
2018-11-27 14:07:19 +01:00
cat << EOF > /etc/apt/sources.list
deb ${debian_mirror} bullseye main
deb https://security.debian.org/debian-security bullseye-security main
deb ${debian_mirror} bullseye-updates main
2018-11-27 14:07:19 +01:00
EOF
echo "deb ${debian_mirror} bullseye-backports main" > /etc/apt/sources.list.d/backports.list
apt-get update || apt-get update
apt-get upgrade --download-only
apt-get upgrade
# again after upgrade in case of keyring changes
apt-get update || apt-get update
packages="
apksigner
default-jdk-headless
default-jre-headless
dexdump
fdroidserver
2022-10-11 12:09:05 +02:00
git-svn
gnupg
2022-10-11 12:09:05 +02:00
mercurial
patch
rsync
sdkmanager
sudo
"
apt-get install $packages --download-only
apt-get install $packages
apt-get purge fdroidserver
highestjava=`update-java-alternatives --list | sort -n | tail -1 | cut -d ' ' -f 1`
update-java-alternatives --set $highestjava