我有两个使用 pbuilder 构建的包 (cainteoir-engine
和cainteoir-gtk
),其中cainteoir-gtk
依赖于cainteoir-engine
.
我已经pdebuild
拿起了本地依赖项。但是,如果我对构建脚本进行更改(例如,通过 将未签名的构建更改为已签名的构建pdebuild --auto-debsign
),它不会在pbuilder --update
.
有没有办法在不更改版本号的情况下更新 pbuilder chroot 使用的本地 debian 文件(因为这些是用于测试/开发包的本地测试版本)?
我正在使用--bindmounts
and--othermirror
选项pbuilder --update --override-config
来更新基本 chroot 映像。我dpkg-scanpackages
用来生成本地Packages.gz
文件。
这是我正在使用的辅助函数脚本(来自https://raw.github.com/rhdunn/cainteoir-engine/debian/build.sh):
doscanpackages() {
pushd $1
dpkg-scanpackages . /dev/null | gzip -9 > Packages.gz
popd
}
dopbuild() {
COMMAND=$1
ARCH=$3
case "$2" in
stable|wheezy)
DIST=debian
RELEASE=wheezy
;;
testing|jessie)
DIST=debian
RELEASE=jessie
;;
unstable|sid)
DIST=debian
RELEASE=sid
;;
precise|quantal|raring|saucy|trusty)
DIST=ubuntu
RELEASE=$2
;;
*)
echo "Unknown distribution release : $1"
exit 1
;;
esac
case "${DIST}" in
debian)
MIRROR=ftp://mirror.ox.ac.uk/debian/
KEYRING=/usr/share/keyrings/debian-archive-keyring.gpg
;;
ubuntu)
MIRROR=ftp://archive.ubuntu.com/ubuntu/
KEYRING=/usr/share/keyrings/ubuntu-archive-keyring.gpg
;;
esac
REF=${DIST}-${RELEASE}-${ARCH}
BASETGZ=${PBUILD_DIR}/${REF}.tgz
OUTPUT=${PBUILD_DIR}/${REF}
shift
shift
shift
case "${COMMAND}" in
create|update)
if [[ -e ${BASETGZ} ]] ; then
sudo pbuilder --update --override-config --distribution ${RELEASE} --mirror ${MIRROR} --basetgz ${BASETGZ} --debootstrapopts "--keyring=${KEYRING}" --bindmounts "${OUTPUT}" --othermirror "deb file:${OUTPUT} ./"
else
mkdir -pv ${PBUILD_IMGDIR}
sudo pbuilder --create --distribution ${RELEASE} --mirror ${MIRROR} --basetgz ${BASETGZ} --debootstrapopts "--keyring=${KEYRING}" --bindmounts "${OUTPUT}" --othermirror "deb file:${OUTPUT} ./"
fi
;;
build)
mkdir -pv ${OUTPUT}
dopredebbuild ${RELEASE}
if [[ ! -e builddeb.failed ]] ; then
(pdebuild --buildresult ${OUTPUT} $@ -- --basetgz ${BASETGZ} --debootstrapopts "--keyring=${KEYRING}" --bindmounts "${OUTPUT}" || touch builddeb.failed) 2>&1 | tee build.log
fi
if [[ ! -e builddeb.failed ]] ; then
doscanpackages ${OUTPUT}
fi
dopostdebbuild ${RELEASE}
;;
esac
}