aboutsummaryrefslogtreecommitdiff
path: root/src/make.bash
diff options
context:
space:
mode:
authorBobby Powers <bobbypowers@gmail.com>2011-11-11 16:41:37 -0500
committerRuss Cox <rsc@golang.org>2011-11-11 16:41:37 -0500
commit90c5070000d1db22409dd5b97b3a3bb777021b03 (patch)
treee4f26e3ace7cd22c4db15aaa7bfbeb5a06d3986b /src/make.bash
parent6d9c02aea3e902633ca62b220686580705bdcaf8 (diff)
downloadgo-90c5070000d1db22409dd5b97b3a3bb777021b03.tar.xz
build: fix check for selinux's allow_execstack on Fedora 16
Fedora 16 mounts selinux at /sys/fs/selinux, instead of the traditional /selinux. Check both locations for the selinux filesystem in make.bash Fixes #2448. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5373077
Diffstat (limited to 'src/make.bash')
-rwxr-xr-xsrc/make.bash31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/make.bash b/src/make.bash
index 013852570c..3580d2a0bd 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -50,21 +50,26 @@ chmod +x "$GOBIN"/gomake
# TODO(brainman): delete this after 01/01/2012.
rm -f "$GOBIN"/gotest # remove old bash version of gotest on Windows
-if [ -d /selinux -a -f /selinux/booleans/allow_execstack -a -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
- if ! cat /selinux/booleans/allow_execstack | grep -c '^1 1$' >> /dev/null ; then
- echo "WARNING: the default SELinux policy on, at least, Fedora 12 breaks "
- echo "Go. You can enable the features that Go needs via the following "
- echo "command (as root):"
- echo " # setsebool -P allow_execstack 1"
- echo
- echo "Note that this affects your system globally! "
- echo
- echo "The build will continue in five seconds in case we "
- echo "misdiagnosed the issue..."
+# on Fedora 16 the selinux filesystem is mounted at /sys/fs/selinux,
+# so loop through the possible selinux mount points
+for se_mount in /selinux /sys/fs/selinux
+do
+ if [ -d $se_mount -a -f $se_mount/booleans/allow_execstack -a -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
+ if ! cat $se_mount/booleans/allow_execstack | grep -c '^1 1$' >> /dev/null ; then
+ echo "WARNING: the default SELinux policy on, at least, Fedora 12 breaks "
+ echo "Go. You can enable the features that Go needs via the following "
+ echo "command (as root):"
+ echo " # setsebool -P allow_execstack 1"
+ echo
+ echo "Note that this affects your system globally! "
+ echo
+ echo "The build will continue in five seconds in case we "
+ echo "misdiagnosed the issue..."
- sleep 5
+ sleep 5
+ fi
fi
-fi
+done
(
cd "$GOROOT"/src/pkg;