Commit 609e5553 authored by Olav Morken's avatar Olav Morken
Browse files

Simplify configuration of Apt source repositories

Instead of trying to add the "deb-src" entries to sources.list for the
current distro, we can look at the existing file to determine the
lines that we should add.

This is simpler and more reliable when Debian restructures their
repositories.
parent f36558ee
......@@ -40,19 +40,12 @@ version="1.9.0"
revision="2${lsb_release_name}~uninett"
cat >> /etc/apt/sources.list << EOF
deb-src http://cdn-fastly.deb.debian.org/debian ${lsb_release_name} main
deb-src http://cdn-fastly.deb.debian.org/debian ${lsb_release_name}-updates main
deb-src http://security.debian.org ${lsb_release_name}-security main
EOF
if test ${lsb_release_name} != "bullseye"
then
sed -i "s/${lsb_release_name}-security/${lsb_release_name}\/updates/" /etc/apt/sources.list
fi
# Add source repositories. We will need them to download the original source
# package for radsecproxy.
sed -n 's@^deb @deb-src @p' /etc/apt/sources.list > /etc/apt/sources.list.d/sources.list
apt-get update
RADSECPROXY_URL="https://github.com/${package}/${package}"
RADSECPROXY_SRCURL="${RADSECPROXY_URL}/releases/download/${version}/${package}-${version}.tar.gz"
curl --silent -o "${package}"_"${version}".orig.tar.gz -L "${RADSECPROXY_SRCURL}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment