forked from Mirrors/freeswitch
Add debian build option to keep pbuilder image config
Normally we override the config of each pbuilder/cowbuilder image when we update the image before using it for the build. Passing this option allows for using an existing cowbuilder image (assuming it's in the correct location) with some existing desirable configuration.
This commit is contained in:
parent
b199aaad78
commit
33b4eef596
13
debian/util.sh
vendored
13
debian/util.sh
vendored
@ -267,11 +267,13 @@ build_debs () {
|
|||||||
{
|
{
|
||||||
set -e
|
set -e
|
||||||
local OPTIND OPTARG debug_hook=false hookdir="" cow_build_opts=""
|
local OPTIND OPTARG debug_hook=false hookdir="" cow_build_opts=""
|
||||||
while getopts 'Bbd' o "$@"; do
|
local keep_pbuilder_config=false
|
||||||
|
while getopts 'Bbdk' o "$@"; do
|
||||||
case "$o" in
|
case "$o" in
|
||||||
B) cow_build_opts="--debbuildopts '-B'";;
|
B) cow_build_opts="--debbuildopts '-B'";;
|
||||||
b) cow_build_opts="--debbuildopts '-b'";;
|
b) cow_build_opts="--debbuildopts '-b'";;
|
||||||
d) debug_hook=true;;
|
d) debug_hook=true;;
|
||||||
|
k) keep_pbuilder_config=true;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $(($OPTIND-1))
|
shift $(($OPTIND-1))
|
||||||
@ -302,7 +304,9 @@ build_debs () {
|
|||||||
fi
|
fi
|
||||||
announce "Updating base $distro-$arch image..."
|
announce "Updating base $distro-$arch image..."
|
||||||
local x=30
|
local x=30
|
||||||
while ! cow --update --override-config; do
|
local opts="--override-config"
|
||||||
|
$keep_pbuilder_config && opts=""
|
||||||
|
while ! cow --update $opts; do
|
||||||
[ $x -lt 1 ] && break; sleep 120; x=$((x-1))
|
[ $x -lt 1 ] && break; sleep 120; x=$((x-1))
|
||||||
done
|
done
|
||||||
announce "Building $distro-$arch DEBs from $dsc..."
|
announce "Building $distro-$arch DEBs from $dsc..."
|
||||||
@ -324,7 +328,7 @@ build_all () {
|
|||||||
local OPTIND OPTARG
|
local OPTIND OPTARG
|
||||||
local orig_opts="" dsc_opts="" deb_opts="" modlist=""
|
local orig_opts="" dsc_opts="" deb_opts="" modlist=""
|
||||||
local archs="" distros="" orig="" depinst=false par=false
|
local archs="" distros="" orig="" depinst=false par=false
|
||||||
while getopts 'a:bc:df:ijl:m:no:s:u:v:z:' o "$@"; do
|
while getopts 'a:bc:df:ijkl:m:no:s:u:v:z:' o "$@"; do
|
||||||
case "$o" in
|
case "$o" in
|
||||||
a) archs="$archs $OPTARG";;
|
a) archs="$archs $OPTARG";;
|
||||||
b) orig_opts="$orig_opts -b";;
|
b) orig_opts="$orig_opts -b";;
|
||||||
@ -333,6 +337,7 @@ build_all () {
|
|||||||
f) dsc_opts="$dsc_opts -f$OPTARG";;
|
f) dsc_opts="$dsc_opts -f$OPTARG";;
|
||||||
i) depinst=true;;
|
i) depinst=true;;
|
||||||
j) par=true;;
|
j) par=true;;
|
||||||
|
k) deb_opts="$deb_opts -k";;
|
||||||
l) modlist="$OPTARG";;
|
l) modlist="$OPTARG";;
|
||||||
m) orig_opts="$orig_opts -m$OPTARG"; dsc_opts="$dsc_opts -m$OPTARG";;
|
m) orig_opts="$orig_opts -m$OPTARG"; dsc_opts="$dsc_opts -m$OPTARG";;
|
||||||
n) orig_opts="$orig_opts -n";;
|
n) orig_opts="$orig_opts -n";;
|
||||||
@ -416,6 +421,7 @@ commands:
|
|||||||
Build only modules listed in this file
|
Build only modules listed in this file
|
||||||
-i Auto install build deps on host system
|
-i Auto install build deps on host system
|
||||||
-j Build debs in parallel
|
-j Build debs in parallel
|
||||||
|
-k Don't override pbuilder image configurations
|
||||||
-l <modules>
|
-l <modules>
|
||||||
-m [ quicktest | non-dfsg ]
|
-m [ quicktest | non-dfsg ]
|
||||||
Choose custom list of modules to build
|
Choose custom list of modules to build
|
||||||
@ -436,6 +442,7 @@ commands:
|
|||||||
-B Binary architecture-dependent build
|
-B Binary architecture-dependent build
|
||||||
-b Binary-only build
|
-b Binary-only build
|
||||||
-d Enable cowbuilder debug hook
|
-d Enable cowbuilder debug hook
|
||||||
|
-k Don't override pbuilder image configurations
|
||||||
|
|
||||||
create-dbg-pkgs
|
create-dbg-pkgs
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user