diff -u bash-4.2/debian/rules bash-4.2/debian/rules --- bash-4.2/debian/rules +++ bash-4.2/debian/rules @@ -279,12 +279,13 @@ dh_testdir dh_testroot mkdir -p $(d_doc)/usr/share/doc/$(p) - dh_installdocs -p$(p_doc) ifeq ($(with_gfdl),yes) + dh_installdocs -p$(p_doc) cp -p build-bash/doc/bashref.pdf $(d_doc)/usr/share/doc/$(p)/. dh_link -p$(p_doc) \ /usr/share/doc/$(p)/bashref.pdf /usr/share/doc/$(p_doc)/bashref.pdf else + dh_installdocs -p$(p_doc) -X.doc-base rm -f $(d_doc)/usr/share/doc-base/bashref endif rm -f $(d_doc)/usr/share/info/dir* diff -u bash-4.2/debian/changelog bash-4.2/debian/changelog --- bash-4.2/debian/changelog +++ bash-4.2/debian/changelog @@ -1,3 +1,20 @@ +bash (4.2-2ubuntu1) precise; urgency=low + + * Merge with Debian; remaining changes: + + -- Matthias Klose Mon, 02 Apr 2012 23:58:07 +0200 + +bash (4.2-2) unstable; urgency=low + + * Fix command-not-found location. Closes: #529313. + * Print a replacement error message if command-not-found was removed + after bashrc was loaded. Closes: #631023. LP: #561155. + * skel.bashrc: Document and prepare enabling the globstar feature (Fabian + Greffrath). Closes: #627926. + * Apply upstream patches 021 - 024. + + -- Matthias Klose Fri, 30 Mar 2012 19:20:04 +0200 + bash (4.2-1ubuntu3) precise; urgency=low * When cross-building, use the cross-strip, not the host strip. diff -u bash-4.2/debian/etc.bash.bashrc bash-4.2/debian/etc.bash.bashrc --- bash-4.2/debian/etc.bash.bashrc +++ bash-4.2/debian/etc.bash.bashrc @@ -47,16 +47,17 @@ fi # if the command-not-found package is installed, use it -if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found ]; then +if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then function command_not_found_handle { # check because c-n-f could've been removed in the meantime if [ -x /usr/lib/command-not-found ]; then /usr/bin/python /usr/lib/command-not-found -- "$1" return $? - elif [ -x /usr/share/command-not-found ]; then - /usr/bin/python /usr/share/command-not-found -- "$1" + elif [ -x /usr/share/command-not-found/command-not-found ]; then + /usr/bin/python /usr/share/command-not-found/command-not-found -- "$1" return $? else + printf "%s: command not found\n" "$1" >&2 return 127 fi } diff -u bash-4.2/debian/control bash-4.2/debian/control --- bash-4.2/debian/control +++ bash-4.2/debian/control @@ -3,7 +3,7 @@ Priority: required Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Matthias Klose -Standards-Version: 3.9.2 +Standards-Version: 3.9.3 Build-Depends: autoconf, autotools-dev, quilt, bison, libncurses5-dev, texinfo, debhelper (>= 5), texi2html, locales, gettext:any, sharutils, time, xz-utils, dpkg-dev (>= 1.16.1) diff -u bash-4.2/debian/skel.bashrc bash-4.2/debian/skel.bashrc --- bash-4.2/debian/skel.bashrc +++ bash-4.2/debian/skel.bashrc @@ -20,6 +20,10 @@ # update the values of LINES and COLUMNS. shopt -s checkwinsize +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" only in patch2: unchanged: --- bash-4.2.orig/debian/patches/bash42-021.diff +++ bash-4.2/debian/patches/bash42-021.diff @@ -0,0 +1,50 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-021 + +Bug-Reported-by: Dan Douglas +Bug-Reference-ID: <4585554.nZWb4q7YoZ@smorgbox> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-12/msg00084.html + +Bug-Description: + +Using `read -N' to assign values to an array can result in NUL values being +assigned to some array elements. These values cause seg faults when referenced +later. + +Index: b/bash/builtins/read.def +=================================================================== +--- a/bash/builtins/read.def ++++ b/bash/builtins/read.def +@@ -737,7 +737,7 @@ + xfree (t1); + } + else +- var = bind_read_variable (varname, t); ++ var = bind_read_variable (varname, t ? t : ""); + } + else + { +@@ -798,7 +798,7 @@ + xfree (t); + } + else +- var = bind_read_variable (list->word->word, input_string); ++ var = bind_read_variable (list->word->word, input_string ? input_string : ""); + + if (var) + { +Index: b/bash/patchlevel.h +=================================================================== +--- a/bash/patchlevel.h ++++ b/bash/patchlevel.h +@@ -25,6 +25,6 @@ + regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh + looks for to find the patch level (for the sccs version string). */ + +-#define PATCHLEVEL 20 ++#define PATCHLEVEL 21 + + #endif /* _PATCHLEVEL_H_ */ only in patch2: unchanged: --- bash-4.2.orig/debian/patches/bash42-022.diff +++ bash-4.2/debian/patches/bash42-022.diff @@ -0,0 +1,48 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-022 + +Bug-Reported-by: Gregory Margo +Bug-Reference-ID: <20110727174529.GA3333@pacbell.net> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-07/msg00102.html + +Bug-Description: + +The return value from lseek is `off_t'. This can cause corrupted return +values when the file offset is greater than 2**31 - 1. + +Index: b/bash/lib/sh/zread.c +=================================================================== +--- a/bash/lib/sh/zread.c ++++ b/bash/lib/sh/zread.c +@@ -160,14 +160,13 @@ + zsyncfd (fd) + int fd; + { +- off_t off; +- int r; ++ off_t off, r; + + off = lused - lind; + r = 0; + if (off > 0) + r = lseek (fd, -off, SEEK_CUR); + +- if (r >= 0) ++ if (r != -1) + lused = lind = 0; + } +Index: b/bash/patchlevel.h +=================================================================== +--- a/bash/patchlevel.h ++++ b/bash/patchlevel.h +@@ -25,6 +25,6 @@ + regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh + looks for to find the patch level (for the sccs version string). */ + +-#define PATCHLEVEL 21 ++#define PATCHLEVEL 22 + + #endif /* _PATCHLEVEL_H_ */ only in patch2: unchanged: --- bash-4.2.orig/debian/patches/bash42-024.diff +++ bash-4.2/debian/patches/bash42-024.diff @@ -0,0 +1,42 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-024 + +Bug-Reported-by: Jim Avera +Bug-Reference-ID: <4F29E07A.80405@yahoo.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-02/msg00001.html + +Bug-Description: + +When `printf -v' is used to set an array element, the format string contains +`%b', and the corresponding argument is the empty string, the buffer used +to store the value to be assigned can be NULL, which results in NUL being +assigned to the array element. This causes a seg fault when it's used later. + +Index: b/bash/builtins/printf.def +=================================================================== +--- a/bash/builtins/printf.def ++++ b/bash/builtins/printf.def +@@ -255,6 +255,8 @@ + #endif + { + vflag = 1; ++ if (vbsize == 0) ++ vbuf = xmalloc (vbsize = 16); + vblen = 0; + if (vbuf) + vbuf[0] = 0; +Index: b/bash/patchlevel.h +=================================================================== +--- a/bash/patchlevel.h ++++ b/bash/patchlevel.h +@@ -25,6 +25,6 @@ + regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh + looks for to find the patch level (for the sccs version string). */ + +-#define PATCHLEVEL 23 ++#define PATCHLEVEL 24 + + #endif /* _PATCHLEVEL_H_ */ only in patch2: unchanged: --- bash-4.2.orig/debian/patches/bash42-023.diff +++ bash-4.2/debian/patches/bash42-023.diff @@ -0,0 +1,57 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-023 + +Bug-Reported-by: Ewan Mellor +Bug-Reference-ID: <6005BE083BF501439A84DC3523BAC82DC4B964FD12@LONPMAILBOX01.citrite.net> +Bug-Reference-URL: + +Bug-Description: + +Under some circumstances, an exit trap triggered by a bad substitution +error when errexit is enabled will cause the shell to exit with an +incorrect exit status (0). + +Index: b/bash/error.c +=================================================================== +--- a/bash/error.c ++++ b/bash/error.c +@@ -200,7 +200,11 @@ + + va_end (args); + if (exit_immediately_on_error) +- exit_shell (1); ++ { ++ if (last_command_exit_value == 0) ++ last_command_exit_value = 1; ++ exit_shell (last_command_exit_value); ++ } + } + + void +Index: b/bash/patchlevel.h +=================================================================== +--- a/bash/patchlevel.h ++++ b/bash/patchlevel.h +@@ -25,6 +25,6 @@ + regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh + looks for to find the patch level (for the sccs version string). */ + +-#define PATCHLEVEL 22 ++#define PATCHLEVEL 23 + + #endif /* _PATCHLEVEL_H_ */ +Index: b/bash/subst.c +=================================================================== +--- a/bash/subst.c ++++ b/bash/subst.c +@@ -7274,6 +7274,7 @@ + default: + case '\0': + bad_substitution: ++ last_command_exit_value = EXECUTION_FAILURE; + report_error (_("%s: bad substitution"), string ? string : "??"); + FREE (value); + FREE (temp);