diff --git a/SOURCES/bash-4.2-case-in-command-subst.patch b/SOURCES/bash-4.2-case-in-command-subst.patch
new file mode 100644
index 0000000..4df6353
--- /dev/null
+++ b/SOURCES/bash-4.2-case-in-command-subst.patch
@@ -0,0 +1,21 @@
+diff -up bash-4.2/parse.y.old bash-4.2/parse.y
+--- bash-4.2/parse.y.old	2015-05-18 13:04:30.341494305 +0200
++++ bash-4.2/parse.y	2015-05-18 13:05:18.245509202 +0200
+@@ -3693,6 +3693,17 @@ eof_error:
+ 	    }
+ 	  else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0)))
+ 	    ;	/* don't modify LEX_RESWDOK if we're starting a comment */
++	  /* Allow `do' followed by space, tab, or newline to preserve the
++	     RESWDOK flag, but reset the reserved word length counter so we
++	     can read another one. */
++	  else if MBTEST(((tflags & LEX_INCASE) == 0) &&
++			  (isblank(ch) || ch == '\n') &&
++			  lex_rwlen == 2 &&
++			  STREQN (ret + retind - 2, "do", 2))
++{
++/*itrace("parse_comsub:%d: lex_incase == 1 found `%c', found \"do\"", line_number, ch);*/
++	    lex_rwlen = 0;
++}
+ 	  else if MBTEST((tflags & LEX_INCASE) && ch != '\n')
+ 	    /* If we can read a reserved word and we're in case, we're at the
+ 	       point where we can read a new pattern list or an esac.  We
diff --git a/SOURCES/bash-4.2-check-debugger.patch b/SOURCES/bash-4.2-check-debugger.patch
new file mode 100644
index 0000000..5d8aa61
--- /dev/null
+++ b/SOURCES/bash-4.2-check-debugger.patch
@@ -0,0 +1,87 @@
+diff -up bash-4.2/builtins/evalfile.c.old bash-4.2/builtins/evalfile.c
+--- bash-4.2/builtins/evalfile.c.old	2015-05-14 20:45:31.402793505 +0200
++++ bash-4.2/builtins/evalfile.c	2015-05-14 20:45:47.632794791 +0200
+@@ -317,6 +317,23 @@ maybe_execute_file (fname, force_noninte
+   return result;
+ }
+ 
++int
++force_execute_file (fname, force_noninteractive)
++     const char *fname;
++     int force_noninteractive;
++{
++  char *filename;
++  int result, flags;
++
++  filename = bash_tilde_expand (fname, 0);
++  flags = 0;
++  if (force_noninteractive)
++    flags |= FEVAL_NONINT;
++  result = _evalfile (filename, flags);
++  free (filename);
++  return result;
++}
++
+ #if defined (HISTORY)
+ int
+ fc_execute_file (filename)
+diff -up bash-4.2/configure.in.old bash-4.2/configure.in
+--- bash-4.2/configure.in.old	2015-05-14 21:27:20.882449456 +0200
++++ bash-4.2/configure.in	2015-05-14 21:19:25.654612738 +0200
+@@ -149,7 +149,7 @@ fi
+ fi
+ 
+ if test -z "${DEBUGGER_START_FILE}"; then
+-	DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc'
++	DEBUGGER_START_FILE='/usr/share/bashdb/bashdb-main.inc'
+ fi
+ 
+ dnl optional shell features in config.h.in
+diff -up bash-4.2/shell.c.old bash-4.2/shell.c
+--- bash-4.2/shell.c.old	2015-05-14 20:42:54.379781066 +0200
++++ bash-4.2/shell.c	2015-05-14 20:43:04.966781904 +0200
+@@ -1373,12 +1373,19 @@ start_debugger ()
+ {
+ #if defined (DEBUGGER) && defined (DEBUGGER_START_FILE)
+   int old_errexit;
++  int r;
+ 
+   old_errexit = exit_immediately_on_error;
+   exit_immediately_on_error = 0;
+ 
+-  maybe_execute_file (DEBUGGER_START_FILE, 1);
+-  function_trace_mode = 1;
++  r = force_execute_file (DEBUGGER_START_FILE, 1);
++  if (r < 0)
++    {
++      internal_warning ("cannot start debugger; debugging mode disabled");
++      debugging_mode = function_trace_mode = 0;
++    }
++  else
++    function_trace_mode = 1;
+ 
+   exit_immediately_on_error += old_errexit;
+ #endif
+diff -up bash-4.2/builtins/evalfile.c.old bash-4.2/builtins/evalfile.c
+--- bash-4.2/builtins/evalfile.c.old	2015-05-15 00:52:01.357266353 +0200
++++ bash-4.2/builtins/evalfile.c	2015-05-15 00:52:08.734263236 +0200
+@@ -125,7 +125,7 @@ file_error_and_exit:
+ 	}
+ 
+       return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE
+-      				      : ((errno == ENOENT) ? 0 : -1));
++      				      : ((errno == ENOENT && (flags & FEVAL_ENOENTOK) != 0) ? 0 : -1));
+     }
+ 
+   errfunc = ((flags & FEVAL_BUILTIN) ? builtin_error : internal_error);
+diff -up bash-4.2/builtins/common.h.old bash-4.2/builtins/common.h
+--- bash-4.2/builtins/common.h.old	2015-05-15 00:52:01.357266353 +0200
++++ bash-4.2/builtins/common.h	2015-05-15 00:52:08.734263236 +0200
+@@ -170,6 +170,7 @@
+ 
+ /* Functions from evalfile.c */
+ extern int maybe_execute_file __P((const char *, int));
++extern int force_execute_file __P((const char *, int));
+ extern int source_file __P((const char *, int));
+ extern int fc_execute_file __P((const char *));
+ 
diff --git a/SOURCES/bash-4.2-double-alloc.patch b/SOURCES/bash-4.2-double-alloc.patch
new file mode 100644
index 0000000..682b591
--- /dev/null
+++ b/SOURCES/bash-4.2-double-alloc.patch
@@ -0,0 +1,11 @@
+--- bash-4.1/subst.c	2015-04-07 10:00:00.482931289 +0900
++++ bash-4.1/subst.c	2015-04-07 10:01:28.258111134 +0900
+@@ -7039,8 +7039,6 @@ 
+ 
+       ret = alloc_word_desc ();
+       ret->word = temp1;
+-      ret = alloc_word_desc ();
+-      ret->word = temp1;
+       if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ 	ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+       return ret;
diff --git a/SOURCES/bash-4.2-enable-hyphened-fn-export.patch b/SOURCES/bash-4.2-enable-hyphened-fn-export.patch
new file mode 100644
index 0000000..741e1c9
--- /dev/null
+++ b/SOURCES/bash-4.2-enable-hyphened-fn-export.patch
@@ -0,0 +1,11 @@
+--- variables.cold	2015-01-16 13:53:13.817363093 +0100
++++ variables.c	2015-01-16 13:57:41.839425969 +0100
+@@ -366,7 +366,7 @@ initialize_shell_variables (env, privmod
+ 	  /* Don't import function names that are invalid identifiers from the
+ 	     environment, though we still allow them to be defined as shell
+ 	     variables. */
+-	  if (legal_identifier (temp_name))
++	  if (absolute_program (temp_name) == 0 && (posixly_correct == 0 || legal_identifier (temp_name)))
+ 	    parse_and_execute (temp_string, temp_name,
+ 			       SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+ 
diff --git a/SOURCES/bash-4.2-ifs-in-temp-env.patch b/SOURCES/bash-4.2-ifs-in-temp-env.patch
new file mode 100644
index 0000000..64b99f8
--- /dev/null
+++ b/SOURCES/bash-4.2-ifs-in-temp-env.patch
@@ -0,0 +1,35 @@
+--- bash-4.2/redir.c	2015-04-27 23:03:55.663182162 +0200
++++ bash-4.2/redir.c	2015-04-27 23:03:13.995181816 +0200
+@@ -63,6 +63,7 @@ int expanding_redir;
+ 
+ extern int posixly_correct;
+ extern int last_command_exit_value;
++extern int executing_builtin;
+ extern REDIRECT *redirection_undo_list;
+ extern REDIRECT *exec_redirection_undo_list;
+ 
+@@ -307,11 +308,23 @@ write_here_string (fd, redirectee)
+      WORD_DESC *redirectee;
+ {
+   char *herestr;
+-  int herelen, n, e;
++  int herelen, n, e, old;
+ 
+   expanding_redir = 1;
++  /* Now that we've changed the variable search order to ignore the temp
++     environment, see if we need to change the cached IFS values. */
++  sv_ifs ("IFS");
+   herestr = expand_string_to_string (redirectee->word, 0);
+   expanding_redir = 0;
++  /* Now we need to change the variable search order back to include the temp
++     environment.  We force the temp environment search by forcing
++     executing_builtin to 1.  This is what makes `read' get the right values
++     for the IFS-related cached variables, for example. */
++  old = executing_builtin;
++  executing_builtin = 1;
++  sv_ifs ("IFS");
++  executing_builtin = old;
++
+   herelen = STRLEN (herestr);
+ 
+   n = write (fd, herestr, herelen);
diff --git a/SPECS/bash.spec b/SPECS/bash.spec
index 069a547..82f7aa1 100644
--- a/SPECS/bash.spec
+++ b/SPECS/bash.spec
@@ -6,7 +6,7 @@
 Version: %{baseversion}%{patchleveltag}
 Name: bash
 Summary: The GNU Bourne Again shell
-Release: 12%{?dist}
+Release: 19%{?dist}
 Group: System Environment/Shells
 License: GPLv3+
 Url: http://www.gnu.org/software/bash
@@ -147,6 +147,21 @@ Patch135: bash-4.2-cve-2014-7169-0.patch
 Patch136: bash-4.2-cve-2014-7169-1.patch
 Patch137: bash-4.2-cve-2014-7169-2.patch
 
+#1172214 - Bash leaks memory when doing a pattern-substitution
+Patch138: bash-4.2-double-alloc.patch
+
+#1196566 - IFS incorrectly splitting herestrings
+Patch139: bash-4.2-ifs-in-temp-env.patch
+
+#1165793
+Patch140: bash-4.2-check-debugger.patch
+
+#1212775
+Patch141: bash-4.2-case-in-command-subst.patch
+
+#1237213 - export when fnname contains hyphens
+Patch142: bash-4.2-enable-hyphened-fn-export.patch
+
 BuildRequires: texinfo bison
 BuildRequires: ncurses-devel
 BuildRequires: autoconf, gettext
@@ -262,6 +277,11 @@ This package contains documentation files for %{name}.
 %patch137 -p0 -b .7169-2
 %patch052 -p0 -b .052
 %patch053 -p0 -b .053
+%patch138 -p1 -b .double-alloc
+%patch139 -p1 -b .temp-env
+%patch140 -p1 -b .check-debugger
+%patch141 -p1 -b .command-subst
+%patch142 -p0 -b .export
 
 echo %{version} > _distribution
 echo %{release} > _patchlevel
@@ -454,6 +474,34 @@ end
 #%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
 
 %changelog
+* Wed Jul 08 2015 Ondrej Oprala <ooprala@redhat.com> - 4.2.46-19
+- Add a necessary declaration to common.h
+  Related: #1165793
+
+* Tue Jul 07 2015 Ondrej Oprala <ooprala@redhat.com> - 4.2.46-18
+- Allow importing exported functions with hyphens
+  Resolves: #1237213
+
+* Mon May 18 2015 Ondrej Oprala <ooprala@redhat.com> - 4.2.46-17
+- Make sure a case statement works in command subst
+  Resolves: #1212775
+
+* Fri May 15 2015 Ondrej Oprala <ooprala@redhat.com> - 4.2.46-16
+- Emit warning when --debugger option is used and no debugger is installed
+  Resolves: #1165793
+
+* Thu May 14 2015 Ondrej Oprala <ooprala@redhat.com> - 4.2.46-15
+- Add a CI configfile
+  Related: #1165793
+
+* Mon Apr 27 2015 Ondrej Oprala <ooprala@redhat.com> - 4.2.46-14
+- IFS incorrectly splitting herestrings
+  Resolves: #1196566
+
+* Mon Apr 27 2015 Ondrej Oprala <ooprala@redhat.com> - 4.2.46-13
+- PatternSub code allocates twice
+  Resolves: #1172214
+
 * Sun Jan 11 2015 Ondrej Oprala <ooprala@redhat.com> - 4.2.46-12
 - Shellshock related parser bugs - patches
   Related: #1175647