mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-19 21:30:10 +01:00
daa5ad152e
fdroid/sdkmanager provides a root of trust to verify all the packages it downloads, so it fully replaces what makebuildserver was doing. closes #927
74 lines
1.6 KiB
Bash
74 lines
1.6 KiB
Bash
#!/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
|
|
apt-get install ca-certificates
|
|
fi
|
|
|
|
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
|
|
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
|
|
git-svn
|
|
gnupg
|
|
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
|