[beakerlib] release 1.9-2

Dalibor Pospisil sopos at fedoraproject.org
Tue Jul 1 15:15:07 UTC 2014


commit e1b6086b0dd404417f73341461090b12fa14370b
Author: Dalibor Pospisil <dapospis at redhat.com>
Date:   Tue Jul 1 16:55:33 2014 +0200

    release 1.9-2

 0001-fixed-problem-with-IFS-other-that-space.patch |   25 +++
 ...-with-wrong-number-parameters-passed-to-b.patch |   34 ++++
 ...h-and-rlUnhash-to-unify-hashing-in-variou.patch |  165 ++++++++++++++++++++
 ...d-base64_-algorithm-defaul-algorithm-chan.patch |   55 +++++++
 ...Hash-added-option-a-as-alias-to-algorithm.patch |   32 ++++
 ...FILEBACKUP_SET_PATH_CLEAN-__INTERNAL_FILE.patch |   49 ++++++
 ...rlIsDistro-suppressed-output-of-expr-spee.patch |   49 ++++++
 0008-use-local-variable-instead-of-parameter.patch |   38 +++++
 0009-stored-namespace-key-cannot-be-empty.patch    |   34 ++++
 ...leRequires-fixed-space-at-the-end-and-pos.patch |   36 +++++
 ...m-package-also-in-non-asserted-rpm-checks.patch |   35 ++++
 ...irements-completely-supress-output-of-rlC.patch |   26 +++
 0013-add-srpm-info-to-journal-bz1071693.patch      |   24 +++
 0014-supress-storage-data-in-non-debug-mode.patch  |   31 ++++
 beakerlib.spec                                     |   34 ++++-
 15 files changed, 666 insertions(+), 1 deletions(-)
---
diff --git a/0001-fixed-problem-with-IFS-other-that-space.patch b/0001-fixed-problem-with-IFS-other-that-space.patch
new file mode 100644
index 0000000..baeb31b
--- /dev/null
+++ b/0001-fixed-problem-with-IFS-other-that-space.patch
@@ -0,0 +1,25 @@
+From e87f1d78661aeb04f1be7498e14f6dc74c0c83a1 Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Wed, 18 Jun 2014 15:27:51 +0200
+Subject: [PATCH 01/14] fixed problem with IFS other that space
+
+---
+ src/journal.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/journal.sh b/src/journal.sh
+index ecd375c..346c5d0 100644
+--- a/src/journal.sh
++++ b/src/journal.sh
+@@ -390,7 +390,7 @@ rljClosePhase(){
+ }
+ 
+ rljAddTest(){
+-    if ! $__INTERNAL_JOURNALIST test --message "$1" --result "$2" ${3:+--command "$3"}
++    if ! eval "$__INTERNAL_JOURNALIST test --message \"\$1\" --result \"\$2\" ${3:+--command \"\$3\"}"
+     then
+       # Failed to add a test: there is no phase open
+       # So we open it, add a test, add a FAIL to let the user know
+-- 
+1.9.3
+
diff --git a/0002-fixed-issue-with-wrong-number-parameters-passed-to-b.patch b/0002-fixed-issue-with-wrong-number-parameters-passed-to-b.patch
new file mode 100644
index 0000000..89f9b52
--- /dev/null
+++ b/0002-fixed-issue-with-wrong-number-parameters-passed-to-b.patch
@@ -0,0 +1,34 @@
+From 32a0abbee3f5d4b0f167783c7e1b1cc9fce205e2 Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Wed, 18 Jun 2014 15:58:58 +0200
+Subject: [PATCH 02/14] fixed issue with wrong number parameters passed to
+ bstor
+
+---
+ src/storage.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/storage.sh b/src/storage.sh
+index 820a8bb..156424b 100644
+--- a/src/storage.sh
++++ b/src/storage.sh
+@@ -42,13 +42,13 @@ There are currently no public functions in this module
+ __INTERNAL_STORAGE_BIN=beakerlib-storage
+ 
+ __INTERNAL_ST_GET() {
+-	$__INTERNAL_STORAGE_BIN get $@
++	$__INTERNAL_STORAGE_BIN get "$@"
+ }
+ 
+ __INTERNAL_ST_PUT() {
+-	$__INTERNAL_STORAGE_BIN put $@
++	$__INTERNAL_STORAGE_BIN put "$@"
+ }
+ 
+ __INTERNAL_ST_PRUNE() {
+-	$__INTERNAL_STORAGE_BIN prune $@
++	$__INTERNAL_STORAGE_BIN prune "$@"
+ }
+-- 
+1.9.3
+
diff --git a/0003-added-rlHash-and-rlUnhash-to-unify-hashing-in-variou.patch b/0003-added-rlHash-and-rlUnhash-to-unify-hashing-in-variou.patch
new file mode 100644
index 0000000..f2810a4
--- /dev/null
+++ b/0003-added-rlHash-and-rlUnhash-to-unify-hashing-in-variou.patch
@@ -0,0 +1,165 @@
+From 3c1725d768874c069e78e792a4f538386acf5ab4 Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Wed, 18 Jun 2014 18:05:46 +0200
+Subject: [PATCH 03/14] added rlHash and rlUnhash to unify hashing in various
+ places
+
+---
+ src/infrastructure.sh | 91 ++++++++++++++++++++++++++++++++++++++++++++++++---
+ src/libraries.sh      |  8 ++---
+ 2 files changed, 91 insertions(+), 8 deletions(-)
+
+diff --git a/src/infrastructure.sh b/src/infrastructure.sh
+index cf434d5..8c8d7c7 100644
+--- a/src/infrastructure.sh
++++ b/src/infrastructure.sh
+@@ -332,6 +332,89 @@ rlAssertMount() {
+ }
+ 
+ 
++: <<'=cut'
++=pod
++
++=head3 rlHash, rlUnhash
++
++Hashes/Unhashes given string.
++
++    rlHash [--decode] [--algorithm HASH_ALG] --stdin|STRING
++    rlUnhash [--algorithm HASH_ALG] --stdin|STRING
++
++=over
++
++=item --decode
++
++Unhash given string.
++
++=item --algorithm
++
++Use given hash algorithm.
++Currently supported algorithms:
++  base64
++  hex
++
++Defaults to base64.
++Default algorithm can be override using global variable rlHashAlgorithm.
++
++=item --stdin
++
++Get the string from stdin.
++
++=item STRING
++
++String to be hashed/unhashed.
++
++=back
++
++Returns 0 if success.
++
++=head4 Example with --clean:
++
++    hash=rlHash "text"
++
++=cut
++
++rlHash() {
++  local GETOPT=$(getopt -q -o : -l decode,algorithm:,stdin -- "$@"); eval set -- "$GETOPT"
++  local decode=0 alg="$rlHashAlgorithm" stdin=0
++  while true; do
++    case $1 in
++      --)          shift; break ;;
++      --decode)    decode=1 ;;
++      --algorithm) shift; alg="$1" ;;
++      --stdin)     stdin=1 ;;
++    esac
++    shift
++  done
++  [[ "$alg" =~ ^(base64|hex)$ ]] || alg='base64'
++  local text="$1" command
++
++  case $alg in
++    base64)
++      if [[ $decode -eq 0 ]]; then
++        command="base64 --wrap 0 | tr '=' '.'"
++      else
++        command="tr '.' '=' | base64 --decode"
++      fi
++      ;;
++    hex)
++      if [[ $decode -eq 0 ]]; then
++        command="od -A n -t x1 -v | tr -d ' \n\t'"
++      else
++        command="sed 's/\([0-9a-zA-Z]\{2\}\)/\\\x\1/g' | echo -en \"\$(cat -)\""
++      fi
++      ;;
++  esac
++
++  eval "( [[ \$stdin -eq 1 ]] && cat - || echo -n \"\$text\" ) | $command"
++}
++
++rlUnhash() {
++  rlHash --decode "$@"
++}
++
+ 
+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ # rlFileBackup
+@@ -387,10 +470,10 @@ __INTERNAL_FILEBACKUP_NAMESPACE="rlFileBackupNamespace"
+ 
+ __INTERNAL_FILEBACKUP_SET_PATH_CLEAN() {
+   local path="$1"
+-  local path_encoded="$( echo $1 | base64 )"
++  local path_encoded="$( rlHash "$1" )"
+ 
+   local namespace="$2"
+-  local namespace_encoded="$( echo $2 | base64 | tr "=" "." )"
++  local namespace_encoded="$( rlHash "$2" )"
+ 
+   rlLogDebug "rlFileBackup: Setting up the cleaning lists"
+   rlLogDebug "rlFileBackup: Path [$path] Encoded [$path_encoded]"
+@@ -408,7 +491,7 @@ __INTERNAL_FILEBACKUP_SET_PATH_CLEAN() {
+ 
+ __INTERNAL_FILEBACKUP_CLEAN_PATHS() {
+   local namespace="$1"
+-  local namespace_encoded="$( echo $1 | base64 | tr "=" "." )"
++  local namespace_encoded="$( rlHash "$1" )"
+ 
+   rlLogDebug "rlFileRestore: Fetching clean-up lists for namespace: [$namespace] (encoded as [$namespace_encoded])"
+ 
+@@ -419,7 +502,7 @@ __INTERNAL_FILEBACKUP_CLEAN_PATHS() {
+   local path
+   for path in $PATHS
+   do
+-    local path_decoded="$( echo $path | base64 -d )"
++    local path_decoded="$( rlUnhash "$path" )"
+     if rm -rf "$path_decoded";
+     then
+       rlLogDebug "rlFileRestore: Cleaning $path_decoded successful"
+diff --git a/src/libraries.sh b/src/libraries.sh
+index 7dfd736..667b3da 100644
+--- a/src/libraries.sh
++++ b/src/libraries.sh
+@@ -271,8 +271,8 @@ rlImport() {
+     local COMPONENT=$( echo $PROCESSING | cut -d '/' -f 1 )
+     local LIBRARY=$( echo $PROCESSING | cut -d '/' -f 2 )
+ 
+-    local COMPONENT_hash=$( echo -n "$COMPONENT" | od -A n -t x1 -v | tr -d ' \n\t' )
+-    local LIBRARY_hash=$( echo -n "$LIBRARY" | od -A n -t x1 -v | tr -d ' \n\t' )
++    local COMPONENT_hash=$( rlHash --algorithm hex "$COMPONENT" )
++    local LIBRARY_hash=$( rlHash --algorithm hex "$LIBRARY" )
+     local LOCATIONS_varname="__INTERNAL_LIBRARY_LOCATIONS_C${COMPONENT_hash}_L${LIBRARY_hash}"
+     local IMPORTS_varname="__INTERNAL_LIBRARY_IMPORTS_C${COMPONENT_hash}_L${LIBRARY_hash}"
+ 
+@@ -329,8 +329,8 @@ rlImport() {
+   do
+     local COMPONENT=$( echo $library | cut -d '/' -f 1 )
+     local LIBRARY=$( echo $library | cut -d '/' -f 2 )
+-    local COMPONENT_hash=$( echo -n "$COMPONENT" | od -A n -t x1 -v | tr -d ' \n\t' )
+-    local LIBRARY_hash=$( echo -n "$LIBRARY" | od -A n -t x1 -v | tr -d ' \n\t' )
++    local COMPONENT_hash=$( rlHash --algorithm hex "$COMPONENT" )
++    local LIBRARY_hash=$( rlHash --algorithm hex "$LIBRARY" )
+     local LOCATIONS_varname="__INTERNAL_LIBRARY_LOCATIONS_C${COMPONENT_hash}_L${LIBRARY_hash}"
+     local IMPORTS_varname="__INTERNAL_LIBRARY_IMPORTS_C${COMPONENT_hash}_L${LIBRARY_hash}"
+     [ "${!IMPORTS_varname}" != "LOC" ] && {
+-- 
+1.9.3
+
diff --git a/0004-rlHash-added-base64_-algorithm-defaul-algorithm-chan.patch b/0004-rlHash-added-base64_-algorithm-defaul-algorithm-chan.patch
new file mode 100644
index 0000000..7e790db
--- /dev/null
+++ b/0004-rlHash-added-base64_-algorithm-defaul-algorithm-chan.patch
@@ -0,0 +1,55 @@
+From 63e3522f06c63cbbd3192ebe99c8d4bae3c859a0 Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Thu, 19 Jun 2014 12:00:45 +0200
+Subject: [PATCH 04/14] rlHash: added base64_ algorithm, defaul algorithm
+ changed to hex
+
+---
+ src/infrastructure.sh | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/src/infrastructure.sh b/src/infrastructure.sh
+index 8c8d7c7..66643e3 100644
+--- a/src/infrastructure.sh
++++ b/src/infrastructure.sh
+@@ -353,9 +353,10 @@ Unhash given string.
+ Use given hash algorithm.
+ Currently supported algorithms:
+   base64
++  base64_ - this is standard base64 where '=' is replaced by '_'
+   hex
+ 
+-Defaults to base64.
++Defaults to hex.
+ Default algorithm can be override using global variable rlHashAlgorithm.
+ 
+ =item --stdin
+@@ -388,15 +389,22 @@ rlHash() {
+     esac
+     shift
+   done
+-  [[ "$alg" =~ ^(base64|hex)$ ]] || alg='base64'
++  [[ "$alg" =~ ^(base64|base64_|hex)$ ]] || alg='hex'
+   local text="$1" command
+ 
+   case $alg in
+     base64)
+       if [[ $decode -eq 0 ]]; then
+-        command="base64 --wrap 0 | tr '=' '.'"
++        command="base64 --wrap 0"
+       else
+-        command="tr '.' '=' | base64 --decode"
++        command="base64 --decode"
++      fi
++      ;;
++    base64_)
++      if [[ $decode -eq 0 ]]; then
++        command="base64 --wrap 0 | tr '=' '_'"
++      else
++        command="tr '_' '=' | base64 --decode"
+       fi
+       ;;
+     hex)
+-- 
+1.9.3
+
diff --git a/0005-rlHash-added-option-a-as-alias-to-algorithm.patch b/0005-rlHash-added-option-a-as-alias-to-algorithm.patch
new file mode 100644
index 0000000..597ff1f
--- /dev/null
+++ b/0005-rlHash-added-option-a-as-alias-to-algorithm.patch
@@ -0,0 +1,32 @@
+From c6581dea1d7b7667806a7f2a47208859443f29bf Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Thu, 19 Jun 2014 12:02:27 +0200
+Subject: [PATCH 05/14] rlHash: added option -a as alias to --algorithm
+
+---
+ src/infrastructure.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/infrastructure.sh b/src/infrastructure.sh
+index 66643e3..53d7c27 100644
+--- a/src/infrastructure.sh
++++ b/src/infrastructure.sh
+@@ -378,13 +378,13 @@ Returns 0 if success.
+ =cut
+ 
+ rlHash() {
+-  local GETOPT=$(getopt -q -o : -l decode,algorithm:,stdin -- "$@"); eval set -- "$GETOPT"
++  local GETOPT=$(getopt -q -o a: -l decode,algorithm:,stdin -- "$@"); eval set -- "$GETOPT"
+   local decode=0 alg="$rlHashAlgorithm" stdin=0
+   while true; do
+     case $1 in
+       --)          shift; break ;;
+       --decode)    decode=1 ;;
+-      --algorithm) shift; alg="$1" ;;
++      -a|--algorithm) shift; alg="$1" ;;
+       --stdin)     stdin=1 ;;
+     esac
+     shift
+-- 
+1.9.3
+
diff --git a/0006-__INTERNAL_FILEBACKUP_SET_PATH_CLEAN-__INTERNAL_FILE.patch b/0006-__INTERNAL_FILEBACKUP_SET_PATH_CLEAN-__INTERNAL_FILE.patch
new file mode 100644
index 0000000..571f966
--- /dev/null
+++ b/0006-__INTERNAL_FILEBACKUP_SET_PATH_CLEAN-__INTERNAL_FILE.patch
@@ -0,0 +1,49 @@
+From c548479c6d9d00e5e21c531e3c60668005602e62 Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Thu, 19 Jun 2014 12:04:46 +0200
+Subject: [PATCH 06/14] __INTERNAL_FILEBACKUP_SET_PATH_CLEAN,
+ __INTERNAL_FILEBACKUP_CLEAN_PATHS: use hex hash instead of base64 - fixes
+ problems with case sensitivity
+
+---
+ src/infrastructure.sh | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/infrastructure.sh b/src/infrastructure.sh
+index 53d7c27..9c1dfbb 100644
+--- a/src/infrastructure.sh
++++ b/src/infrastructure.sh
+@@ -478,10 +478,10 @@ __INTERNAL_FILEBACKUP_NAMESPACE="rlFileBackupNamespace"
+ 
+ __INTERNAL_FILEBACKUP_SET_PATH_CLEAN() {
+   local path="$1"
+-  local path_encoded="$( rlHash "$1" )"
++  local path_encoded="$( rlHash -a hex "$1" )"
+ 
+   local namespace="$2"
+-  local namespace_encoded="$( rlHash "$2" )"
++  local namespace_encoded="$( rlHash -a hex "$2" )"
+ 
+   rlLogDebug "rlFileBackup: Setting up the cleaning lists"
+   rlLogDebug "rlFileBackup: Path [$path] Encoded [$path_encoded]"
+@@ -499,7 +499,7 @@ __INTERNAL_FILEBACKUP_SET_PATH_CLEAN() {
+ 
+ __INTERNAL_FILEBACKUP_CLEAN_PATHS() {
+   local namespace="$1"
+-  local namespace_encoded="$( rlHash "$1" )"
++  local namespace_encoded="$( rlHash -a hex "$1" )"
+ 
+   rlLogDebug "rlFileRestore: Fetching clean-up lists for namespace: [$namespace] (encoded as [$namespace_encoded])"
+ 
+@@ -510,7 +510,7 @@ __INTERNAL_FILEBACKUP_CLEAN_PATHS() {
+   local path
+   for path in $PATHS
+   do
+-    local path_decoded="$( rlUnhash "$path" )"
++    local path_decoded="$( rlUnhash -a hex "$path" )"
+     if rm -rf "$path_decoded";
+     then
+       rlLogDebug "rlFileRestore: Cleaning $path_decoded successful"
+-- 
+1.9.3
+
diff --git a/0007-__INTERNAL_rlIsDistro-suppressed-output-of-expr-spee.patch b/0007-__INTERNAL_rlIsDistro-suppressed-output-of-expr-spee.patch
new file mode 100644
index 0000000..db781f5
--- /dev/null
+++ b/0007-__INTERNAL_rlIsDistro-suppressed-output-of-expr-spee.patch
@@ -0,0 +1,49 @@
+From 8c099d741e243e5daa09d1e1674675badc5f3bf3 Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Thu, 19 Jun 2014 12:09:11 +0200
+Subject: [PATCH 07/14] __INTERNAL_rlIsDistro: suppressed output of expr, speed
+ optimization
+
+---
+ src/testing.sh | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/src/testing.sh b/src/testing.sh
+index afa7554..6c57bfc 100644
+--- a/src/testing.sh
++++ b/src/testing.sh
+@@ -997,24 +997,23 @@ __INTERNAL_rlIsDistro(){
+   echo $distro | grep -q "$1" || return 1
+   shift
+ 
+-  [ -z "$1" ] && return 0
++  [[ -z "$1" ]] && return 0
+ 
+   local arg
+   for arg in "$@"
+   do
+     # sanity check - version needs to consist of numbers/dots/<=>
+-    expr match "$arg" '[<=>]*[0-9][0-9\.]*$' >/dev/null || return 1
++    [[ "$arg" =~ ^([\<=\>]*)([0-9][0-9\.]*)$ ]] || return 1
+ 
+-    sign="$(echo $arg | grep -Eo '^[<=>]+')"
+-    if [ -z "$sign" ]; then
+-      if [ "$arg" == "$whole" ] || [ "$arg" == "$major" ]
++    sign="${BASH_REMATCH[1]}"
++    arg="${BASH_REMATCH[2]}"
++    if [[ -z "$sign" ]]; then
++      if [[ "$arg" == "$major" || "$arg" == "$whole" ]]
+       then
+         return 0
+       fi
+     else
+-      # <=> match
+-      arg="$(echo $arg | sed -r 's/^[<=>]+//')"
+-      if expr index '.' $arg; then
++      if [[ "$arg" =~ \. ]]; then
+         __INTERNAL_test_version "$whole" "$sign" "$arg"
+       else
+         __INTERNAL_test_version "$major" "$sign" "$arg"
+-- 
+1.9.3
+
diff --git a/0008-use-local-variable-instead-of-parameter.patch b/0008-use-local-variable-instead-of-parameter.patch
new file mode 100644
index 0000000..286ae1a
--- /dev/null
+++ b/0008-use-local-variable-instead-of-parameter.patch
@@ -0,0 +1,38 @@
+From 3ea77a1e2b8af613e8dc57b8783b562a268d16d9 Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Fri, 20 Jun 2014 09:53:27 +0200
+Subject: [PATCH 08/14] use local variable instead of parameter
+
+---
+ src/infrastructure.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/infrastructure.sh b/src/infrastructure.sh
+index 9c1dfbb..b821f10 100644
+--- a/src/infrastructure.sh
++++ b/src/infrastructure.sh
+@@ -478,10 +478,10 @@ __INTERNAL_FILEBACKUP_NAMESPACE="rlFileBackupNamespace"
+ 
+ __INTERNAL_FILEBACKUP_SET_PATH_CLEAN() {
+   local path="$1"
+-  local path_encoded="$( rlHash -a hex "$1" )"
++  local path_encoded="$( rlHash -a hex "$path" )"
+ 
+   local namespace="$2"
+-  local namespace_encoded="$( rlHash -a hex "$2" )"
++  local namespace_encoded="$( rlHash -a hex "$namespace" )"
+ 
+   rlLogDebug "rlFileBackup: Setting up the cleaning lists"
+   rlLogDebug "rlFileBackup: Path [$path] Encoded [$path_encoded]"
+@@ -499,7 +499,7 @@ __INTERNAL_FILEBACKUP_SET_PATH_CLEAN() {
+ 
+ __INTERNAL_FILEBACKUP_CLEAN_PATHS() {
+   local namespace="$1"
+-  local namespace_encoded="$( rlHash -a hex "$1" )"
++  local namespace_encoded="$( rlHash -a hex "$namespace" )"
+ 
+   rlLogDebug "rlFileRestore: Fetching clean-up lists for namespace: [$namespace] (encoded as [$namespace_encoded])"
+ 
+-- 
+1.9.3
+
diff --git a/0009-stored-namespace-key-cannot-be-empty.patch b/0009-stored-namespace-key-cannot-be-empty.patch
new file mode 100644
index 0000000..c23e4c0
--- /dev/null
+++ b/0009-stored-namespace-key-cannot-be-empty.patch
@@ -0,0 +1,34 @@
+From e42f31656c381ca04ad9875bb9432b677c1486ba Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Fri, 20 Jun 2014 09:54:27 +0200
+Subject: [PATCH 09/14] stored namespace (key) cannot be empty
+
+---
+ src/infrastructure.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/infrastructure.sh b/src/infrastructure.sh
+index b821f10..ac2b990 100644
+--- a/src/infrastructure.sh
++++ b/src/infrastructure.sh
+@@ -480,7 +480,7 @@ __INTERNAL_FILEBACKUP_SET_PATH_CLEAN() {
+   local path="$1"
+   local path_encoded="$( rlHash -a hex "$path" )"
+ 
+-  local namespace="$2"
++  local namespace="_$2"
+   local namespace_encoded="$( rlHash -a hex "$namespace" )"
+ 
+   rlLogDebug "rlFileBackup: Setting up the cleaning lists"
+@@ -498,7 +498,7 @@ __INTERNAL_FILEBACKUP_SET_PATH_CLEAN() {
+ }
+ 
+ __INTERNAL_FILEBACKUP_CLEAN_PATHS() {
+-  local namespace="$1"
++  local namespace="_$1"
+   local namespace_encoded="$( rlHash -a hex "$namespace" )"
+ 
+   rlLogDebug "rlFileRestore: Fetching clean-up lists for namespace: [$namespace] (encoded as [$namespace_encoded])"
+-- 
+1.9.3
+
diff --git a/0010-rlGetMakefileRequires-fixed-space-at-the-end-and-pos.patch b/0010-rlGetMakefileRequires-fixed-space-at-the-end-and-pos.patch
new file mode 100644
index 0000000..8b7058d
--- /dev/null
+++ b/0010-rlGetMakefileRequires-fixed-space-at-the-end-and-pos.patch
@@ -0,0 +1,36 @@
+From 45352d826ae39f5e6a971b42edfa285012fde8ac Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Fri, 20 Jun 2014 15:41:07 +0200
+Subject: [PATCH 10/14] rlGetMakefileRequires: fixed space at the end and
+ possible other space issues
+
+---
+ src/rpms.sh | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/rpms.sh b/src/rpms.sh
+index 2b467dc..577b790 100644
+--- a/src/rpms.sh
++++ b/src/rpms.sh
+@@ -367,7 +367,8 @@ rlAssertBinaryOrigin() {
+ 
+ =head3 rlGetMakefileRequires
+ 
+-Prints a list of requirements defined in Makefile using 'Requires' attribute.
++Prints comma separated list of requirements defined in Makefile using 'Requires'
++attribute.
+ 
+ Return 0 if success.
+ 
+@@ -378,7 +379,7 @@ rlGetMakefileRequires() {
+     rlLogError "Could not find ./Makefile or the file is empty"
+     return 1
+   }
+-  grep '"Requires:' Makefile | sed -e 's/.*Requires: *\(.*\)".*/\1/' | tr ' ' '\n' | sort | uniq | tr '\n' ' '
++  grep '"Requires:' Makefile | sed -e 's/.*Requires: *\(.*\)".*/\1/' | tr ' ' '\n' | sort | uniq | tr '\n' ' ' | sed -r 's/^ +//;s/ +$//;s/ +/ /g'
+   return 0
+ }; # end of rlGetMakefileRequires
+ 
+-- 
+1.9.3
+
diff --git a/0011-log-rpm-package-also-in-non-asserted-rpm-checks.patch b/0011-log-rpm-package-also-in-non-asserted-rpm-checks.patch
new file mode 100644
index 0000000..3b9df8c
--- /dev/null
+++ b/0011-log-rpm-package-also-in-non-asserted-rpm-checks.patch
@@ -0,0 +1,35 @@
+From 4b18539c6e02753a1df3453d7cb082bc4608526c Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Fri, 20 Jun 2014 16:38:35 +0200
+Subject: [PATCH 11/14] log rpm package also in non asserted rpm checks
+
+---
+ src/rpms.sh | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/rpms.sh b/src/rpms.sh
+index 577b790..c9edd0c 100644
+--- a/src/rpms.sh
++++ b/src/rpms.sh
+@@ -62,6 +62,9 @@ __INTERNAL_RpmPresent() {
+     [ "$release" == "" ] && package=$name-$version
+     [ "$version" == "" ] && package=$name
+ 
++    export __INTERNAL_RPM_ASSERTED_PACKAGES="$__INTERNAL_RPM_ASSERTED_PACKAGES $name"
++    rljRpmLog "$name"
++
+     if [ -n "$package" ]; then
+         rpm -q $package
+         local status=$?
+@@ -199,8 +202,6 @@ rlAssertRpm() {
+             rlAssertRpm $package
+         done
+     else
+-        export __INTERNAL_RPM_ASSERTED_PACKAGES="$__INTERNAL_RPM_ASSERTED_PACKAGES $1"
+-        rljRpmLog "$1"
+         __INTERNAL_RpmPresent assert $1 $2 $3 $4
+     fi
+ }
+-- 
+1.9.3
+
diff --git a/0012-rlCheckRequirements-completely-supress-output-of-rlC.patch b/0012-rlCheckRequirements-completely-supress-output-of-rlC.patch
new file mode 100644
index 0000000..30815cb
--- /dev/null
+++ b/0012-rlCheckRequirements-completely-supress-output-of-rlC.patch
@@ -0,0 +1,26 @@
+From 97136d5fdd04c69a02fce862953df670e471c4c7 Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Mon, 23 Jun 2014 02:35:06 +0200
+Subject: [PATCH 12/14] rlCheckRequirements: completely supress output of
+ rlCheckRpm
+
+---
+ src/rpms.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rpms.sh b/src/rpms.sh
+index c9edd0c..a2a96a4 100644
+--- a/src/rpms.sh
++++ b/src/rpms.sh
+@@ -418,7 +418,7 @@ rlCheckRequirements() {
+     package="$(rpm -q "$req" 2> /dev/null)"
+     if [[ $? -eq 0 ]]; then
+       rlLog "requirement '$req' covered by package '$package'"
+-      rlCheckRpm "$package" > /dev/null
++      rlCheckRpm "$package" > /dev/null 2>&1
+     else
+       binary="$(which "$req" 2> /dev/null)"
+       if [[ $? -eq 0 ]]; then
+-- 
+1.9.3
+
diff --git a/0013-add-srpm-info-to-journal-bz1071693.patch b/0013-add-srpm-info-to-journal-bz1071693.patch
new file mode 100644
index 0000000..3e9ed5b
--- /dev/null
+++ b/0013-add-srpm-info-to-journal-bz1071693.patch
@@ -0,0 +1,24 @@
+From f396fa1f9a876ff6829afbd94278e29402f0ea36 Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Tue, 1 Jul 2014 14:23:12 +0200
+Subject: [PATCH 13/14] add srpm info to journal, bz1071693
+
+---
+ src/python/journalling.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/python/journalling.py b/src/python/journalling.py
+index 7a107a0..7ab824c 100755
+--- a/src/python/journalling.py
++++ b/src/python/journalling.py
+@@ -328,6 +328,7 @@ class Journal(object):
+ 
+     for pkg in mi:
+       pkgDetailsEl = xmldoc.createElement("pkgdetails")
++      pkgDetailsEl.setAttribute('sourcerpm', pkg['sourcerpm'])
+       pkgDetailsCon = xmldoc.createTextNode("%(name)s-%(version)s-%(release)s.%(arch)s " % pkg)
+       rpms.append((pkgDetailsEl, pkgDetailsCon))
+ 
+-- 
+1.9.3
+
diff --git a/0014-supress-storage-data-in-non-debug-mode.patch b/0014-supress-storage-data-in-non-debug-mode.patch
new file mode 100644
index 0000000..47c19ed
--- /dev/null
+++ b/0014-supress-storage-data-in-non-debug-mode.patch
@@ -0,0 +1,31 @@
+From 8c1773e0cbcd826a1f31e48ae57855c90df64396 Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Tue, 1 Jul 2014 14:24:37 +0200
+Subject: [PATCH 14/14] supress storage data in non-debug mode
+
+---
+ src/infrastructure.sh | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/infrastructure.sh b/src/infrastructure.sh
+index ac2b990..f57a2e4 100644
+--- a/src/infrastructure.sh
++++ b/src/infrastructure.sh
+@@ -491,10 +491,13 @@ __INTERNAL_FILEBACKUP_SET_PATH_CLEAN() {
+   if [ -z "$CURRENT" ]
+   then
+     __INTERNAL_ST_PUT --namespace="$__INTERNAL_FILEBACKUP_NAMESPACE" $namespace_encoded $path_encoded
+-    cat "$BEAKERLIB_DIR/storage/$__INTERNAL_FILEBACKUP_NAMESPACE"
+   else
+     __INTERNAL_ST_PUT --namespace="$__INTERNAL_FILEBACKUP_NAMESPACE" $namespace_encoded "$CURRENT $path_encoded"
+   fi
++  [[ -n "$DEBUG" ]] && {
++    rlLogDebug "stored data:"
++    cat "$BEAKERLIB_DIR/storage/$__INTERNAL_FILEBACKUP_NAMESPACE"
++  }
+ }
+ 
+ __INTERNAL_FILEBACKUP_CLEAN_PATHS() {
+-- 
+1.9.3
+
diff --git a/beakerlib.spec b/beakerlib.spec
index 4ce3dc2..a24c37e 100644
--- a/beakerlib.spec
+++ b/beakerlib.spec
@@ -1,7 +1,7 @@
 Name:       beakerlib
 Summary:    A shell-level integration testing library
 Version:    1.9
-Release:    1%{?dist}
+Release:    2%{?dist}
 License:    GPLv2
 Group:      Development/Libraries
 BuildRoot:  %{_tmppath}/%{name}-%{version}-root
@@ -14,6 +14,21 @@ Requires:   python2
 Requires:   grep
 Requires:   sed
 BuildRequires: /usr/bin/pod2man
+Patch0: 0001-fixed-problem-with-IFS-other-that-space.patch
+Patch1: 0002-fixed-issue-with-wrong-number-parameters-passed-to-b.patch
+Patch2: 0003-added-rlHash-and-rlUnhash-to-unify-hashing-in-variou.patch
+Patch3: 0004-rlHash-added-base64_-algorithm-defaul-algorithm-chan.patch
+Patch4: 0005-rlHash-added-option-a-as-alias-to-algorithm.patch
+Patch5: 0006-__INTERNAL_FILEBACKUP_SET_PATH_CLEAN-__INTERNAL_FILE.patch
+Patch6: 0007-__INTERNAL_rlIsDistro-suppressed-output-of-expr-spee.patch
+Patch7: 0008-use-local-variable-instead-of-parameter.patch
+Patch8: 0009-stored-namespace-key-cannot-be-empty.patch
+Patch9: 0010-rlGetMakefileRequires-fixed-space-at-the-end-and-pos.patch
+Patch10: 0011-log-rpm-package-also-in-non-asserted-rpm-checks.patch
+Patch11: 0012-rlCheckRequirements-completely-supress-output-of-rlC.patch
+Patch12: 0013-add-srpm-info-to-journal-bz1071693.patch
+Patch13: 0014-supress-storage-data-in-non-debug-mode.patch
+
 
 %description
 The BeakerLib project means to provide a library of various helpers, which
@@ -32,6 +47,20 @@ Files for syntax highlighting BeakerLib tests in VIM editor
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
 
 %build
 make build
@@ -72,6 +101,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/vim/vimfiles/after/syntax/beakerlib.vim
 
 %changelog
+* Tue Jul 1 2014 Dalibor Pospisil <dapospis at redhat.com> - 1.9-2
+- bunch of fixes
+
 * Tue Jun 17 2014 Dalibor Pospisil <dapospis at redhat.com> - 1.9-1
 - rebase to upstream 1.9
 


More information about the scm-commits mailing list