Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
8270aaa3
Commit
8270aaa3
authored
Oct 28, 2013
by
Mislav Marohnić
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tmpdir-noexec'
parents
1173e8c0
00fcf8b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
bin/ruby-build
+5
-0
test/build.bats
+20
-0
No files found.
bin/ruby-build
View file @
8270aaa3
...
@@ -841,6 +841,11 @@ else
...
@@ -841,6 +841,11 @@ else
TMP
=
"
${
TMPDIR
%/
}
"
TMP
=
"
${
TMPDIR
%/
}
"
fi
fi
if
[
!
-w
"
$TMP
"
]
||
[
!
-x
"
$TMP
"
]
;
then
echo
"ruby-build: TMPDIR=
$TMP
is set to a non-accessible location"
>
&2
exit
1
fi
# Work around warnings building Ruby 2.0 on Clang 2.x:
# Work around warnings building Ruby 2.0 on Clang 2.x:
# pass -Wno-error=shorten-64-to-32 if the compiler accepts it.
# pass -Wno-error=shorten-64-to-32 if the compiler accepts it.
#
#
...
...
test/build.bats
View file @
8270aaa3
...
@@ -234,3 +234,23 @@ rubinius-2.0.0: --prefix=$INSTALL_ROOT
...
@@ -234,3 +234,23 @@ rubinius-2.0.0: --prefix=$INSTALL_ROOT
bundle exec rake install
bundle exec rake install
OUT
OUT
}
}
@test "non-writable TMPDIR aborts build" {
export TMPDIR="${TMP}/build"
mkdir -p "$TMPDIR"
chmod -w "$TMPDIR"
touch "${TMP}/build-definition"
run ruby-build "${TMP}/build-definition" "$INSTALL_ROOT"
assert_failure "ruby-build: TMPDIR=$TMPDIR is set to a non-accessible location"
}
@test "non-executable TMPDIR aborts build" {
export TMPDIR="${TMP}/build"
mkdir -p "$TMPDIR"
chmod -x "$TMPDIR"
touch "${TMP}/build-definition"
run ruby-build "${TMP}/build-definition" "$INSTALL_ROOT"
assert_failure "ruby-build: TMPDIR=$TMPDIR is set to a non-accessible location"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment