mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
buildserver: support HTTPS Debian mirrors
The ever troublesome gpjenkins box needs to use HTTPS mirrors. Plus it improves the security of the buildserver, since there have been CVEs that HTTPS would protect against: https://www.debian.org/security/2016/dsa-3733
This commit is contained in:
parent
64ea4caac1
commit
580a9eb058
2 changed files with 8 additions and 3 deletions
|
@ -6,14 +6,19 @@ set -x
|
|||
|
||||
debian_mirror=$1
|
||||
|
||||
sed -i "s,http://ftp.uk.debian.org/debian/,${debian_mirror},g" /etc/apt/sources.list
|
||||
|
||||
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
|
||||
|
||||
if echo $debian_mirror | grep '^https' 2>&1 > /dev/null; then
|
||||
apt-get -y update
|
||||
apt-get -y install apt-transport-https
|
||||
fi
|
||||
|
||||
sed -i "s,http://ftp.uk.debian.org/debian/,${debian_mirror},g" /etc/apt/sources.list
|
||||
|
||||
if grep --quiet jessie /etc/apt/sources.list; then
|
||||
echo "deb $debian_mirror jessie-backports main" > /etc/apt/sources.list.d/backports.list
|
||||
echo "deb $debian_mirror testing main" > /etc/apt/sources.list.d/testing.list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue