Patchwork [STABLE] packaging: always execute builddeb from source root

login
register
mail settings
Submitter Gregory Szorc
Date Aug. 1, 2018, 7:25 p.m.
Message ID <824636b08400c3f1265f.1533151513@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/33042/
State New
Headers show

Comments

Gregory Szorc - Aug. 1, 2018, 7:25 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1533151492 25200
#      Wed Aug 01 12:24:52 2018 -0700
# Branch stable
# Node ID 824636b08400c3f1265fe1eb6d8971384560ec60
# Parent  cc8657f6fd3ed222cc92c6994ab3a561da5ad3d3
packaging: always execute builddeb from source root

Without this, dockerdeb and the make targets that invoke it may
fail depending on the pwd at the time of invocation.

Patch

diff --git a/contrib/packaging/dockerdeb b/contrib/packaging/dockerdeb
--- a/contrib/packaging/dockerdeb
+++ b/contrib/packaging/dockerdeb
@@ -33,7 +33,7 @@  if [ $(uname) = "Darwin" ] ; then
 fi
 $DOCKER run -u $DBUILDUSER --rm -v $ROOTDIR/..:/mnt $CONTAINER \
   sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/packaging/builddeb --build --distid $DISTID --codename $CODENAME $@"
-contrib/packaging/builddeb --cleanup --distid $DISTID --codename $CODENAME
+(cd $ROOTDIR && contrib/packaging/builddeb --cleanup --distid $DISTID --codename $CODENAME)
 if [ $(uname) = "Darwin" ] ; then
     $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
             sh -c "cd /mnt/$dn && make clean"