commit 8c71dad38b58aa138872d1f8827ea2813763ab1b
Author: Nicolas Vigier <boklm(a)torproject.org>
Date: Mon Apr 11 19:28:16 2016 +0200
Bug 18331: add /usr/sbin:/sbin to the PATH
On Debian wheezy, dpkg -i fails when the PATH does not include /sbin
and /usr/sbin, so we add them. As a policy, Debian does not include them
by default in regular users PATH.
This change is not required when building using LXC as the commands are
run using sudo which overrides the PATH with the value in "secure_path"
which includes sbin directories.
---
gitian/descriptors/mac/gitian-pluggable-transports.yml | 2 ++
gitian/descriptors/mac/gitian-tor.yml | 2 ++
gitian/descriptors/mac/gitian-utils.yml | 2 ++
3 files changed, 6 insertions(+)
diff --git a/gitian/descriptors/mac/gitian-pluggable-transports.yml b/gitian/descriptors/mac/gitian-pluggable-transports.yml
index e2b51c4..6b1a99e 100644
--- a/gitian/descriptors/mac/gitian-pluggable-transports.yml
+++ b/gitian/descriptors/mac/gitian-pluggable-transports.yml
@@ -79,6 +79,8 @@ script: |
mkdir -p $PTDIR/
mkdir -p $OUTDIR/
#
+ # dpkg requires sbin directories in the PATH
+ export PATH="/usr/sbin:/sbin:$PATH"
sudo dpkg -i *.deb
tar xaf multiarch-darwin*tar.xz
export PATH="$PATH:$HOME/build/apple-osx/bin/"
diff --git a/gitian/descriptors/mac/gitian-tor.yml b/gitian/descriptors/mac/gitian-tor.yml
index 94d3eb1..687b1d6 100644
--- a/gitian/descriptors/mac/gitian-tor.yml
+++ b/gitian/descriptors/mac/gitian-tor.yml
@@ -43,6 +43,8 @@ script: |
mkdir -p $TORCONFIGDIR/
mkdir -p $OUTDIR/
#
+ # dpkg requires sbin directories in the PATH
+ export PATH="/usr/sbin:/sbin:$PATH"
sudo dpkg -i *.deb
tar xaf multiarch-darwin*tar.xz
export PATH="$PATH:$HOME/build/apple-osx/bin/"
diff --git a/gitian/descriptors/mac/gitian-utils.yml b/gitian/descriptors/mac/gitian-utils.yml
index 5288471..cef1533 100644
--- a/gitian/descriptors/mac/gitian-utils.yml
+++ b/gitian/descriptors/mac/gitian-utils.yml
@@ -71,6 +71,8 @@ script: |
export FAKETIME=$REFERENCE_DATETIME
cd ..
+ # dpkg requires sbin directories in the PATH
+ export PATH="/usr/sbin:/sbin:$PATH"
sudo dpkg -i *.deb
tar xaf multiarch-darwin*tar.xz
export PATH="$PATH:$HOME/build/apple-osx/bin/"