Skip to content

Commit

Permalink
Merge pull request #71 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 1.10.2
  • Loading branch information
andyone authored Jun 30, 2020
2 parents 9dbf33f + d802934 commit 82e16f8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 10 deletions.
40 changes: 31 additions & 9 deletions SOURCES/rbbuild
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fi
APP="RBBuild"

# App version (String)
VER="1.10.1"
VER="1.10.2"

################################################################################

Expand Down Expand Up @@ -208,16 +208,10 @@ main() {

[[ -n "$quiet" ]] && output=/dev/null
[[ -n "$verbose" ]] && verb_output=$output

if [[ -d "$tmp" ]] ; then
if ! checkPerms "DRW" "$tmp" ; then
error "\nYou don't have enough permissions to use directory $tmp\n"
doExit 1
fi
fi

[[ -n "$rbenv" ]] && require "rbenv"

checkTMPDir

tmp_dir=$(mktemp -d ${tmp}/$TEMP_TEMPLATE)
log="${tmp_dir}/build.log"

Expand Down Expand Up @@ -257,6 +251,34 @@ configureProxy() {
fi
}

# Check temporary directory for problems
#
# Code: No
# Echo: No
checkTMPDir() {
if [[ -d "$tmp" ]] ; then
if ! checkPerms "DRW" "$tmp" ; then
error "\nYou don't have enough permissions to use directory $tmp\n"
doExit 1
fi
fi

local exec_output

echo -e "#!/usr/bin/env bash\necho 1\n" > "$tmp/rbbuild-exec-check.sh"
chmod 0700 "$tmp/rbbuild-exec-check.sh"

exec_output=$($tmp/rbbuild-exec-check.sh 2>/dev/null)

rm -f "$tmp/rbbuild-exec-check.sh" &> /dev/null

if [[ -z "$exec_output" ]] ; then
error "\nCan't execute the script inside of the temporary directory ($tmp)."
error "Directory mounted with noexec option?\n"
doExit 1
fi
}

# Prepare def file
#
# 1: Path to local or remote def file (String)
Expand Down
5 changes: 4 additions & 1 deletion rbbuild.spec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

Summary: Utility for compiling and installing different ruby versions
Name: rbbuild
Version: 1.10.1
Version: 1.10.2
Release: 0%{?dist}
License: EKOL
Vendor: ESSENTIALKAOS
Expand Down Expand Up @@ -87,6 +87,9 @@ rm -rf %{buildroot}
################################################################################

%changelog
* Tue Jun 30 2020 Anton Novojilov <andy@essentialkaos.com> - 1.10.2-0
- Added check for noexec flag for temporary directory

* Fri Jun 19 2020 Anton Novojilov <andy@essentialkaos.com> - 1.10.1-0
- Improved TruffleRuby builder

Expand Down

0 comments on commit 82e16f8

Please sign in to comment.