[01/45] hbase git commit: HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp. [Forced Update!]

2018-03-08 Thread zhangduo
Repository: hbase
Updated Branches:
  refs/heads/HBASE-19397-branch-2 f4df3fb3d -> c9bcc0b9b (forced update)


HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

Signed-off-by: Mike Drob 
Signed-off-by: Umesh Agashe 
Signed-off-by: Michael Stack 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f5c8713b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f5c8713b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f5c8713b

Branch: refs/heads/HBASE-19397-branch-2
Commit: f5c8713bdd142b7cc6555ad696453504a1dc753c
Parents: cbbefe7
Author: Sean Busbey 
Authored: Mon Mar 5 23:40:25 2018 -0600
Committer: Sean Busbey 
Committed: Wed Mar 7 08:39:19 2018 -0600

--
 dev-support/hbase_nightly_source-artifact.sh  | 11 +--
 dev-support/jenkins-scripts/generate-hbase-website.sh | 13 ++---
 2 files changed, 11 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f5c8713b/dev-support/hbase_nightly_source-artifact.sh
--
diff --git a/dev-support/hbase_nightly_source-artifact.sh 
b/dev-support/hbase_nightly_source-artifact.sh
index 375d121..56a3d46 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -21,7 +21,7 @@ function usage {
   echo "Usage: ${0} [options] /path/to/component/checkout"
   echo ""
   echo "--intermediate-file-dir /path/to/use  Path for writing listings 
and diffs. must exist."
-  echo "  defaults to making a 
directory in /tmp."
+  echo "  defaults to making a 
directory via mktemp."
   echo "--unpack-temp-dir /path/to/usePath for unpacking tarball. 
default to"
   echo "  'unpacked_src_tarball' in 
intermediate directory."
   echo "--maven-m2-initial /path/to/use   Path for maven artifacts 
while building in"
@@ -67,11 +67,10 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-srctarball-test-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  if ! working_dir="$(mktemp -d -t hbase-srctarball-test)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--unpack-temp-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"

http://git-wip-us.apache.org/repos/asf/hbase/blob/f5c8713b/dev-support/jenkins-scripts/generate-hbase-website.sh
--
diff --git a/dev-support/jenkins-scripts/generate-hbase-website.sh 
b/dev-support/jenkins-scripts/generate-hbase-website.sh
index c25c895..b6277d0 100644
--- a/dev-support/jenkins-scripts/generate-hbase-website.sh
+++ b/dev-support/jenkins-scripts/generate-hbase-website.sh
@@ -40,7 +40,7 @@ function usage {
   echo ""
   echo "--working-dir /path/to/use  Path for writing logs and a local 
checkout of hbase-site repo."
   echo "if given must exist."
-  echo "defaults to making a directory in 
/tmp."
+  echo "defaults to making a directory via 
mktemp."
   echo "--local-repo /path/for/maven/.m2  Path for putting local maven 
repo."
   echo "if given must exist."
   echo "defaults to making a clean directory 
in --working-dir."
@@ -77,12 +77,11 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  echo "[DEBUG] defaulting to creating a directory in /tmp"
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-generate-website-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  echo "[DEBUG] defaulting to creating a directory via mktemp"
+  if ! working_dir="$(mktemp -d -t hbase-generate-website)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--working-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"



hbase git commit: HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

2018-03-07 Thread busbey
Repository: hbase
Updated Branches:
  refs/heads/branch-2 cbbefe755 -> f5c8713bd


HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

Signed-off-by: Mike Drob 
Signed-off-by: Umesh Agashe 
Signed-off-by: Michael Stack 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f5c8713b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f5c8713b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f5c8713b

Branch: refs/heads/branch-2
Commit: f5c8713bdd142b7cc6555ad696453504a1dc753c
Parents: cbbefe7
Author: Sean Busbey 
Authored: Mon Mar 5 23:40:25 2018 -0600
Committer: Sean Busbey 
Committed: Wed Mar 7 08:39:19 2018 -0600

--
 dev-support/hbase_nightly_source-artifact.sh  | 11 +--
 dev-support/jenkins-scripts/generate-hbase-website.sh | 13 ++---
 2 files changed, 11 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f5c8713b/dev-support/hbase_nightly_source-artifact.sh
--
diff --git a/dev-support/hbase_nightly_source-artifact.sh 
b/dev-support/hbase_nightly_source-artifact.sh
index 375d121..56a3d46 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -21,7 +21,7 @@ function usage {
   echo "Usage: ${0} [options] /path/to/component/checkout"
   echo ""
   echo "--intermediate-file-dir /path/to/use  Path for writing listings 
and diffs. must exist."
-  echo "  defaults to making a 
directory in /tmp."
+  echo "  defaults to making a 
directory via mktemp."
   echo "--unpack-temp-dir /path/to/usePath for unpacking tarball. 
default to"
   echo "  'unpacked_src_tarball' in 
intermediate directory."
   echo "--maven-m2-initial /path/to/use   Path for maven artifacts 
while building in"
@@ -67,11 +67,10 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-srctarball-test-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  if ! working_dir="$(mktemp -d -t hbase-srctarball-test)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--unpack-temp-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"

http://git-wip-us.apache.org/repos/asf/hbase/blob/f5c8713b/dev-support/jenkins-scripts/generate-hbase-website.sh
--
diff --git a/dev-support/jenkins-scripts/generate-hbase-website.sh 
b/dev-support/jenkins-scripts/generate-hbase-website.sh
index c25c895..b6277d0 100644
--- a/dev-support/jenkins-scripts/generate-hbase-website.sh
+++ b/dev-support/jenkins-scripts/generate-hbase-website.sh
@@ -40,7 +40,7 @@ function usage {
   echo ""
   echo "--working-dir /path/to/use  Path for writing logs and a local 
checkout of hbase-site repo."
   echo "if given must exist."
-  echo "defaults to making a directory in 
/tmp."
+  echo "defaults to making a directory via 
mktemp."
   echo "--local-repo /path/for/maven/.m2  Path for putting local maven 
repo."
   echo "if given must exist."
   echo "defaults to making a clean directory 
in --working-dir."
@@ -77,12 +77,11 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  echo "[DEBUG] defaulting to creating a directory in /tmp"
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-generate-website-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  echo "[DEBUG] defaulting to creating a directory via mktemp"
+  if ! working_dir="$(mktemp -d -t hbase-generate-website)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--working-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"



[16/33] hbase git commit: HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

2018-03-07 Thread zhangduo
HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

Signed-off-by: Mike Drob 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ff7f5ecb
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ff7f5ecb
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ff7f5ecb

Branch: refs/heads/HBASE-19064
Commit: ff7f5ecb0ff8f540730f923d5114b102e6049f5e
Parents: b7fb2df
Author: Sean Busbey 
Authored: Mon Mar 5 23:40:25 2018 -0600
Committer: Sean Busbey 
Committed: Tue Mar 6 12:22:09 2018 -0600

--
 dev-support/hbase_nightly_source-artifact.sh  | 11 +--
 dev-support/jenkins-scripts/generate-hbase-website.sh | 13 ++---
 2 files changed, 11 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ff7f5ecb/dev-support/hbase_nightly_source-artifact.sh
--
diff --git a/dev-support/hbase_nightly_source-artifact.sh 
b/dev-support/hbase_nightly_source-artifact.sh
index b334fa5..9458324 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -21,7 +21,7 @@ function usage {
   echo "Usage: ${0} [options] /path/to/component/checkout"
   echo ""
   echo "--intermediate-file-dir /path/to/use  Path for writing listings 
and diffs. must exist."
-  echo "  defaults to making a 
directory in /tmp."
+  echo "  defaults to making a 
directory via mktemp."
   echo "--unpack-temp-dir /path/to/usePath for unpacking tarball. 
default to"
   echo "  'unpacked_src_tarball' in 
intermediate directory."
   echo "--maven-m2-initial /path/to/use   Path for maven artifacts 
while building in"
@@ -67,11 +67,10 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-srctarball-test-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  if ! working_dir="$(mktemp -d -t hbase-srctarball-test)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--unpack-temp-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"

http://git-wip-us.apache.org/repos/asf/hbase/blob/ff7f5ecb/dev-support/jenkins-scripts/generate-hbase-website.sh
--
diff --git a/dev-support/jenkins-scripts/generate-hbase-website.sh 
b/dev-support/jenkins-scripts/generate-hbase-website.sh
index c25c895..b6277d0 100644
--- a/dev-support/jenkins-scripts/generate-hbase-website.sh
+++ b/dev-support/jenkins-scripts/generate-hbase-website.sh
@@ -40,7 +40,7 @@ function usage {
   echo ""
   echo "--working-dir /path/to/use  Path for writing logs and a local 
checkout of hbase-site repo."
   echo "if given must exist."
-  echo "defaults to making a directory in 
/tmp."
+  echo "defaults to making a directory via 
mktemp."
   echo "--local-repo /path/for/maven/.m2  Path for putting local maven 
repo."
   echo "if given must exist."
   echo "defaults to making a clean directory 
in --working-dir."
@@ -77,12 +77,11 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  echo "[DEBUG] defaulting to creating a directory in /tmp"
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-generate-website-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  echo "[DEBUG] defaulting to creating a directory via mktemp"
+  if ! working_dir="$(mktemp -d -t hbase-generate-website)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--working-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"



[4/4] hbase git commit: HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

2018-03-06 Thread busbey
HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

Signed-off-by: Mike Drob 

 Conflicts:
dev-support/jenkins-scripts/generate-hbase-website.sh


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ee2eba1d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ee2eba1d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ee2eba1d

Branch: refs/heads/branch-1.2
Commit: ee2eba1d670e86d4e6fe8fb8e68268b2b05f73c4
Parents: 86da60d
Author: Sean Busbey 
Authored: Mon Mar 5 23:40:25 2018 -0600
Committer: Sean Busbey 
Committed: Tue Mar 6 12:44:18 2018 -0600

--
 dev-support/hbase_nightly_source-artifact.sh | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ee2eba1d/dev-support/hbase_nightly_source-artifact.sh
--
diff --git a/dev-support/hbase_nightly_source-artifact.sh 
b/dev-support/hbase_nightly_source-artifact.sh
index b334fa5..9458324 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -21,7 +21,7 @@ function usage {
   echo "Usage: ${0} [options] /path/to/component/checkout"
   echo ""
   echo "--intermediate-file-dir /path/to/use  Path for writing listings 
and diffs. must exist."
-  echo "  defaults to making a 
directory in /tmp."
+  echo "  defaults to making a 
directory via mktemp."
   echo "--unpack-temp-dir /path/to/usePath for unpacking tarball. 
default to"
   echo "  'unpacked_src_tarball' in 
intermediate directory."
   echo "--maven-m2-initial /path/to/use   Path for maven artifacts 
while building in"
@@ -67,11 +67,10 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-srctarball-test-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  if ! working_dir="$(mktemp -d -t hbase-srctarball-test)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--unpack-temp-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"



[1/4] hbase git commit: HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

2018-03-06 Thread busbey
Repository: hbase
Updated Branches:
  refs/heads/branch-1 4bdfa342a -> ac6af9f43
  refs/heads/branch-1.2 86da60d7f -> ee2eba1d6
  refs/heads/branch-1.3 4fc36c6e4 -> 57c70a98f
  refs/heads/branch-1.4 1595ceef2 -> c8f4af0e8


HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

Signed-off-by: Mike Drob 

 Conflicts:
dev-support/jenkins-scripts/generate-hbase-website.sh


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ac6af9f4
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ac6af9f4
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ac6af9f4

Branch: refs/heads/branch-1
Commit: ac6af9f43ae9e4081de35995ce942a5a1e94f5f4
Parents: 4bdfa34
Author: Sean Busbey 
Authored: Mon Mar 5 23:40:25 2018 -0600
Committer: Sean Busbey 
Committed: Tue Mar 6 12:41:59 2018 -0600

--
 dev-support/hbase_nightly_source-artifact.sh | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ac6af9f4/dev-support/hbase_nightly_source-artifact.sh
--
diff --git a/dev-support/hbase_nightly_source-artifact.sh 
b/dev-support/hbase_nightly_source-artifact.sh
index 05d3354..cde3b30 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -21,7 +21,7 @@ function usage {
   echo "Usage: ${0} [options] /path/to/component/checkout"
   echo ""
   echo "--intermediate-file-dir /path/to/use  Path for writing listings 
and diffs. must exist."
-  echo "  defaults to making a 
directory in /tmp."
+  echo "  defaults to making a 
directory via mktemp."
   echo "--unpack-temp-dir /path/to/usePath for unpacking tarball. 
default to"
   echo "  'unpacked_src_tarball' in 
intermediate directory."
   echo "--maven-m2-initial /path/to/use   Path for maven artifacts 
while building in"
@@ -61,11 +61,10 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-srctarball-test-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  if ! working_dir="$(mktemp -d -t hbase-srctarball-test)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--unpack-temp-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"



[2/4] hbase git commit: HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

2018-03-06 Thread busbey
HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

Signed-off-by: Mike Drob 

 Conflicts:
dev-support/jenkins-scripts/generate-hbase-website.sh


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c8f4af0e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c8f4af0e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c8f4af0e

Branch: refs/heads/branch-1.4
Commit: c8f4af0e810179c12ce7d78f64164f607838df06
Parents: 1595cee
Author: Sean Busbey 
Authored: Mon Mar 5 23:40:25 2018 -0600
Committer: Sean Busbey 
Committed: Tue Mar 6 12:43:09 2018 -0600

--
 dev-support/hbase_nightly_source-artifact.sh | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c8f4af0e/dev-support/hbase_nightly_source-artifact.sh
--
diff --git a/dev-support/hbase_nightly_source-artifact.sh 
b/dev-support/hbase_nightly_source-artifact.sh
index b334fa5..9458324 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -21,7 +21,7 @@ function usage {
   echo "Usage: ${0} [options] /path/to/component/checkout"
   echo ""
   echo "--intermediate-file-dir /path/to/use  Path for writing listings 
and diffs. must exist."
-  echo "  defaults to making a 
directory in /tmp."
+  echo "  defaults to making a 
directory via mktemp."
   echo "--unpack-temp-dir /path/to/usePath for unpacking tarball. 
default to"
   echo "  'unpacked_src_tarball' in 
intermediate directory."
   echo "--maven-m2-initial /path/to/use   Path for maven artifacts 
while building in"
@@ -67,11 +67,10 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-srctarball-test-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  if ! working_dir="$(mktemp -d -t hbase-srctarball-test)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--unpack-temp-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"



[3/4] hbase git commit: HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

2018-03-06 Thread busbey
HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

Signed-off-by: Mike Drob 

 Conflicts:
dev-support/jenkins-scripts/generate-hbase-website.sh


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/57c70a98
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/57c70a98
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/57c70a98

Branch: refs/heads/branch-1.3
Commit: 57c70a98f8e92a11d044feee770872ad8f7b0032
Parents: 4fc36c6
Author: Sean Busbey 
Authored: Mon Mar 5 23:40:25 2018 -0600
Committer: Sean Busbey 
Committed: Tue Mar 6 12:43:49 2018 -0600

--
 dev-support/hbase_nightly_source-artifact.sh | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/57c70a98/dev-support/hbase_nightly_source-artifact.sh
--
diff --git a/dev-support/hbase_nightly_source-artifact.sh 
b/dev-support/hbase_nightly_source-artifact.sh
index b334fa5..9458324 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -21,7 +21,7 @@ function usage {
   echo "Usage: ${0} [options] /path/to/component/checkout"
   echo ""
   echo "--intermediate-file-dir /path/to/use  Path for writing listings 
and diffs. must exist."
-  echo "  defaults to making a 
directory in /tmp."
+  echo "  defaults to making a 
directory via mktemp."
   echo "--unpack-temp-dir /path/to/usePath for unpacking tarball. 
default to"
   echo "  'unpacked_src_tarball' in 
intermediate directory."
   echo "--maven-m2-initial /path/to/use   Path for maven artifacts 
while building in"
@@ -67,11 +67,10 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-srctarball-test-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  if ! working_dir="$(mktemp -d -t hbase-srctarball-test)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--unpack-temp-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"



[1/2] hbase git commit: HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

2018-03-06 Thread busbey
Repository: hbase
Updated Branches:
  refs/heads/master b7fb2df15 -> 7889df371


HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.

Signed-off-by: Mike Drob 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ff7f5ecb
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ff7f5ecb
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ff7f5ecb

Branch: refs/heads/master
Commit: ff7f5ecb0ff8f540730f923d5114b102e6049f5e
Parents: b7fb2df
Author: Sean Busbey 
Authored: Mon Mar 5 23:40:25 2018 -0600
Committer: Sean Busbey 
Committed: Tue Mar 6 12:22:09 2018 -0600

--
 dev-support/hbase_nightly_source-artifact.sh  | 11 +--
 dev-support/jenkins-scripts/generate-hbase-website.sh | 13 ++---
 2 files changed, 11 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/ff7f5ecb/dev-support/hbase_nightly_source-artifact.sh
--
diff --git a/dev-support/hbase_nightly_source-artifact.sh 
b/dev-support/hbase_nightly_source-artifact.sh
index b334fa5..9458324 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -21,7 +21,7 @@ function usage {
   echo "Usage: ${0} [options] /path/to/component/checkout"
   echo ""
   echo "--intermediate-file-dir /path/to/use  Path for writing listings 
and diffs. must exist."
-  echo "  defaults to making a 
directory in /tmp."
+  echo "  defaults to making a 
directory via mktemp."
   echo "--unpack-temp-dir /path/to/usePath for unpacking tarball. 
default to"
   echo "  'unpacked_src_tarball' in 
intermediate directory."
   echo "--maven-m2-initial /path/to/use   Path for maven artifacts 
while building in"
@@ -67,11 +67,10 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-srctarball-test-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  if ! working_dir="$(mktemp -d -t hbase-srctarball-test)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--unpack-temp-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"

http://git-wip-us.apache.org/repos/asf/hbase/blob/ff7f5ecb/dev-support/jenkins-scripts/generate-hbase-website.sh
--
diff --git a/dev-support/jenkins-scripts/generate-hbase-website.sh 
b/dev-support/jenkins-scripts/generate-hbase-website.sh
index c25c895..b6277d0 100644
--- a/dev-support/jenkins-scripts/generate-hbase-website.sh
+++ b/dev-support/jenkins-scripts/generate-hbase-website.sh
@@ -40,7 +40,7 @@ function usage {
   echo ""
   echo "--working-dir /path/to/use  Path for writing logs and a local 
checkout of hbase-site repo."
   echo "if given must exist."
-  echo "defaults to making a directory in 
/tmp."
+  echo "defaults to making a directory via 
mktemp."
   echo "--local-repo /path/for/maven/.m2  Path for putting local maven 
repo."
   echo "if given must exist."
   echo "defaults to making a clean directory 
in --working-dir."
@@ -77,12 +77,11 @@ fi
 component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 
 if [ -z "${working_dir}" ]; then
-  echo "[DEBUG] defaulting to creating a directory in /tmp"
-  working_dir=/tmp
-  while [[ -e ${working_dir} ]]; do
-working_dir=/tmp/hbase-generate-website-${RANDOM}.${RANDOM}
-  done
-  mkdir "${working_dir}"
+  echo "[DEBUG] defaulting to creating a directory via mktemp"
+  if ! working_dir="$(mktemp -d -t hbase-generate-website)" ; then
+echo "Failed to create temporary working directory. Please specify via 
--working-dir"
+exit 1
+  fi
 else
   # absolutes please
   working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename 
"${working_dir}")"