diff --git a/debian/util.sh b/debian/util.sh index 2a8bbb26d7..6c0abc2dfb 100755 --- a/debian/util.sh +++ b/debian/util.sh @@ -275,8 +275,9 @@ build_debs () { { set -e local OPTIND OPTARG debug_hook=false hookdir="" cow_build_opts="" - local keep_pbuilder_config=false keyring="" custom_keyring="" - local use_custom_sources=false + local keep_pbuilder_config=false keyring="" custom_keyring="/tmp/fs.asc" + local use_custom_sources=true + local custom_sources_file="/tmp/fs.sources.list" while getopts 'BbdK:kT:t' o "$@"; do case "$o" in B) cow_build_opts="--debbuildopts '-B'";; @@ -284,11 +285,48 @@ build_debs () { d) debug_hook=true;; k) keep_pbuilder_config=true;; K) custom_keyring="$OPTARG";; - t) use_custom_sources=true; custom_sources_file="/etc/apt/sources.list";; - T) use_custom_sources=true; custom_sources_file="$OPTARG";; + t) custom_sources_file="/etc/apt/sources.list";; + T) custom_sources_file="$OPTARG";; esac done shift $(($OPTIND-1)) + if [ "$custom_sources_file" == "" ]; then + # Caller has explicitly set the custom sources file to empty string. They must intend to not use additional mirrors. + use_custom_sources=false + fi + if [ "$custom_source_file" == "/tmp/fs.sources.list" && ! -e "/tmp/fs.sources.list" ]; then + echo "deb http://files.freeswitch.org/repo/deb/debian/ jessie main" >> "/tmp/fs.sources.list" + fi + if [ "$custom_keyring" == "/tmp/fs.asc" && ! -r "/tmp/fs.asc" ]; then + cat << EOF > "/tmp/fs.asc" +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.12 (GNU/Linux) + +mQGiBE8jEfIRBAC+Cca0fPQxhyhn0NMsPaMQJgTvqhWb5/f4Mel++kosmUQQ4fJq +4U9NFvpfNyLp5MoHpnlDfAb+e57B2sr47NOJLTh83yQIAnvU+8O0Q4kvMaiiesX5 +CisApLBs6Vx28y7VWmLsY3vWu8mC7M+PORKfpBV8DWy/7569wQPx2SCsIwCgzv2T +8YsnYsSVRrrmh46J1o4/ngsD/13ETX4ws/wNN+82RdqUxu7fjc0fNbUAb6XYddAb +1hr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"$distro" ] || [ "$distro" = "auto" ]; then if ! (echo "$dsc" | grep -e '-[0-9]*~[a-z]*+[0-9]*'); then