2012-02-23 20:03:09 -05:00
|
|
|
#!/bin/bash
|
|
|
|
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
|
|
|
|
##### Author: Travis Cross <tc@traviscross.com>
|
|
|
|
|
2012-05-10 23:14:40 -04:00
|
|
|
set -e
|
|
|
|
|
2012-05-05 19:25:18 -04:00
|
|
|
ddir="."
|
|
|
|
[ -n "${0%/*}" ] && ddir="${0%/*}"
|
2012-05-28 08:11:41 -04:00
|
|
|
cd $ddir/../
|
|
|
|
|
|
|
|
#### lib
|
2012-05-05 16:59:50 -04:00
|
|
|
|
2012-05-05 16:59:09 -04:00
|
|
|
err () {
|
|
|
|
echo "$0 error: $1" >&2
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2012-05-27 02:54:31 -04:00
|
|
|
announce () {
|
|
|
|
cat >&2 <<EOF
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
## $1
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
2012-05-05 16:59:09 -04:00
|
|
|
xread () {
|
|
|
|
local xIFS="$IFS"
|
|
|
|
IFS=''
|
|
|
|
read $@
|
|
|
|
local ret=$?
|
|
|
|
IFS="$xIFS"
|
|
|
|
return $ret
|
|
|
|
}
|
|
|
|
|
2012-05-28 08:11:41 -04:00
|
|
|
mk_dver () { echo "$1" | sed -e 's/-/~/g'; }
|
|
|
|
mk_uver () { echo "$1" | sed -e 's/-.*$//' -e 's/~/-/'; }
|
|
|
|
dsc_source () { dpkg-parsechangelog | grep '^Source:' | awk '{print $2}'; }
|
|
|
|
dsc_ver () { dpkg-parsechangelog | grep '^Version:' | awk '{print $2}'; }
|
|
|
|
up_ver () { mk_uver "$(dsc_ver)"; }
|
|
|
|
dsc_base () { echo "$(dsc_source)_$(dsc_ver)"; }
|
|
|
|
up_base () { echo "$(dsc_source)-$(up_ver)"; }
|
|
|
|
|
|
|
|
find_distro () {
|
|
|
|
case "$1" in
|
|
|
|
experimental) echo "sid";;
|
|
|
|
unstable) echo "sid";;
|
2021-09-21 15:49:04 -04:00
|
|
|
testing) echo "bullseye";;
|
|
|
|
stable) echo "buster";;
|
|
|
|
oldstable) echo "stretch";;
|
2012-05-28 08:11:41 -04:00
|
|
|
*) echo "$1";;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
find_suite () {
|
|
|
|
case "$1" in
|
|
|
|
sid) echo "unstable";;
|
2021-09-21 15:49:04 -04:00
|
|
|
bullseye) echo "testing";;
|
|
|
|
buster) echo "stable";;
|
|
|
|
stretch) echo "oldstable";;
|
2012-05-28 08:11:41 -04:00
|
|
|
*) echo "$1";;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
#### debian/rules helpers
|
|
|
|
|
2012-02-23 20:03:09 -05:00
|
|
|
create_dbg_pkgs () {
|
2012-05-05 16:59:50 -04:00
|
|
|
for x in $ddir/*; do
|
2012-02-23 20:03:09 -05:00
|
|
|
test ! -d $x && continue
|
|
|
|
test "$x" = "tmp" -o "$x" = "source" && continue
|
|
|
|
test ! "$x" = "${x%-dbg}" && continue
|
|
|
|
test ! -d $x/usr/lib/debug && continue
|
|
|
|
mkdir -p $x-dbg/usr/lib
|
|
|
|
mv $x/usr/lib/debug $x-dbg/usr/lib/
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2012-05-10 23:13:39 -04:00
|
|
|
cwget () {
|
|
|
|
local url="$1" f="${1##*/}"
|
|
|
|
echo "fetching: $url to $f" >&2
|
|
|
|
if [ -n "$FS_FILES_DIR" ]; then
|
|
|
|
if ! [ -s "$FS_FILES_DIR/$f" ]; then
|
|
|
|
(cd $FS_FILES_DIR && wget -N "$url")
|
|
|
|
fi
|
|
|
|
cp -a $FS_FILES_DIR/$f .
|
|
|
|
else
|
|
|
|
wget -N "$url"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
getlib () {
|
2012-05-28 08:11:41 -04:00
|
|
|
local url="$1" f="${1##*/}"
|
|
|
|
cwget "$url"
|
|
|
|
tar -xv --no-same-owner --no-same-permissions -f "$f"
|
|
|
|
rm -f "$f" && mkdir -p $f && touch $f/.download-stamp
|
2012-05-10 23:13:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
getlibs () {
|
|
|
|
# get pinned libraries
|
2014-07-25 08:31:13 -04:00
|
|
|
getlib http://files.freeswitch.org/downloads/libs/sphinxbase-0.8.tar.gz
|
|
|
|
getlib http://files.freeswitch.org/downloads/libs/pocketsphinx-0.8.tar.gz
|
2012-05-28 08:11:41 -04:00
|
|
|
getlib http://files.freeswitch.org/downloads/libs/communicator_semi_6000_20080321.tar.gz
|
2018-09-19 19:03:13 -04:00
|
|
|
#getlib http://download.zeromq.org/zeromq-2.1.9.tar.gz \
|
|
|
|
# || getlib http://download.zeromq.org/historic/zeromq-2.1.9.tar.gz
|
2017-05-02 09:55:45 -04:00
|
|
|
getlib http://files.freeswitch.org/downloads/libs/freeradius-client-1.1.7.tar.gz
|
2017-07-06 18:21:10 -04:00
|
|
|
#getlib http://files.freeswitch.org/downloads/libs/v8-3.24.14.tar.bz2
|
2012-05-10 23:13:39 -04:00
|
|
|
}
|
|
|
|
|
2012-05-28 08:11:41 -04:00
|
|
|
check_repo_clean () {
|
|
|
|
git diff-index --quiet --cached HEAD \
|
|
|
|
|| err "uncommitted changes present"
|
|
|
|
git diff-files --quiet \
|
|
|
|
|| err "unclean working tree"
|
|
|
|
git diff-index --quiet HEAD \
|
|
|
|
|| err "unclean repository"
|
|
|
|
! git ls-files --other --error-unmatch . >/dev/null 2>&1 \
|
|
|
|
|| err "untracked files or build products present"
|
2012-05-10 23:13:39 -04:00
|
|
|
}
|
|
|
|
|
2012-06-22 12:10:47 -04:00
|
|
|
get_last_release_ver () {
|
2014-03-19 15:08:17 -04:00
|
|
|
grep -m1 -e '^AC_INIT' configure.ac \
|
2012-06-22 12:10:47 -04:00
|
|
|
| cut -d, -f2 \
|
|
|
|
| sed -e 's/\[//' -e 's/\]//' -e 's/ //g'
|
|
|
|
}
|
|
|
|
|
|
|
|
get_nightly_version () {
|
|
|
|
local commit="$(git rev-list -n1 --abbrev=10 --abbrev-commit HEAD)"
|
2012-09-23 03:47:57 -04:00
|
|
|
echo "$(get_last_release_ver)+git~$(date -u '+%Y%m%dT%H%M%SZ')~$commit"
|
2012-06-22 12:10:47 -04:00
|
|
|
}
|
|
|
|
|
2012-09-21 14:27:13 -04:00
|
|
|
get_nightly_revision_human () {
|
|
|
|
echo "git $(git rev-list -n1 --abbrev=7 --abbrev-commit HEAD) $(date -u '+%Y-%m-%d %H:%M:%SZ')"
|
|
|
|
}
|
|
|
|
|
2012-05-11 00:48:21 -04:00
|
|
|
create_orig () {
|
2012-05-28 13:03:23 -04:00
|
|
|
{
|
2012-05-28 13:42:51 -04:00
|
|
|
set -e
|
2012-05-28 13:03:23 -04:00
|
|
|
local OPTIND OPTARG
|
2015-10-08 17:02:05 -04:00
|
|
|
local uver="" hrev="" bundle_deps=true modules_list="" zl=9e
|
2013-05-28 17:58:36 -04:00
|
|
|
while getopts 'bm:nv:z:' o "$@"; do
|
2012-05-28 13:03:23 -04:00
|
|
|
case "$o" in
|
2013-05-28 17:58:36 -04:00
|
|
|
m) modules_list="$OPTARG";;
|
2012-05-28 13:03:23 -04:00
|
|
|
n) uver="nightly";;
|
|
|
|
v) uver="$OPTARG";;
|
|
|
|
z) zl="$OPTARG";;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
shift $(($OPTIND-1))
|
2012-09-21 14:27:13 -04:00
|
|
|
if [ -z "$uver" ] || [ "$uver" = "nightly" ]; then
|
|
|
|
uver="$(get_nightly_version)"
|
|
|
|
hrev="$(get_nightly_revision_human)"
|
|
|
|
fi
|
2012-05-28 13:03:23 -04:00
|
|
|
local treeish="$1" dver="$(mk_dver "$uver")"
|
2018-10-08 17:36:12 -04:00
|
|
|
local orig="../freeswitch_$dver~$(lsb_release -sc).orig.tar.xz"
|
2012-05-28 13:03:23 -04:00
|
|
|
[ -n "$treeish" ] || treeish="HEAD"
|
|
|
|
check_repo_clean
|
|
|
|
git reset --hard "$treeish"
|
|
|
|
mv .gitattributes .gitattributes.orig
|
2013-05-28 17:58:36 -04:00
|
|
|
local -a args=(-e '\bdebian-ignore\b')
|
|
|
|
test "$modules_list" = "non-dfsg" || args+=(-e '\bdfsg-nonfree\b')
|
|
|
|
grep .gitattributes.orig "${args[@]}" \
|
2012-05-28 13:03:23 -04:00
|
|
|
| while xread l; do
|
|
|
|
echo "$l export-ignore" >> .gitattributes
|
|
|
|
done
|
|
|
|
if $bundle_deps; then
|
|
|
|
(cd libs && getlibs)
|
|
|
|
git add -f libs
|
|
|
|
fi
|
2014-03-19 15:08:17 -04:00
|
|
|
./build/set-fs-version.sh "$uver" "$hrev" && git add configure.ac
|
2012-06-22 12:11:47 -04:00
|
|
|
echo "$uver" > .version && git add -f .version
|
2012-05-28 13:03:23 -04:00
|
|
|
git commit --allow-empty -m "nightly v$uver"
|
|
|
|
git archive -v \
|
|
|
|
--worktree-attributes \
|
|
|
|
--format=tar \
|
|
|
|
--prefix=freeswitch-$uver/ \
|
|
|
|
HEAD \
|
|
|
|
| xz -c -${zl}v > $orig
|
|
|
|
mv .gitattributes.orig .gitattributes
|
|
|
|
git reset --hard HEAD^ && git clean -fdx
|
|
|
|
} 1>&2
|
2012-05-28 08:11:41 -04:00
|
|
|
echo $orig
|
2012-05-11 00:48:21 -04:00
|
|
|
}
|
|
|
|
|
2012-05-28 13:26:32 -04:00
|
|
|
set_modules_quicktest () {
|
|
|
|
cat > debian/modules.conf <<EOF
|
|
|
|
applications/mod_commands
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
2012-05-11 00:48:21 -04:00
|
|
|
create_dsc () {
|
2012-05-28 13:03:23 -04:00
|
|
|
{
|
2012-05-28 13:42:51 -04:00
|
|
|
set -e
|
2014-01-20 23:40:00 -05:00
|
|
|
local OPTIND OPTARG modules_conf="" modules_list="" speed="normal" suite_postfix="" suite_postfix_p=false zl=9
|
2014-10-08 15:43:29 -04:00
|
|
|
local modules_add=""
|
2019-07-29 19:29:27 -04:00
|
|
|
while getopts 'a:f:m:p:s:u:z:' o "$@"; do
|
2012-05-28 13:26:32 -04:00
|
|
|
case "$o" in
|
2019-07-29 19:29:27 -04:00
|
|
|
a) avoid_mods_arch="$OPTARG";;
|
2012-06-25 03:09:20 -04:00
|
|
|
f) modules_conf="$OPTARG";;
|
2012-05-28 13:26:32 -04:00
|
|
|
m) modules_list="$OPTARG";;
|
2014-10-08 15:43:29 -04:00
|
|
|
p) modules_add="$modules_add $OPTARG";;
|
2012-05-28 15:15:20 -04:00
|
|
|
s) speed="$OPTARG";;
|
2016-05-10 17:50:41 -04:00
|
|
|
u) suite_postfix="$OPTARG"; suite_postfix_p=true;;
|
2013-03-21 17:00:12 -04:00
|
|
|
z) zl="$OPTARG";;
|
2012-05-28 13:26:32 -04:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
shift $(($OPTIND-1))
|
2012-05-28 13:03:23 -04:00
|
|
|
local distro="$(find_distro $1)" orig="$2"
|
|
|
|
local suite="$(find_suite $distro)"
|
|
|
|
local orig_ver="$(echo "$orig" | sed -e 's/^.*_//' -e 's/\.orig\.tar.*$//')"
|
|
|
|
local dver="${orig_ver}-1~${distro}+1"
|
2014-01-20 23:40:00 -05:00
|
|
|
$suite_postfix_p && { suite="${distro}${suite_postfix}"; }
|
2012-05-28 13:03:23 -04:00
|
|
|
[ -x "$(which dch)" ] \
|
|
|
|
|| err "package devscripts isn't installed"
|
2012-06-25 03:09:20 -04:00
|
|
|
if [ -n "$modules_conf" ]; then
|
|
|
|
cp $modules_conf debian/modules.conf
|
|
|
|
fi
|
2013-05-28 17:58:36 -04:00
|
|
|
local bootstrap_args=""
|
2012-05-28 13:26:32 -04:00
|
|
|
if [ -n "$modules_list" ]; then
|
2013-05-28 17:58:36 -04:00
|
|
|
if [ "$modules_list" = "non-dfsg" ]; then
|
|
|
|
bootstrap_args="-mnon-dfsg"
|
|
|
|
else set_modules_${modules_list}; fi
|
2012-05-28 13:26:32 -04:00
|
|
|
fi
|
2014-10-08 15:43:29 -04:00
|
|
|
if test -n "$modules_add"; then
|
|
|
|
for x in $modules_add; do
|
|
|
|
bootstrap_args="$bootstrap_args -p${x}"
|
|
|
|
done
|
|
|
|
fi
|
2019-07-29 19:29:27 -04:00
|
|
|
(cd debian && ./bootstrap.sh -a "$avoid_mods_arch" -c $distro $bootstrap_args)
|
2012-05-28 15:15:20 -04:00
|
|
|
case "$speed" in
|
|
|
|
paranoid) sed -i ./debian/rules \
|
|
|
|
-e '/\.stamp-bootstrap:/{:l2 n; /\.\/bootstrap.sh -j/{s/ -j//; :l3 n; b l3}; b l2};' ;;
|
|
|
|
reckless) sed -i ./debian/rules \
|
|
|
|
-e '/\.stamp-build:/{:l2 n; /make/{s/$/ -j/; :l3 n; b l3}; b l2};' ;;
|
|
|
|
esac
|
2013-03-21 17:00:12 -04:00
|
|
|
[ "$zl" -ge "1" ] || zl=1
|
2012-05-28 15:15:20 -04:00
|
|
|
git add debian/rules
|
2012-05-28 13:03:23 -04:00
|
|
|
dch -b -m -v "$dver" --force-distribution -D "$suite" "Nightly build."
|
|
|
|
git add debian/changelog && git commit -m "nightly v$orig_ver"
|
2013-03-21 17:00:12 -04:00
|
|
|
dpkg-source -i.* -Zxz -z${zl} -b .
|
2012-05-28 13:03:23 -04:00
|
|
|
dpkg-genchanges -S > ../$(dsc_base)_source.changes
|
|
|
|
local dsc="../$(dsc_base).dsc"
|
|
|
|
git reset --hard HEAD^ && git clean -fdx
|
|
|
|
} 1>&2
|
2012-05-28 08:11:41 -04:00
|
|
|
echo $dsc
|
2012-05-11 00:48:21 -04:00
|
|
|
}
|
|
|
|
|
2012-05-28 09:37:34 -04:00
|
|
|
fmt_debug_hook () {
|
2016-05-10 17:46:54 -04:00
|
|
|
cat <<'EOF'
|
2012-05-28 09:37:34 -04:00
|
|
|
#!/bin/bash
|
|
|
|
export debian_chroot="cow"
|
|
|
|
cd /tmp/buildd/*/debian/..
|
|
|
|
/bin/bash < /dev/tty > /dev/tty 2> /dev/tty
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
2014-10-08 15:18:30 -04:00
|
|
|
get_sources () {
|
|
|
|
local tgt_distro="$1"
|
2018-01-08 16:57:17 -05:00
|
|
|
while read type args path distro components; do
|
2014-10-08 15:18:30 -04:00
|
|
|
test "$type" = deb || continue
|
2018-01-08 16:57:17 -05:00
|
|
|
if echo "$args" | grep -qv "\[" ; then components=$distro;distro=$path;path=$args;args=""; fi
|
2015-06-11 23:12:49 -04:00
|
|
|
prefix=`echo $distro | awk -F/ '{print $1}'`
|
|
|
|
suffix="`echo $distro | awk -F/ '{print $2}'`"
|
|
|
|
if test -n "$suffix" ; then full="$tgt_distro/$suffix" ; else full="$tgt_distro" ; fi
|
2018-01-08 16:57:17 -05:00
|
|
|
printf "$type $args $path $full $components\n"
|
2015-03-16 11:59:37 -04:00
|
|
|
done < "$2"
|
2014-10-08 15:18:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
get_mirrors () {
|
2015-03-16 11:59:37 -04:00
|
|
|
file=${2-/etc/apt/sources.list}
|
|
|
|
announce "Using apt sources file: $file"
|
|
|
|
get_sources "$1" "$file" | tr '\n' '|' | head -c-1; echo
|
2014-10-08 15:18:30 -04:00
|
|
|
}
|
|
|
|
|
2012-05-28 08:11:41 -04:00
|
|
|
build_debs () {
|
2012-05-28 13:03:23 -04:00
|
|
|
{
|
2012-05-28 13:42:51 -04:00
|
|
|
set -e
|
2012-06-02 00:20:52 -04:00
|
|
|
local OPTIND OPTARG debug_hook=false hookdir="" cow_build_opts=""
|
2017-07-06 18:21:10 -04:00
|
|
|
local keep_pbuilder_config=false keyring="" custom_keyring="/tmp/fs.gpg"
|
2015-10-08 15:31:44 -04:00
|
|
|
local use_custom_sources=true
|
2016-02-17 17:31:58 -05:00
|
|
|
local custom_sources_file="/etc/apt/sources.list"
|
2015-03-16 11:59:37 -04:00
|
|
|
while getopts 'BbdK:kT:t' o "$@"; do
|
2012-05-28 13:03:23 -04:00
|
|
|
case "$o" in
|
2012-06-02 00:20:52 -04:00
|
|
|
B) cow_build_opts="--debbuildopts '-B'";;
|
2012-06-02 12:18:53 -04:00
|
|
|
b) cow_build_opts="--debbuildopts '-b'";;
|
2012-05-28 13:03:23 -04:00
|
|
|
d) debug_hook=true;;
|
2014-10-08 15:09:03 -04:00
|
|
|
k) keep_pbuilder_config=true;;
|
2015-03-16 11:59:37 -04:00
|
|
|
K) custom_keyring="$OPTARG";;
|
2015-10-08 15:31:44 -04:00
|
|
|
t) custom_sources_file="/etc/apt/sources.list";;
|
|
|
|
T) custom_sources_file="$OPTARG";;
|
2012-05-28 13:03:23 -04:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
shift $(($OPTIND-1))
|
2015-10-09 12:09:28 -04:00
|
|
|
if [ "$custom_sources_file" == "/etc/apt/sources.list" ]; then
|
2016-05-10 17:46:54 -04:00
|
|
|
# If you are using the system sources, then it is reasonable that you expect to use all of the supplementary repos too
|
|
|
|
cat /etc/apt/sources.list > /tmp/fs.sources.list
|
|
|
|
if [ "$(ls -A /etc/apt/sources.list.d)" ]; then
|
|
|
|
for X in /etc/apt/sources.list.d/*; do cat $X >> /tmp/fs.sources.list; done
|
|
|
|
fi
|
|
|
|
custom_sources_file="/tmp/fs.sources.list"
|
2020-08-12 13:55:31 -04:00
|
|
|
apt-key exportall > "/tmp/fs.tmp.gpg"
|
|
|
|
gpg --no-default-keyring --keyring /tmp/fs.tmp.keyring.gpg --import /tmp/fs.tmp.gpg
|
|
|
|
gpg --no-default-keyring --keyring /tmp/fs.tmp.keyring.gpg --export > "/tmp/fs.gpg"
|
2017-07-06 18:21:10 -04:00
|
|
|
custom_keyring="/tmp/fs.gpg"
|
2015-10-09 12:09:28 -04:00
|
|
|
fi
|
2015-10-08 15:31:44 -04:00
|
|
|
if [ "$custom_sources_file" == "" ]; then
|
2016-05-10 17:46:54 -04:00
|
|
|
# Caller has explicitly set the custom sources file to empty string. They must intend to not use additional mirrors.
|
|
|
|
use_custom_sources=false
|
2015-10-08 15:31:44 -04:00
|
|
|
fi
|
2015-10-08 18:02:27 -04:00
|
|
|
if [[ "$custom_source_file" == "/tmp/fs.sources.list" && ! -e "/tmp/fs.sources.list" ]]; then
|
2018-08-28 17:00:04 -04:00
|
|
|
echo "deb [trusted=yes] http://files.freeswitch.org/repo/deb/freeswitch-1.8/ stretch main" >> "/tmp/fs.sources.list"
|
2015-10-08 15:31:44 -04:00
|
|
|
fi
|
2017-07-06 18:21:10 -04:00
|
|
|
if [[ "$custom_keyring" == "/tmp/fs.gpg" && ! -r "/tmp/fs.gpg" ]]; then
|
2020-08-12 13:55:31 -04:00
|
|
|
cat << EOF > "/tmp/fs.tmp.gpg"
|
2015-10-08 15:31:44 -04:00
|
|
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
|
|
|
2017-07-06 18:21:10 -04:00
|
|
|
mQINBFlVeA4BEADg3MkzUvnbuqG7S6ppt0BJIYx2WIlDzsj2EBPBBo7VpppWPGa/
|
|
|
|
5IDuCgSTVeNPffo6jlHk6HFK4g3r+oVJIDoSGE8bKHAeva/iQRUx5o56zXBVOu8q
|
|
|
|
3lkUQBjRD+14Ujz9pShNylNfIjgmUp/lg93JYHvIMVGp3AcQKr0dgkhw31NXV2D1
|
|
|
|
BOSXdx6SNcbIhjY1X4CQivrz+WfX6Lk6vfWTwF0qDC0f7TYSEKmR4Sxadx/3Pb+a
|
|
|
|
+Hiu3BrYtpf99ldwjb2OsfHnRvdf57z+9cA6IEbA+5ergHgrMOVj8oRRCjWM2qNg
|
|
|
|
5aaJa5WfQsPNNQ41hvjYkdOJjI5mOUFEhX0+y0Gab7S5KCvNn8f5oGvcaYLjFfM4
|
|
|
|
syl2CbNx4mKfx+zJ43eH6GsU2N0VCk2lNZt0TV6p3AjZ4ofjj9YusQ6FczlWUgFW
|
|
|
|
QlNQZsR5KXAhVu3ACKWsy2WSvfkSOMPpM4lAXJvHyqXh8kO+GsuedVgu8uOiAmkS
|
|
|
|
acyPLohm0W87q2N/6xZ4OH7oMHQFos3hrknlESySN1iJz2qyuysL0yh77OWtdJH+
|
|
|
|
GIsnftEH33ggG69FHZRDouC60C2HwWxrOwngCSxFEdQppJZjI1H5wSIUOuywZ6a0
|
|
|
|
+mSe/ZnZKL/hYjy/ZQhGWdmliN8V0WF2MEesk1ouQg63bzxOYEo6Fpw6AwARAQAB
|
|
|
|
tD1GcmVlU1dJVENIIFBhY2thZ2luZyBLZXkgKERlYmlhbiA5KSA8cGFja2FnZXNA
|
2018-08-28 17:00:04 -04:00
|
|
|
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
|
|
|
|
Y4o4oqgePeTYzkxVYj8=
|
|
|
|
=XPvO
|
2015-10-08 15:31:44 -04:00
|
|
|
-----END PGP PUBLIC KEY BLOCK-----
|
|
|
|
EOF
|
2020-08-12 13:55:31 -04:00
|
|
|
gpg --no-default-keyring --keyring /tmp/fs.tmp.keyring.gpg --import /tmp/fs.tmp.gpg
|
|
|
|
gpg --no-default-keyring --keyring /tmp/fs.tmp.keyring.gpg --export > "/tmp/fs.gpg"
|
2015-10-08 15:31:44 -04:00
|
|
|
fi
|
|
|
|
|
2012-05-28 13:03:23 -04:00
|
|
|
local distro="$(find_distro $1)" dsc="$2" arch="$3"
|
|
|
|
if [ -z "$distro" ] || [ "$distro" = "auto" ]; then
|
|
|
|
if ! (echo "$dsc" | grep -e '-[0-9]*~[a-z]*+[0-9]*'); then
|
|
|
|
err "no distro specified or found"
|
|
|
|
fi
|
|
|
|
local x="$(echo $dsc | sed -e 's/^[^-]*-[0-9]*~//' -e 's/+[^+]*$//')"
|
|
|
|
distro="$(find_distro $x)"
|
2012-05-28 08:11:41 -04:00
|
|
|
fi
|
2012-05-28 13:03:23 -04:00
|
|
|
[ -n "$arch" ] || arch="$(dpkg-architecture | grep '^DEB_BUILD_ARCH=' | cut -d'=' -f2)"
|
|
|
|
[ -x "$(which cowbuilder)" ] \
|
|
|
|
|| err "package cowbuilder isn't installed"
|
|
|
|
local cow_img=/var/cache/pbuilder/base-$distro-$arch.cow
|
2015-03-16 11:59:37 -04:00
|
|
|
if [ -e "$custom_keyring" ]; then
|
|
|
|
keyring="$custom_keyring"
|
|
|
|
else
|
|
|
|
keyring="$(mktemp /tmp/keyringXXXXXXXX.asc)"
|
|
|
|
apt-key exportall > "$keyring"
|
|
|
|
fi
|
2012-05-28 13:03:23 -04:00
|
|
|
cow () {
|
2015-08-22 20:22:06 -04:00
|
|
|
if ! $use_custom_sources; then
|
2015-10-02 07:04:00 -04:00
|
|
|
echo "Using system sources $keyring $distro $custom_sources_file"
|
2014-10-08 15:18:30 -04:00
|
|
|
cowbuilder "$@" \
|
|
|
|
--distribution $distro \
|
|
|
|
--architecture $arch \
|
|
|
|
--basepath $cow_img
|
|
|
|
else
|
2015-10-02 07:04:00 -04:00
|
|
|
echo "Using custom sources $keyring $distro $custom_sources_file"
|
2014-10-08 15:18:30 -04:00
|
|
|
cowbuilder "$@" \
|
|
|
|
--distribution $distro \
|
|
|
|
--architecture $arch \
|
|
|
|
--basepath $cow_img \
|
|
|
|
--keyring "$keyring" \
|
2015-03-16 11:59:37 -04:00
|
|
|
--othermirror "$(get_mirrors $distro $custom_sources_file)"
|
2014-10-08 15:18:30 -04:00
|
|
|
fi
|
2012-05-28 13:03:23 -04:00
|
|
|
}
|
|
|
|
if ! [ -d $cow_img ]; then
|
|
|
|
announce "Creating base $distro-$arch image..."
|
2014-06-10 20:55:06 -04:00
|
|
|
local x=30
|
2014-06-10 20:52:12 -04:00
|
|
|
while ! cow --create; do
|
2014-06-10 20:55:06 -04:00
|
|
|
[ $x -lt 1 ] && break; sleep 120; x=$((x-1))
|
2014-06-10 20:52:12 -04:00
|
|
|
done
|
2012-05-28 13:03:23 -04:00
|
|
|
fi
|
|
|
|
announce "Updating base $distro-$arch image..."
|
2014-06-10 20:55:06 -04:00
|
|
|
local x=30
|
2014-10-08 15:09:03 -04:00
|
|
|
local opts="--override-config"
|
|
|
|
$keep_pbuilder_config && opts=""
|
|
|
|
while ! cow --update $opts; do
|
2014-06-10 20:55:06 -04:00
|
|
|
[ $x -lt 1 ] && break; sleep 120; x=$((x-1))
|
2012-06-22 19:16:37 -04:00
|
|
|
done
|
2012-05-28 13:03:23 -04:00
|
|
|
announce "Building $distro-$arch DEBs from $dsc..."
|
|
|
|
if $debug_hook; then
|
|
|
|
mkdir -p .hooks
|
|
|
|
fmt_debug_hook > .hooks/C10shell
|
|
|
|
chmod +x .hooks/C10shell
|
|
|
|
hookdir=$(pwd)/.hooks
|
|
|
|
fi
|
2012-05-28 14:24:11 -04:00
|
|
|
cow --build $dsc \
|
|
|
|
--hookdir "$hookdir" \
|
2012-06-02 13:30:48 -04:00
|
|
|
--buildresult ../ \
|
|
|
|
$cow_build_opts
|
2015-06-15 18:17:18 -04:00
|
|
|
if [ ! -e "$custom_keyring" ]; then
|
|
|
|
# Cleanup script created temporary file
|
|
|
|
rm -f $keyring
|
|
|
|
fi
|
2012-05-28 13:03:23 -04:00
|
|
|
} 1>&2
|
2012-06-02 11:17:10 -04:00
|
|
|
echo ${dsc%.dsc}_${arch}.changes
|
2012-05-27 02:54:31 -04:00
|
|
|
}
|
|
|
|
|
2014-12-24 22:58:49 -05:00
|
|
|
default_distros () {
|
|
|
|
local host_distro="Debian"
|
|
|
|
test -z "$(which lsb_release)" || host_distro="$(lsb_release -is)"
|
|
|
|
case "$host_distro" in
|
2018-08-28 17:00:04 -04:00
|
|
|
Debian) echo "sid stretch jessie" ;;
|
2014-12-24 22:58:49 -05:00
|
|
|
Ubuntu) echo "utopic trusty" ;;
|
2014-12-24 23:18:27 -05:00
|
|
|
*) err "Unknown host distribution \"$host_distro\"" ;;
|
2014-12-24 22:58:49 -05:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2012-05-28 10:55:44 -04:00
|
|
|
build_all () {
|
|
|
|
local OPTIND OPTARG
|
2014-01-17 14:16:26 -05:00
|
|
|
local orig_opts="" dsc_opts="" deb_opts="" modlist=""
|
2014-01-17 14:07:11 -05:00
|
|
|
local archs="" distros="" orig="" depinst=false par=false
|
2015-06-11 01:00:46 -04:00
|
|
|
while getopts 'a:bc:df:ijkK:l:m:no:p:s:tT:u:v:z:' o "$@"; do
|
2012-05-28 10:55:44 -04:00
|
|
|
case "$o" in
|
|
|
|
a) archs="$archs $OPTARG";;
|
|
|
|
b) orig_opts="$orig_opts -b";;
|
|
|
|
c) distros="$distros $OPTARG";;
|
|
|
|
d) deb_opts="$deb_opts -d";;
|
2012-06-25 03:09:20 -04:00
|
|
|
f) dsc_opts="$dsc_opts -f$OPTARG";;
|
2014-01-17 14:07:11 -05:00
|
|
|
i) depinst=true;;
|
2012-05-28 16:48:04 -04:00
|
|
|
j) par=true;;
|
2014-10-08 15:09:03 -04:00
|
|
|
k) deb_opts="$deb_opts -k";;
|
2015-06-11 01:00:46 -04:00
|
|
|
K) deb_opts="$deb_opts -K$OPTARG";;
|
2014-01-17 14:16:26 -05:00
|
|
|
l) modlist="$OPTARG";;
|
2013-05-28 17:58:36 -04:00
|
|
|
m) orig_opts="$orig_opts -m$OPTARG"; dsc_opts="$dsc_opts -m$OPTARG";;
|
2012-06-22 14:04:35 -04:00
|
|
|
n) orig_opts="$orig_opts -n";;
|
2012-06-22 14:03:42 -04:00
|
|
|
o) orig="$OPTARG";;
|
2014-10-08 15:43:29 -04:00
|
|
|
p) dsc_opts="$dsc_opts -p$OPTARG";;
|
2012-05-28 15:15:20 -04:00
|
|
|
s) dsc_opts="$dsc_opts -s$OPTARG";;
|
2014-10-08 15:18:30 -04:00
|
|
|
t) deb_opts="$deb_opts -t";;
|
2015-06-11 01:00:46 -04:00
|
|
|
T) deb_opts="$deb_opts -T$OPTARG";;
|
2014-01-20 23:40:00 -05:00
|
|
|
u) dsc_opts="$dsc_opts -u$OPTARG";;
|
2012-05-28 10:55:44 -04:00
|
|
|
v) orig_opts="$orig_opts -v$OPTARG";;
|
2013-03-21 17:00:12 -04:00
|
|
|
z) orig_opts="$orig_opts -z$OPTARG"; dsc_opts="$dsc_opts -z$OPTARG";;
|
2012-05-28 10:55:44 -04:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
shift $(($OPTIND-1))
|
|
|
|
[ -n "$archs" ] || archs="amd64 i386"
|
2014-12-24 22:58:49 -05:00
|
|
|
[ -n "$distros" ] || distros="$(default_distros)"
|
2014-01-17 14:07:11 -05:00
|
|
|
! $depinst || aptitude install -y \
|
|
|
|
rsync git less cowbuilder ccache \
|
2016-02-24 19:13:29 -05:00
|
|
|
devscripts equivs build-essential yasm
|
2012-06-22 14:03:42 -04:00
|
|
|
[ -n "$orig" ] || orig="$(create_orig $orig_opts HEAD | tail -n1)"
|
2014-01-17 14:16:26 -05:00
|
|
|
if [ -n "$modlist" ]; then
|
|
|
|
local modtmp="$(mktemp /tmp/modules-XXXXXXXXXX.conf)"
|
|
|
|
> $modtmp
|
|
|
|
for m in "$modlist"; do printf '%s\n' "$m" >> $modtmp; done
|
|
|
|
dsc_opts="$dsc_opts -f${modtmp}"; fi
|
|
|
|
[ -n "$orig" ] || orig="$(create_orig $orig_opts HEAD | tail -n1)"
|
2012-05-28 16:48:04 -04:00
|
|
|
mkdir -p ../log
|
2016-01-08 13:14:19 -05:00
|
|
|
> ../log/changes.txt
|
2012-05-28 16:48:04 -04:00
|
|
|
echo; echo; echo; echo
|
2012-06-02 00:33:16 -04:00
|
|
|
trap 'echo "Killing children...">&2; for x in $(jobs -p); do kill $x; done' EXIT
|
2012-05-28 10:55:44 -04:00
|
|
|
if [ "${orig:0:2}" = ".." ]; then
|
2016-01-08 13:14:19 -05:00
|
|
|
echo "true" > ../log/builds-ok.txt
|
2012-05-28 10:55:44 -04:00
|
|
|
for distro in $distros; do
|
2012-05-28 16:48:04 -04:00
|
|
|
echo "Creating $distro dsc..." >&2
|
2016-01-08 13:14:19 -05:00
|
|
|
local dsc="$(create_dsc $dsc_opts $distro $orig 2>../log/$distro.txt | tail -n1)"
|
2012-05-28 16:48:04 -04:00
|
|
|
echo "Done creating $distro dsc." >&2
|
2012-05-28 10:55:44 -04:00
|
|
|
if [ "${dsc:0:2}" = ".." ]; then
|
2012-06-02 12:18:53 -04:00
|
|
|
local lopts="-b"
|
2012-05-28 10:55:44 -04:00
|
|
|
for arch in $archs; do
|
2012-05-28 16:48:04 -04:00
|
|
|
{
|
|
|
|
echo "Building $distro-$arch debs..." >&2
|
2016-01-08 13:14:19 -05:00
|
|
|
local changes="$(build_debs $lopts $deb_opts $distro $dsc $arch 2>../log/$distro-$arch.txt | tail -n1)"
|
2012-05-28 16:48:04 -04:00
|
|
|
echo "Done building $distro-$arch debs." >&2
|
|
|
|
if [ "${changes:0:2}" = ".." ]; then
|
2016-01-08 13:14:19 -05:00
|
|
|
echo "$changes" >> ../log/changes.txt
|
2014-02-18 16:05:01 -05:00
|
|
|
else
|
2016-01-08 13:14:19 -05:00
|
|
|
echo "false" > ../log/builds-ok.txt
|
2012-05-28 16:48:04 -04:00
|
|
|
fi
|
|
|
|
} &
|
|
|
|
$par || wait
|
2012-06-02 12:09:39 -04:00
|
|
|
lopts="-B"
|
2012-05-28 10:55:44 -04:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
done
|
2012-05-28 16:48:04 -04:00
|
|
|
! $par || wait
|
2012-05-28 10:55:44 -04:00
|
|
|
fi
|
2014-01-17 14:16:26 -05:00
|
|
|
[ -z "$modlist" ] || rm -f $modtmp
|
2012-06-02 00:33:16 -04:00
|
|
|
trap - EXIT
|
2016-01-08 13:14:19 -05:00
|
|
|
cat ../log/changes.txt
|
|
|
|
test "$(cat ../log/builds-ok.txt)" = true || exit 1
|
2012-05-28 10:55:44 -04:00
|
|
|
}
|
|
|
|
|
2012-06-01 21:10:11 -04:00
|
|
|
usage () {
|
|
|
|
cat >&2 <<EOF
|
|
|
|
$0 [opts] [cmd] [cmd-opts]
|
|
|
|
|
|
|
|
options:
|
|
|
|
|
|
|
|
-d Enable debugging mode.
|
|
|
|
|
|
|
|
commands:
|
|
|
|
|
|
|
|
archive-orig
|
|
|
|
|
|
|
|
build-all
|
|
|
|
|
2013-01-17 16:02:41 -05:00
|
|
|
[ This must be run as root! ]
|
|
|
|
|
2012-06-01 21:10:11 -04:00
|
|
|
-a Specify architectures
|
|
|
|
-c Specify distributions
|
|
|
|
-d Enable cowbuilder debug hook
|
2012-06-25 03:09:20 -04:00
|
|
|
-f <modules.conf>
|
|
|
|
Build only modules listed in this file
|
2014-01-17 14:07:11 -05:00
|
|
|
-i Auto install build deps on host system
|
2012-06-01 21:10:11 -04:00
|
|
|
-j Build debs in parallel
|
2014-10-08 15:09:03 -04:00
|
|
|
-k Don't override pbuilder image configurations
|
2015-03-16 11:59:37 -04:00
|
|
|
-K [/path/to/keyring.asc]
|
2015-09-15 18:35:05 -04:00
|
|
|
Use custom keyring file for sources.list in build environment
|
2015-03-16 11:59:37 -04:00
|
|
|
in the format of: apt-key exportall > /path/to/file.asc
|
2014-01-17 14:16:26 -05:00
|
|
|
-l <modules>
|
2013-05-28 17:58:36 -04:00
|
|
|
-m [ quicktest | non-dfsg ]
|
2012-06-01 21:10:11 -04:00
|
|
|
Choose custom list of modules to build
|
2012-06-22 14:04:35 -04:00
|
|
|
-n Nightly build
|
2012-06-22 14:03:42 -04:00
|
|
|
-o <orig-file>
|
|
|
|
Specify existing .orig.tar.xz file
|
2014-10-08 15:43:29 -04:00
|
|
|
-p <module>
|
|
|
|
Include otherwise avoided module
|
2012-06-01 21:10:11 -04:00
|
|
|
-s [ paranoid | reckless ]
|
|
|
|
Set FS bootstrap/build -j flags
|
2015-10-08 18:05:25 -04:00
|
|
|
-t Use system /etc/apt/sources.list in build environment(does not include /etc/apt/sources.list.d/*.list)
|
2015-03-16 11:59:37 -04:00
|
|
|
-T [/path/to/sources.list]
|
|
|
|
Use custom /etc/apt/sources.list in build environment
|
2014-01-20 23:40:00 -05:00
|
|
|
-u <suite-postfix>
|
|
|
|
Specify a custom suite postfix
|
2012-06-01 21:10:11 -04:00
|
|
|
-v Set version
|
|
|
|
-z Set compression level
|
|
|
|
|
|
|
|
build-debs <distro> <dsc-file> <architecture>
|
|
|
|
|
2013-01-17 16:02:41 -05:00
|
|
|
[ This must be run as root! ]
|
|
|
|
|
2012-06-02 00:20:52 -04:00
|
|
|
-B Binary architecture-dependent build
|
2012-06-02 12:18:53 -04:00
|
|
|
-b Binary-only build
|
2012-06-01 21:10:11 -04:00
|
|
|
-d Enable cowbuilder debug hook
|
2014-10-08 15:09:03 -04:00
|
|
|
-k Don't override pbuilder image configurations
|
2015-03-16 11:59:37 -04:00
|
|
|
-K [/path/to/keyring.asc]
|
2015-09-15 18:35:05 -04:00
|
|
|
Use custom keyring file for sources.list in build environment
|
2015-03-16 11:59:37 -04:00
|
|
|
in the format of: apt-key exportall > /path/to/file.asc
|
2014-10-08 15:18:30 -04:00
|
|
|
-t Use system /etc/apt/sources.list in build environment
|
2015-03-16 11:59:37 -04:00
|
|
|
-T [/path/to/sources.list]
|
|
|
|
Use custom /etc/apt/sources.list in build environment
|
2012-06-01 21:10:11 -04:00
|
|
|
|
|
|
|
create-dbg-pkgs
|
|
|
|
|
|
|
|
create-dsc <distro> <orig-file>
|
|
|
|
|
2012-06-25 03:09:20 -04:00
|
|
|
-f <modules.conf>
|
|
|
|
Build only modules listed in this file
|
2013-05-28 17:58:36 -04:00
|
|
|
-m [ quicktest | non-dfsg ]
|
2012-06-01 21:10:11 -04:00
|
|
|
Choose custom list of modules to build
|
2014-10-08 15:43:29 -04:00
|
|
|
-p <module>
|
|
|
|
Include otherwise avoided module
|
2012-06-01 21:10:11 -04:00
|
|
|
-s [ paranoid | reckless ]
|
|
|
|
Set FS bootstrap/build -j flags
|
2014-01-20 23:40:00 -05:00
|
|
|
-u <suite-postfix>
|
|
|
|
Specify a custom suite postfix
|
2013-03-21 17:00:12 -04:00
|
|
|
-z Set compression level
|
2012-06-01 21:10:11 -04:00
|
|
|
|
|
|
|
create-orig <treeish>
|
|
|
|
|
2013-05-28 17:58:36 -04:00
|
|
|
-m [ quicktest | non-dfsg ]
|
|
|
|
Choose custom list of modules to build
|
2012-06-01 21:10:11 -04:00
|
|
|
-n Nightly build
|
|
|
|
-v Set version
|
|
|
|
-z Set compression level
|
|
|
|
|
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
while getopts 'dh' o "$@"; do
|
2012-05-28 08:11:41 -04:00
|
|
|
case "$o" in
|
|
|
|
d) set -vx;;
|
2012-06-01 21:10:11 -04:00
|
|
|
h) usage;;
|
2012-05-28 08:11:41 -04:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
shift $(($OPTIND-1))
|
2012-05-27 02:54:31 -04:00
|
|
|
|
2012-06-01 21:10:11 -04:00
|
|
|
cmd="$1"; [ -n "$cmd" ] || usage
|
2012-05-05 16:23:53 -04:00
|
|
|
shift
|
|
|
|
case "$cmd" in
|
2012-05-28 08:11:41 -04:00
|
|
|
archive-orig) archive_orig "$@" ;;
|
2012-05-28 10:55:44 -04:00
|
|
|
build-all) build_all "$@" ;;
|
2012-05-28 08:11:41 -04:00
|
|
|
build-debs) build_debs "$@" ;;
|
2012-05-05 16:23:53 -04:00
|
|
|
create-dbg-pkgs) create_dbg_pkgs ;;
|
2012-05-11 00:48:21 -04:00
|
|
|
create-dsc) create_dsc "$@" ;;
|
2012-05-10 23:13:39 -04:00
|
|
|
create-orig) create_orig "$@" ;;
|
2012-06-01 21:10:11 -04:00
|
|
|
*) usage ;;
|
2012-05-05 16:23:53 -04:00
|
|
|
esac
|