diff options
Diffstat (limited to 'debian')
43 files changed, 1764 insertions, 4 deletions
diff --git a/debian/clear_console.c b/debian/clear_console.c index 8412827..dd554b7 100644 --- a/debian/clear_console.c +++ b/debian/clear_console.c @@ -148,7 +148,7 @@ int is_pseudo_tty(int fd) return 0; } -int clear_console(int fd) +void clear_console(int fd) { int num, tmp_num; #if defined(__linux__) @@ -163,10 +163,10 @@ int clear_console(int fd) } if (is_pseudo_tty(STDIN_FILENO)) - return 0; + return; if (!strcmp(getenv("TERM"), "screen")) - return 0; + return; /* get current vt */ #if defined(__linux__) diff --git a/debian/patches/patches/bash-aliases-repeat.dpatch b/debian/patches/patches/bash-aliases-repeat.dpatch new file mode 100644 index 0000000..ae1ac9b --- /dev/null +++ b/debian/patches/patches/bash-aliases-repeat.dpatch @@ -0,0 +1,45 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Fix bug in Bash_aliases example. + +--- examples/startup-files/Bash_aliases~ 2008-04-19 21:57:24.000000000 +0200 ++++ examples/startup-files/Bash_aliases 2008-04-19 21:59:43.000000000 +0200 +@@ -41,20 +41,20 @@ + { + local count="$1" i; + shift; +- for i in $(seq 1 "$count"); ++ for i in $(_seq 1 "$count"); + do + eval "$@"; + done + } + + # Subfunction needed by `repeat'. +-seq () ++_seq () + { + local lower upper output; + lower=$1 upper=$2; + + if [ $lower -ge $upper ]; then return; fi +- while [ $lower -le $upper ]; ++ while [ $lower -lt $upper ]; + do + echo -n "$lower " + lower=$(($lower + 1)) diff --git a/debian/patches/patches/bash-default-editor.dpatch b/debian/patches/patches/bash-default-editor.dpatch new file mode 100644 index 0000000..1d0f44c --- /dev/null +++ b/debian/patches/patches/bash-default-editor.dpatch @@ -0,0 +1,48 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Use `command -v editor`, as an editor, if available. + +--- bash/builtins/fc.def~ 2005-10-13 18:11:24.798452832 +0200 ++++ bash/builtins/fc.def 2005-10-13 19:36:11.956087320 +0200 +@@ -156,11 +156,11 @@ + #endif + + /* String to execute on a file that we want to edit. */ +-#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-vi}}" ++#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-$(command -v editor || echo vi)}}" + #if defined (STRICT_POSIX) + # define POSIX_FC_EDIT_COMMAND "${FCEDIT:-ed}" + #else +-# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-ed}}" ++# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-$(command -v editor || echo ed)}}" + #endif + + int +--- bash/bashline.c~ 2005-10-13 18:11:24.827448424 +0200 ++++ bash/bashline.c 2005-10-13 19:37:35.382404592 +0200 +@@ -800,8 +800,8 @@ + command being entered (if no explicit argument is given), otherwise on + a command from the history file. */ + +-#define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-vi}}\"" +-#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-emacs}}\"" ++#define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo vi)}}\"" ++#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo emacs)}}\"" + #define POSIX_VI_EDIT_COMMAND "fc -e vi" + + static int diff --git a/debian/patches/patches/bash-minimal.dpatch b/debian/patches/patches/bash-minimal.dpatch new file mode 100644 index 0000000..c6b0039 --- /dev/null +++ b/debian/patches/patches/bash-minimal.dpatch @@ -0,0 +1,62 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Build fixes for minimal bash + +--- bash/parse.y~ 2009-11-02 23:34:15.000000000 +0100 ++++ bash/parse.y 2009-12-30 17:08:12.341085169 +0100 +@@ -2772,12 +2772,14 @@ + dstack.delimiter_depth = 0; /* No delimiters found so far. */ + open_brace_count = 0; + ++#if defined (EXTENDED_GLOB) + /* Reset to global value of extended glob */ + if (parser_state & PST_EXTPAT) + { + /*itrace("reset_parser: parser_state includes PST_EXTPAT");*/ + extended_glob = global_extglob; + } ++#endif + + parser_state = 0; + +--- bash/execute_cmd.c~ 2009-11-29 03:29:34.000000000 +0100 ++++ bash/execute_cmd.c 2009-12-30 17:13:36.041085541 +0100 +@@ -4196,7 +4196,9 @@ + if (variable_context == 0 || this_shell_function == 0) + { + make_funcname_visible (0); ++#if defined (PROCESS_SUBSTITUTION) + unlink_fifo_list (); ++#endif + } + + return (result); +--- bash/lib/glob/glob.c~ 2009-11-15 00:39:30.000000000 +0100 ++++ bash/lib/glob/glob.c 2009-12-30 17:34:56.802336552 +0100 +@@ -640,7 +640,11 @@ + continue; + } + ++#ifdef MACOS + convfn = fnx_fromfs (dp->d_name, D_NAMLEN (dp)); ++#else ++ convfn = dp->d_name; ++#endif + if (strmatch (pat, convfn, mflags) != FNM_NOMATCH) + { + if (nalloca < ALLOCA_MAX) diff --git a/debian/patches/patches/bash-subst-param-length.dpatch b/debian/patches/patches/bash-subst-param-length.dpatch new file mode 100644 index 0000000..836a18c --- /dev/null +++ b/debian/patches/patches/bash-subst-param-length.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +DP: ignore array subscript while determining variable name for length +DP: substitution +DP: (#345861) + +--- ../bash-3.1/subst.c 2006-01-14 01:12:02.000000000 +0100 ++++ subst.c 2006-01-14 01:12:39.000000000 +0100 +@@ -5814,7 +5814,7 @@ + { + t_index++; + free (name); +- temp1 = string_extract (string, &t_index, "#%:-=?+/}", 0); ++ temp1 = string_extract (string, &t_index, "#%:-=?+/}", SX_VARNAME); + name = (char *)xmalloc (3 + (strlen (temp1))); + *name = string[sindex]; + if (string[sindex] == '!') diff --git a/debian/patches/patches/bash41-001.dpatch b/debian/patches/patches/bash41-001.dpatch new file mode 100644 index 0000000..a6d2d07 --- /dev/null +++ b/debian/patches/patches/bash41-001.dpatch @@ -0,0 +1,67 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: bash-4.1 upstream patch 001 + + BASH PATCH REPORT + ================= + +Bash-Release: 4.1 +Patch-ID: bash41-001 + +Bug-Reported-by: Yann Rouillard <yann@pleiades.fr.eu.org> +Bug-Reference-ID: <4B44A410.4070107@pleiades.fr.eu.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00018.html + +Bug-Description: + +A prototype for vsnprintf was incorrect, and caused compilation failures +on systems that did not have a suitable vsnprintf, but had a declaration in +one of the system header files. + +Patch (apply with `patch -p0'): + +*** ../bash-4.1-patched/builtins/printf.def 2009-11-20 15:31:23.000000000 -0500 +--- ./builtins/printf.def 2010-01-07 08:50:06.000000000 -0500 +*************** +*** 173,177 **** + + #if !HAVE_VSNPRINTF +! extern int vsnprintf __P((char *, size_t, const char *, ...)) __attribute__((__format__ (printf, 3, 4))); + #endif + +--- 173,177 ---- + + #if !HAVE_VSNPRINTF +! extern int vsnprintf __P((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0))); + #endif + +*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 +--- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 0 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 1 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/patches/bash41-002.dpatch b/debian/patches/patches/bash41-002.dpatch new file mode 100644 index 0000000..4b0eca2 --- /dev/null +++ b/debian/patches/patches/bash41-002.dpatch @@ -0,0 +1,83 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: <your description> + BASH PATCH REPORT + ================= + +Bash-Release: 4.1 +Patch-ID: bash41-002 + +Bug-Reported-by: guillaume.outters@free.fr +Bug-Reference-ID: <20100105230441.70D171AA7F52@asterix.local> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00017.html + +Bug-Description: + +Bash-4.1/Readline-6.1 introduced a hook function that allows applications +to rewrite or modify filenames read from the file system before comparing +them with a word to be completed. The converted filename, if it matches, +needs to be inserted into the line buffer, replacing the original contents. + +This fixes a completion bug on Mac OS X involving filenames containing +UTF-8 characters. + +Patch (apply with `patch -p0'): + +*** ../bash-4.1-patched/lib/readline/complete.c 2009-11-29 18:39:30.000000000 -0500 +--- ./lib/readline/complete.c 2010-01-06 08:30:23.000000000 -0500 +*************** +*** 2139,2143 **** + if (filename_len == 0) + { +! if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name)) + continue; + +--- 2139,2143 ---- + if (filename_len == 0) + { +! if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn)) + continue; + +*************** +*** 2220,2224 **** + } + +! strcpy (temp + dirlen, entry->d_name); + } + else +--- 2220,2224 ---- + } + +! strcpy (temp + dirlen, convfn); + } + else +*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 +--- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 1 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 2 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/patches/bash41-003.dpatch b/debian/patches/patches/bash41-003.dpatch new file mode 100644 index 0000000..c916ba1 --- /dev/null +++ b/debian/patches/patches/bash41-003.dpatch @@ -0,0 +1,67 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: bash-4.1 upstream patch 003 + + BASH PATCH REPORT + ================= + +Bash-Release: 4.1 +Patch-ID: bash41-003 + +Bug-Reported-by: coyote@wariat.org.pl +Bug-Reference-ID: <4b64a1f8.06e2660a.60af.4bfb@mx.google.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00135.html + +Bug-Description: + +If command completion is attempted on a word with a quoted globbing +character (e.g., `*' or `?'), bash can reference a NULL pointer and +dump core. + +Patch (apply with `patch -p0'): + +*** ../bash-4.1-patched/bashline.c 2009-10-24 14:10:19.000000000 -0400 +--- ./bashline.c 2010-01-30 21:53:49.000000000 -0500 +*************** +*** 1681,1685 **** + characters in the common prefix are bad) will ever be returned on + regular completion. */ +! if (glob_pattern_p (hint)) + { + if (state == 0) +--- 1681,1685 ---- + characters in the common prefix are bad) will ever be returned on + regular completion. */ +! if (globpat) + { + if (state == 0) +*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 +--- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 2 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 3 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/patches/bash41-004.dpatch b/debian/patches/patches/bash41-004.dpatch new file mode 100644 index 0000000..51e9154 --- /dev/null +++ b/debian/patches/patches/bash41-004.dpatch @@ -0,0 +1,66 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: bash-4.1 upstream patch 004 + + BASH PATCH REPORT + ================= + +Bash-Release: 4.1 +Patch-ID: bash41-004 + +Bug-Reported-by: Crestez Dan Leonard <cdleonard@gmail.com> +Bug-Reference-ID: <1265592839.30682.21.camel@deskbox> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-02/msg00034.html + +Bug-Description: + +When running in Posix mode and executing a shell function without local +variables, bash will not propagate a variable in a special builtin's temporary +environment to have global scope. + +Patch (apply with `patch -p0'): + +*** ../bash-4.1-patched/variables.c 2009-11-03 14:13:58.000000000 -0500 +--- ./variables.c 2010-02-08 17:36:18.000000000 -0500 +*************** +*** 3809,3812 **** +--- 3809,3817 ---- + if (tempvar_p (var) && (posixly_correct || (var->attributes & att_propagate))) + { ++ /* Make sure we have a hash table to store the variable in while it is ++ being propagated down to the global variables table. Create one if ++ we have to */ ++ if ((vc_isfuncenv (shell_variables) || vc_istempenv (shell_variables)) && shell_variables->table == 0) ++ shell_variables->table = hash_create (0); + /* XXX - should we set v->context here? */ + v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0); +*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 +--- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 3 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 4 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/patches/bash41-005.dpatch b/debian/patches/patches/bash41-005.dpatch new file mode 100644 index 0000000..ff40c34 --- /dev/null +++ b/debian/patches/patches/bash41-005.dpatch @@ -0,0 +1,75 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: bash-4.1 upstream patch 005 + + BASH PATCH REPORT + ================= + +Bash-Release: 4.1 +Patch-ID: bash41-005 + +Bug-Reported-by: werner@suse.de +Bug-Reference-ID: <201002251238.o1PCcYcg016893@boole.suse.de> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-02/msg00132.html + +Bug-Description: + +When the `read' builtin times out after the timeout specified with -t is +exceeded, it does not reset the flags that tell signal handlers to process +signals immediately instead of deferring their handling. This can result +in unsafe functions being called from signal handlers, which can cause bash +to hang or dump core. + +Patch (apply with `patch -p0'): + +*** ../bash-4.1-patched/builtins/read.def 2009-10-08 11:35:46.000000000 -0400 +--- ./builtins/read.def 2010-03-17 17:35:39.000000000 -0400 +*************** +*** 616,621 **** + zsyncfd (fd); + +- interrupt_immediately--; +- terminate_immediately--; + discard_unwind_frame ("read_builtin"); + +--- 616,619 ---- +*************** +*** 624,627 **** +--- 622,628 ---- + assign_vars: + ++ interrupt_immediately--; ++ terminate_immediately--; ++ + #if defined (ARRAY_VARS) + /* If -a was given, take the string read, break it into a list of words, +*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 +--- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 4 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 5 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/patches/bashbug-editor.dpatch b/debian/patches/patches/bashbug-editor.dpatch new file mode 100644 index 0000000..cb52ebd --- /dev/null +++ b/debian/patches/patches/bashbug-editor.dpatch @@ -0,0 +1,31 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: send bug reports to Debian bash maintainer too. + +diff -urb bash.orig/support/bashbug.sh bash/support/bashbug.sh +--- bash.orig/support/bashbug.sh 2002-04-16 23:15:15.000000000 +0200 ++++ bash/support/bashbug.sh 2003-09-27 23:35:04.000000000 +0200 +@@ -134,6 +134,7 @@ + esac ;; + esac + ++BUGBASH="${BUGBASH},bash@packages.debian.org" + BUGADDR="${1-$BUGBASH}" + + if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then +Only in bash/support: bashbug.sh.orig diff --git a/debian/patches/patches/bashdb-updates.dpatch b/debian/patches/patches/bashdb-updates.dpatch new file mode 100644 index 0000000..13a6b24 --- /dev/null +++ b/debian/patches/patches/bashdb-updates.dpatch @@ -0,0 +1,24 @@ +#! /bin/sh -e + +dir=. +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir=$3 +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p1 < $0 + cd $dir && autoconf + ;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Debian updates to bashdb + diff --git a/debian/patches/patches/bashdb.dpatch b/debian/patches/patches/bashdb.dpatch new file mode 100644 index 0000000..7a330d1 --- /dev/null +++ b/debian/patches/patches/bashdb.dpatch @@ -0,0 +1,56 @@ +#! /bin/sh -e + +dir=. +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir=$3 +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p1 < $0 + rm -f $dir/aclocal.m4 + rm -f $dir/configure + rm -f $dir/doc/bashref.info + rm -f $dir/examples/bashdb/bashdb.el + rm -f $dir/lib/readline/doc/Makefile + rm -f $dir/parser-built + rm -f $dir/pathnames.h + rm -f $dir/y.tab.[ch] + (cd $dir && aclocal -I . -I debugger) + (cd $dir && autoconf) + for i in config.guess config.sub elisp-comp install-sh \ + missing mkinstalldirs + do + cp -p /usr/share/automake-1.7/$i $dir/debugger/ + done + for i in mdate-sh texinfo.tex; do + cp -p /usr/share/automake-1.7/$i $dir/debugger/doc/ + done + (cd $dir/debugger && aclocal -I ..) + cp -p $dir/debugger/elisp-comp $dir/debugger/emacs/. + (cd $dir/debugger && automake) + (cd $dir/debugger && autoconf) + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# how to construct this file: +# - unpack the upstream bash source +# - unpack the bashdb source +# - apply bash the seven bash upstream patches +# - diff -ur --unidirectional-new-file \ + --exclude CVS --exclude=.cvsignore --exclude=/db/ \ +# bash-2.05b bashdb + +# DP: bashdb changes + +diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/ChangeLog cvs/ChangeLog diff --git a/debian/patches/patches/builtins-declare-fix.dpatch b/debian/patches/patches/builtins-declare-fix.dpatch new file mode 100644 index 0000000..87edfc2 --- /dev/null +++ b/debian/patches/patches/builtins-declare-fix.dpatch @@ -0,0 +1,37 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: <your description> +Andreas Schwab <schwab@linux-m68k.org> writes: + +> $ declare -A a=b; unset a +> *** glibc detected *** /bin/bash: free(): invalid pointer: 0x10091644 *** + +And the obvious patch: + +--- bash-4.1/builtins/declare.def.~1~ 2009-11-26 01:42:00.000000000 +0100 ++++ bash-4.1/builtins/declare.def 2010-04-09 19:20:51.000000000 +0200 +@@ -512,7 +512,7 @@ declare_internal (list, local_var) + { + /* let bind_{array,assoc}_variable take care of this. */ + if (assoc_p (var)) +- bind_assoc_variable (var, name, "0", value, aflags); ++ bind_assoc_variable (var, name, savestring ("0"), value, aflags); + else + bind_array_variable (name, 0, value, aflags); + } + diff --git a/debian/patches/patches/deb-bash-config.dpatch b/debian/patches/patches/deb-bash-config.dpatch new file mode 100644 index 0000000..24360d0 --- /dev/null +++ b/debian/patches/patches/deb-bash-config.dpatch @@ -0,0 +1,86 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Changed compile time configuration options: +# DP: +# DP: - Set the default path to comply with Debian policy +# DP: +# DP: - Enable System-wide .bashrc file for interactive shells. +# DP: +# DP: - Enable System-wide .bash.logout file for interactive shells. +# DP: +# DP: - make non-interactive shells begun with argv[0][0] == '-' +# DP: run the startup files when not in posix mode. +# DP: +# DP: - try to check whether bash is being run by sshd and source +# DP: the .bashrc if so (like the rshd behavior). +# DP: +# DP: - don't define a default DEFAULT_MAIL_DIRECTORY, because it +# DP: can cause a timeout on NFS mounts. + +--- bash/config-top.h.orig 2008-08-17 16:52:25.000000000 +0000 ++++ bash/config-top.h 2008-11-29 17:35:03.000000000 +0000 +@@ -54,14 +54,14 @@ + /* The default value of the PATH variable. */ + #ifndef DEFAULT_PATH_VALUE + #define DEFAULT_PATH_VALUE \ +- "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:." ++ "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + #endif + + /* The value for PATH when invoking `command -p'. This is only used when + the Posix.2 confstr () function, or CS_PATH define are not present. */ + #ifndef STANDARD_UTILS_PATH + #define STANDARD_UTILS_PATH \ +- "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc" ++ "/bin:/usr/bin:/sbin:/usr/sbin" + #endif + + /* Default primary and secondary prompt strings. */ +@@ -75,20 +75,20 @@ + #define KSH_COMPATIBLE_SELECT + + /* System-wide .bashrc file for interactive shells. */ +-/* #define SYS_BASHRC "/etc/bash.bashrc" */ ++#define SYS_BASHRC "/etc/bash.bashrc" + + /* System-wide .bash_logout for login shells. */ +-/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */ ++#define SYS_BASH_LOGOUT "/etc/bash.bash_logout" + + /* Define this to make non-interactive shells begun with argv[0][0] == '-' + run the startup files when not in posix mode. */ +-/* #define NON_INTERACTIVE_LOGIN_SHELLS */ ++#define NON_INTERACTIVE_LOGIN_SHELLS + + /* Define this if you want bash to try to check whether it's being run by + sshd and source the .bashrc if so (like the rshd behavior). This checks + for the presence of SSH_CLIENT or SSH2_CLIENT in the initial environment, + which can be fooled under certain not-uncommon circumstances. */ +-/* #define SSH_SOURCE_BASHRC */ ++#define SSH_SOURCE_BASHRC + + /* Define if you want the case-capitalizing operators (~[~]) and the + `capcase' variable attribute (declare -c). */ +--- bash/config-bot.h.orig 2008-08-17 16:52:02.000000000 +0000 ++++ bash/config-bot.h 2008-11-29 17:32:42.000000000 +0000 +@@ -192,4 +192,4 @@ + /******************************************************************/ + + /* If you don't want bash to provide a default mail file to check. */ +-/* #undef DEFAULT_MAIL_DIRECTORY */ ++#undef DEFAULT_MAIL_DIRECTORY diff --git a/debian/patches/patches/deb-examples.dpatch b/debian/patches/patches/deb-examples.dpatch new file mode 100644 index 0000000..f951fa5 --- /dev/null +++ b/debian/patches/patches/deb-examples.dpatch @@ -0,0 +1,31 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: document readline header location on Debian systems + +--- bash/examples/loadables/README~ 2006-12-04 10:21:13.000000000 +0000 ++++ bash/examples/loadables/README 2006-12-04 10:23:05.000000000 +0000 +@@ -32,6 +32,9 @@ + guide'. The file template.c provides a template to use for creating + new loadable builtins. + ++On Debian GNU/Linux systems, the bash headers are in /usr/include/bash. ++The appropriate options are already set in the example Makefile. ++ + basename.c Return non-directory portion of pathname. + cat.c cat(1) replacement with no options - the way cat was intended. + cut.c cut(1) replacement. diff --git a/debian/patches/patches/exec-redirections-man.dpatch b/debian/patches/patches/exec-redirections-man.dpatch new file mode 100644 index 0000000..95b4d70 --- /dev/null +++ b/debian/patches/patches/exec-redirections-man.dpatch @@ -0,0 +1,31 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- bash/doc/bash.1~ 2006-07-12 20:16:36.000000000 -0400 ++++ bash/doc/bash.1 2006-07-12 20:26:49.000000000 -0400 +@@ -3014,6 +3014,10 @@ + Redirections using file descriptors greater than 9 should be used with + care, as they may conflict with file descriptors the shell uses + internally. ++.PP ++Note that the ++.B exec ++builtin command can make redirections take effect in the current shell. + .SS Redirecting Input + .PP + Redirection of input causes the file whose name results from + diff --git a/debian/patches/patches/exec-redirections-texi.dpatch b/debian/patches/patches/exec-redirections-texi.dpatch new file mode 100644 index 0000000..97a9ea2 --- /dev/null +++ b/debian/patches/patches/exec-redirections-texi.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- bash/doc/bashref.texi~ 2005-10-03 15:07:21.000000000 -0400 ++++ bash/doc/bashref.texi 2006-07-12 21:26:57.000000000 -0400 +@@ -2030,6 +2030,9 @@ + care, as they may conflict with file descriptors the shell uses + internally. + ++Note that the @code{exec} builtin command can make redirections take ++effect in the current shell. ++ + @subsection Redirecting Input + Redirection of input causes the file whose name results from + the expansion of @var{word} diff --git a/debian/patches/patches/input-err.dpatch b/debian/patches/patches/input-err.dpatch new file mode 100644 index 0000000..8fb93d7 --- /dev/null +++ b/debian/patches/patches/input-err.dpatch @@ -0,0 +1,30 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Define PGRP_PIPE to avoid race condition. + +--- input.c~ 2005-07-14 13:29:08.000000000 +0100 ++++ input.c 2006-04-05 14:51:50.000000000 +0100 +@@ -454,7 +454,7 @@ + if (nr == 0) + bp->b_flag |= B_EOF; + else +- bp->b_flag |= B_ERROR; ++ fatal_error("error reading input file: %s", strerror(errno)); + return (EOF); + } + diff --git a/debian/patches/patches/man-arithmetic.dpatch b/debian/patches/patches/man-arithmetic.dpatch new file mode 100644 index 0000000..1178ce8 --- /dev/null +++ b/debian/patches/patches/man-arithmetic.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: document deprecated syntax for arithmetic evaluation. + +diff -urb bash.orig/doc/bash.1 bash/doc/bash.1 +--- bash.orig/doc/bash.1 2003-09-25 21:42:45.000000000 +0200 ++++ bash/doc/bash.1 2003-09-28 00:24:17.000000000 +0200 +@@ -2533,6 +2533,9 @@ + \fB$((\fP\fIexpression\fP\fB))\fP + .RE + .PP ++The old format \fB$[\fP\fIexpression\fP\fB]\fP is deprecated and will ++be removed in upcoming versions of bash. ++.PP + The + .I expression + is treated as if it were within double quotes, but a double quote diff --git a/debian/patches/patches/man-bashlogout.dpatch b/debian/patches/patches/man-bashlogout.dpatch new file mode 100644 index 0000000..75871e5 --- /dev/null +++ b/debian/patches/patches/man-bashlogout.dpatch @@ -0,0 +1,31 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: document /etc/bash.bashrc in bash man page + +--- bash/doc/bash.1~ 2004-06-19 15:53:01.000000000 +0200 ++++ bash/doc/bash.1 2004-06-19 15:53:57.000000000 +0200 +@@ -8283,6 +8283,9 @@ + .FN /etc/bash.bashrc + The systemwide per-interactive-shell startup file + .TP ++.FN /etc/bash.bash.logout ++The systemwide login shell cleanup file, executed when a login shell exits ++.TP + .FN ~/.bash_profile + The personal initialization file, executed for login shells + .TP diff --git a/debian/patches/patches/man-bashrc.dpatch b/debian/patches/patches/man-bashrc.dpatch new file mode 100644 index 0000000..f303854 --- /dev/null +++ b/debian/patches/patches/man-bashrc.dpatch @@ -0,0 +1,81 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: document /etc/bash.bashrc in bash man page + +--- bash/doc/bash.1.orig 2008-11-29 17:37:14.000000000 +0000 ++++ bash/doc/bash.1 2008-11-29 17:40:07.000000000 +0000 +@@ -184,7 +184,9 @@ + .PD + Execute commands from + .I file +-instead of the standard personal initialization file ++instead of the system wide initialization file ++.I /etc/bash.bashrc ++and the standard personal initialization file + .I ~/.bashrc + if the shell is interactive (see + .SM +@@ -215,7 +217,9 @@ + below). + .TP + .B \-\-norc +-Do not read and execute the personal initialization file ++Do not read and execute the system wide initialization file ++.I /etc/bash.bashrc ++and the personal initialization file + .I ~/.bashrc + if the shell is interactive. + This option is on by default if the shell is invoked as +@@ -323,13 +327,15 @@ + .PP + When an interactive shell that is not a login shell is started, + .B bash +-reads and executes commands from \fI~/.bashrc\fP, if that file exists. ++reads and executes commands from \fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP, ++if these files exist. + This may be inhibited by using the + .B \-\-norc + option. + The \fB\-\-rcfile\fP \fIfile\fP option will force + .B bash +-to read and execute commands from \fIfile\fP instead of \fI~/.bashrc\fP. ++to read and execute commands from \fIfile\fP instead of ++\fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP. + .PP + When + .B bash +@@ -415,7 +421,8 @@ + If + .B bash + determines it is being run in this fashion, it reads and executes +-commands from \fI~/.bashrc\fP, if that file exists and is readable. ++commands from \fI~/.bashrc\fP and \fI~/.bashrc\fP, if these files ++exist and are readable. + It will not do this if invoked as \fBsh\fP. + The + .B \-\-norc +@@ -9293,6 +9300,9 @@ + .FN /etc/profile + The systemwide initialization file, executed for login shells + .TP ++.FN /etc/bash.bashrc ++The systemwide per-interactive-shell startup file ++.TP + .FN ~/.bash_profile + The personal initialization file, executed for login shells + .TP diff --git a/debian/patches/patches/man-builtin.dpatch b/debian/patches/patches/man-builtin.dpatch new file mode 100644 index 0000000..6abaef8 --- /dev/null +++ b/debian/patches/patches/man-builtin.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: fix man page include + +--- doc/builtins.1~ Mon Nov 29 22:30:13 1999 ++++ doc/builtins.1 Tue Aug 1 21:54:06 2000 +@@ -10,6 +10,6 @@ + ulimit, umask, unalias, unset, until, wait, while \- bash built-in commands, see \fBbash\fR(1) + .SH BASH BUILTIN COMMANDS + .nr zZ 1 +-.so bash.1 ++.so /usr/share/man/man1/bash.1 + .SH SEE ALSO + bash(1), sh(1) diff --git a/debian/patches/patches/man-fignore.dpatch b/debian/patches/patches/man-fignore.dpatch new file mode 100644 index 0000000..cd005bc --- /dev/null +++ b/debian/patches/patches/man-fignore.dpatch @@ -0,0 +1,33 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: bash(1): mention quoting when assigning to FIGNORE + +diff -urb bash.orig/doc/bash.1 bash/doc/bash.1 +--- bash.orig/doc/bash.1 2003-09-25 21:42:45.000000000 +0200 ++++ bash/doc/bash.1 2003-09-28 00:25:21.000000000 +0200 +@@ -1584,7 +1584,9 @@ + is excluded from the list of matched filenames. + A sample value is + .if t \f(CW".o:~"\fP. +-.if n ".o:~". ++.if n ".o:~" ++(Quoting is needed when assigning a value to this variable, ++which contains tildes). + .TP + .B GLOBIGNORE + A colon-separated list of patterns defining the set of filenames to diff --git a/debian/patches/patches/man-net-redirections-doc.dpatch b/debian/patches/patches/man-net-redirections-doc.dpatch new file mode 100644 index 0000000..3cc49de --- /dev/null +++ b/debian/patches/patches/man-net-redirections-doc.dpatch @@ -0,0 +1,31 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Document, that bash is configured using --disable-net-redirections. + +--- bash/doc/bashref.texi~ 2005-09-09 22:08:10.865192816 +0200 ++++ bash/doc/bashref.texi 2005-09-10 11:42:51.805867224 +0200 +@@ -2025,6 +2025,9 @@ + is an integer port number or service name, Bash attempts to open a UDP + connection to the corresponding socket. + ++NOTE: @code{Bash}, as packaged for Debian, does not support using the ++@file{/dev/tcp} and @file{/dev/udp} files. ++ + @end table + + A failure to open or create a file causes the redirection to fail. diff --git a/debian/patches/patches/man-net-redirections.dpatch b/debian/patches/patches/man-net-redirections.dpatch new file mode 100644 index 0000000..1bee4b1 --- /dev/null +++ b/debian/patches/patches/man-net-redirections.dpatch @@ -0,0 +1,31 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Document, that bash is configured using --disable-net-redirections. + +--- bash/doc/bash.1~ 2005-09-09 22:08:10.833197680 +0200 ++++ bash/doc/bash.1 2005-09-10 11:47:57.694365104 +0200 +@@ -3033,6 +3033,9 @@ + .PD + .RE + .PP ++\fBNOTE:\fP Bash, as packaged for Debian, does \fBnot\fP support using ++the \fB/dev/tcp\fP and \fB/dev/udp\fP files. ++.PP + A failure to open or create a file causes the redirection to fail. + .PP + Redirections using file descriptors greater than 9 should be used with diff --git a/debian/patches/patches/man-nocaseglob.dpatch b/debian/patches/patches/man-nocaseglob.dpatch new file mode 100644 index 0000000..6176a53 --- /dev/null +++ b/debian/patches/patches/man-nocaseglob.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Clarify documentation about case-insensitive pathname expansion + +--- bash/doc/bash.1~ 2004-08-28 18:25:23.000000000 +0200 ++++ bash/doc/bash.1 2004-08-28 19:13:24.000000000 +0200 +@@ -2690,6 +2690,10 @@ + .B nocaseglob + is enabled, the match is performed without regard to the case + of alphabetic characters. ++Note that when using range expressions like ++[a-z] (see below), letters of the other case may be included, ++depending on the setting of ++.B LC_COLLATE. + When a pattern is used for pathname expansion, + the character + .B ``.'' diff --git a/debian/patches/patches/man-substring-exp-doc.dpatch b/debian/patches/patches/man-substring-exp-doc.dpatch new file mode 100644 index 0000000..c6cdf58 --- /dev/null +++ b/debian/patches/patches/man-substring-exp-doc.dpatch @@ -0,0 +1,31 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Clarify documentation about substring expansion + +--- bash/doc/bashref.texi~ 2004-08-28 15:10:17.000000000 +0200 ++++ bash/doc/bashref.texi 2004-08-28 18:27:16.000000000 +0200 +@@ -1575,6 +1575,9 @@ + @var{length} must evaluate to a number greater than or equal to zero. + If @var{offset} evaluates to a number less than zero, the value + is used as an offset from the end of the value of @var{parameter}. ++Arithmetic expressions starting with a - must be separated by whitespace ++from the preceding : to be ++distinguished from the $@{@var{parameter}:@minus{}@var{word}@} expansion. + If @var{parameter} is @samp{@@}, the result is @var{length} positional + parameters beginning at @var{offset}. + If @var{parameter} is an array name indexed by @samp{@@} or @samp{*}, diff --git a/debian/patches/patches/man-substring-exp.dpatch b/debian/patches/patches/man-substring-exp.dpatch new file mode 100644 index 0000000..8cfaece --- /dev/null +++ b/debian/patches/patches/man-substring-exp.dpatch @@ -0,0 +1,31 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Clarify documentation about substring expansion + +--- bash/doc/bash.1~ 2004-08-28 15:10:17.000000000 +0200 ++++ bash/doc/bash.1 2004-08-28 18:25:23.000000000 +0200 +@@ -2356,6 +2356,9 @@ + \fIlength\fP must evaluate to a number greater than or equal to zero. + If \fIoffset\fP evaluates to a number less than zero, the value + is used as an offset from the end of the value of \fIparameter\fP. ++Arithmetic expressions starting with a - must be separated by whitespace ++from the preceding : to be ++distinguished from the \fBUse Default Values\fP expansion. + If \fIparameter\fP is \fB@\fP, the result is \fIlength\fP positional + parameters beginning at \fIoffset\fP. + If \fIparameter\fP is an array name indexed by @ or *, diff --git a/debian/patches/patches/man-test.dpatch b/debian/patches/patches/man-test.dpatch new file mode 100644 index 0000000..9382b35 --- /dev/null +++ b/debian/patches/patches/man-test.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: document conditional file expressions acting on the target of +# DP: symbolic links as well (except -h, -L). + +--- builtins/test.def~ 2002-04-04 21:48:17.000000000 +0200 ++++ builtins/test.def 2004-10-16 19:51:24.000000000 +0200 +@@ -60,6 +60,9 @@ + + FILE1 -ef FILE2 True if file1 is a hard link to file2. + ++All file operators except -h and -L are acting on the target of a symbolic ++link, not on the symlink itself, if FILE is a symbolic link. ++ + String operators: + + -z STRING True if string is empty. diff --git a/debian/patches/patches/man-test2-doc.dpatch b/debian/patches/patches/man-test2-doc.dpatch new file mode 100644 index 0000000..ef981a7 --- /dev/null +++ b/debian/patches/patches/man-test2-doc.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Document handling of parameters of the test builtin. + +--- doc/bashref.texi~ 2005-09-09 19:51:31.150172600 +0000 ++++ doc/bashref.texi 2005-09-09 19:52:12.693857000 +0000 +@@ -5264,6 +5264,10 @@ + Unless otherwise specified, primaries that operate on files follow symbolic + links and operate on the target of the link, rather than the link itself. + ++See the description of the @code{test} builtin command (section ++@pxref{Bash Builtins} below) for the handling of parameters ++(i.e. missing parameters). ++ + @table @code + @item -a @var{file} + True if @var{file} exists. diff --git a/debian/patches/patches/man-test2.dpatch b/debian/patches/patches/man-test2.dpatch new file mode 100644 index 0000000..f2cc08a --- /dev/null +++ b/debian/patches/patches/man-test2.dpatch @@ -0,0 +1,44 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Document handling of parameters of the test builtin. + +--- bash/builtins/test.def.orig 2008-11-29 17:41:32.000000000 +0000 ++++ bash/builtins/test.def 2008-11-29 17:44:25.000000000 +0000 +@@ -94,6 +94,9 @@ + less-than, less-than-or-equal, greater-than, or greater-than-or-equal + than ARG2. + ++See the bash manual page bash(1) for the handling of parameters (i.e. ++missing parameters). ++ + Exit Status: + Returns success if EXPR evaluates to true; fails if EXPR evaluates to + false or an invalid argument is given. +--- bash/doc/bash.1.~3~ 2009-12-30 15:45:17.063586386 +0100 ++++ bash/doc/bash.1 2009-12-30 15:53:33.021085355 +0100 +@@ -3843,6 +3843,10 @@ + .if n .sp 1 + When used with \fB[[\fP, The \fB<\fP and \fB>\fP operators sort + lexicographically using the current locale. ++.PP ++See the description of the \fItest\fP builtin command (section SHELL ++BUILTIN COMMANDS below) for the handling of parameters (i.e. ++missing parameters). + .sp 1 + .PD 0 + .TP diff --git a/debian/patches/patches/man-vx-opts.dpatch b/debian/patches/patches/man-vx-opts.dpatch new file mode 100644 index 0000000..e85b350 --- /dev/null +++ b/debian/patches/patches/man-vx-opts.dpatch @@ -0,0 +1,34 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: document -v / -x options + +--- ./doc/bash.1~ Wed Jan 20 22:48:04 1999 ++++ ./doc/bash.1 Sun Nov 14 13:26:59 1999 +@@ -104,6 +104,12 @@ + This option allows the positional parameters to be set + when invoking an interactive shell. + .TP ++.B \-v ++Print shell input lines as they are read. ++.TP ++.B \-x ++Print commands and their arguments as they are executed. ++.TP + .B \-D + A list of all double-quoted strings preceded by \fB$\fP + is printed on the standard ouput. diff --git a/debian/patches/patches/pgrp-pipe.dpatch b/debian/patches/patches/pgrp-pipe.dpatch new file mode 100644 index 0000000..21e9f3e --- /dev/null +++ b/debian/patches/patches/pgrp-pipe.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Define PGRP_PIPE to avoid race condition. + +--- config-bot.h 2004-03-19 17:56:23.000000000 -0500 ++++ config-bot.h 2005-09-16 14:32:33.000000000 -0400 +@@ -179,3 +179,6 @@ + + /* If you don't want bash to provide a default mail file to check. */ + #undef DEFAULT_MAIL_DIRECTORY ++ ++/* Bug #224543 */ ++#define PGRP_PIPE 1 + diff --git a/debian/patches/patches/privmode.dpatch b/debian/patches/patches/privmode.dpatch new file mode 100644 index 0000000..eb9abf2 --- /dev/null +++ b/debian/patches/patches/privmode.dpatch @@ -0,0 +1,37 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: XXX missing description +# DP: +# DP: Comment from Chet Ramey <chet@nike.ins.cwru.edu>: +# DP: +# DP: Nope. This will allow setuid scripts if not called as `sh' and not +# DP: called with the -p option. I won't install this. + + +diff -urb bash.orig/shell.c bash/shell.c +--- bash.orig/shell.c 2003-06-03 19:50:35.000000000 +0200 ++++ bash/shell.c 2003-09-28 00:26:28.000000000 +0200 +@@ -447,7 +447,7 @@ + if (dump_translatable_strings) + read_but_dont_execute = 1; + +- if (running_setuid && privileged_mode == 0) ++ if (running_setuid && privileged_mode == 0 && act_like_sh == 0) + disable_priv_mode (); + + /* Need to get the argument to a -c option processed in the diff --git a/debian/patches/patches/random.dpatch b/debian/patches/patches/random.dpatch new file mode 100644 index 0000000..6304468 --- /dev/null +++ b/debian/patches/patches/random.dpatch @@ -0,0 +1,107 @@ +#! /bin/sh -e + +dir=. +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir=$3 +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p1 < $0 + echo '2.05' > $dir/_distribution + echo '0' > $dir/_patchlevel + cd $dir && autoconf + rm -f $dir/_distribution $dir/_patchlevel + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 + rm -f $dir/configure $dir/_distribution $dir/_patchlevel + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: use the system random functions + +diff -urb bash.orig/config.h.in bash/config.h.in +--- bash.orig/config.h.in 2003-09-22 14:42:35.000000000 +0200 ++++ bash/config.h.in 2003-09-28 00:27:15.000000000 +0200 +@@ -606,6 +606,9 @@ + /* Define if you have the putenv function. */ + #undef HAVE_PUTENV + ++/* Define if you have the random function. */ ++#undef HAVE_RANDOM ++ + /* Define if you have the readlink function. */ + #undef HAVE_READLINK + +@@ -696,6 +699,9 @@ + /* Define if you have the strsignal function or macro. */ + #undef HAVE_STRSIGNAL + ++/* Define if you have the srandom function. */ ++#undef HAVE_SRANDOM ++ + /* Define if you have the sysconf function. */ + #undef HAVE_SYSCONF + +diff -urb bash.orig/variables.c bash/variables.c +--- bash.orig/variables.c 2003-07-31 16:28:57.000000000 +0200 ++++ bash/variables.c 2003-09-28 00:27:15.000000000 +0200 +@@ -1098,16 +1098,22 @@ + static unsigned long rseed = 1; + static int last_random_value; + +-/* A linear congruential random number generator based on the example +- one in the ANSI C standard. This one isn't very good, but a more +- complicated one is overkill. */ ++/* Use the random number genrator provided by the standard C library, ++ else use a linear congruential random number generator based on the ++ ANSI C standard. This one isn't very good (the values are alternately ++ odd and even, for example), but a more complicated one is overkill. */ + + /* Returns a pseudo-random number between 0 and 32767. */ + static int + brand () + { ++#if defined(HAVE_RANDOM) ++ rseed = (unsigned int) (labs(random()) & 32767); ++ return rseed; ++#else + rseed = rseed * 1103515245 + 12345; + return ((unsigned int)((rseed >> 16) & 32767)); /* was % 32768 */ ++#endif + } + + /* Set the random number generator seed to SEED. */ +@@ -1115,8 +1121,12 @@ + sbrand (seed) + unsigned long seed; + { ++#if defined(HAVE_SRANDOM) ++ srandom(seed); ++#else + rseed = seed; + last_random_value = 0; ++#endif + } + + static SHELL_VAR * +--- bash/configure.in~ 2004-03-02 00:04:29.000000000 +0100 ++++ bash/configure.in 2004-03-02 00:05:48.000000000 +0100 +@@ -667,6 +667,9 @@ + + AC_FUNC_MKTIME + ++dnl checks for random functions ++AC_CHECK_FUNCS(random srandom) ++ + dnl + dnl Checks for lib/intl and related code (uses some of the output from + dnl AM_GNU_GETTEXT) diff --git a/debian/patches/patches/rbash-manpage.dpatch b/debian/patches/patches/rbash-manpage.dpatch new file mode 100644 index 0000000..73a9969 --- /dev/null +++ b/debian/patches/patches/rbash-manpage.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: doc/rbash.1: fix bash(1) reference + +--- doc/rbash.1~ 1999-11-29 22:30:03.000000000 +0100 ++++ doc/rbash.1 2003-02-21 16:15:59.000000000 +0100 +@@ -3,6 +3,6 @@ + rbash \- restricted bash, see \fBbash\fR(1) + .SH RESTRICTED SHELL + .nr zY 1 +-.so bash.1 ++.so man1/bash.1 + .SH SEE ALSO + bash(1) diff --git a/debian/patches/patches/rl-del-backspace-policy.dpatch b/debian/patches/patches/rl-del-backspace-policy.dpatch new file mode 100644 index 0000000..ec56b43 --- /dev/null +++ b/debian/patches/patches/rl-del-backspace-policy.dpatch @@ -0,0 +1,48 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Handle Debian Backspace/Delete keyboard policy + +diff -urb bash.orig/lib/readline/terminal.c bash/lib/readline/terminal.c +--- bash.orig/lib/readline/terminal.c 2003-09-18 17:03:42.000000000 +0200 ++++ bash/lib/readline/terminal.c 2003-09-27 23:25:59.000000000 +0200 +@@ -148,6 +148,9 @@ + /* Insert key */ + static char *_rl_term_kI; + ++/* The key sequence sent by the Delete key, if any. */ ++static char *_rl_term_kD; ++ + /* Cursor control */ + static char *_rl_term_vs; /* very visible */ + static char *_rl_term_ve; /* normal */ +@@ -314,6 +317,7 @@ + { "ic", &_rl_term_ic }, + { "im", &_rl_term_im }, + { "kH", &_rl_term_kH }, /* home down ?? */ ++ { "kD", &_rl_term_kD }, /* delete */ + { "kI", &_rl_term_kI }, /* insert */ + { "kd", &_rl_term_kd }, + { "ke", &_rl_term_ke }, /* end keypad mode */ +@@ -492,6 +496,7 @@ + + rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */ + rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */ ++ rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete); /* Delete */ + + _rl_keymap = xkeymap; + } diff --git a/debian/patches/patches/rl-examples-bdb.dpatch b/debian/patches/patches/rl-examples-bdb.dpatch new file mode 100644 index 0000000..33cca15 --- /dev/null +++ b/debian/patches/patches/rl-examples-bdb.dpatch @@ -0,0 +1,30 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Modified readline examples to properly build with Debian setup. + +--- ./lib/readline/examples/rl.c~ Mon Nov 8 22:22:03 1999 ++++ ./lib/readline/examples/rl.c Fri Dec 31 17:34:30 1999 +@@ -11,7 +11,7 @@ + + #include <stdio.h> + #include <sys/types.h> +-#include "posixstat.h" ++#include <sys/stat.h> + + #if defined (READLINE_LIBRARY) + # include "readline.h" diff --git a/debian/patches/patches/rl-header.dpatch b/debian/patches/patches/rl-header.dpatch new file mode 100644 index 0000000..d147813 --- /dev/null +++ b/debian/patches/patches/rl-header.dpatch @@ -0,0 +1,28 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: include stdio.h in readline.h +--- lib/readline/readline.h~ Thu Aug 5 14:10:59 1999 ++++ lib/readline/readline.h Mon Oct 9 20:32:56 2000 +@@ -32,6 +32,7 @@ + # include "keymaps.h" + # include "tilde.h" + #else ++# include <stdio.h> + # include <readline/rlstdc.h> + # include <readline/keymaps.h> + # include <readline/tilde.h> diff --git a/debian/patches/patches/rl-setenv.dpatch b/debian/patches/patches/rl-setenv.dpatch new file mode 100644 index 0000000..9ae1d08 --- /dev/null +++ b/debian/patches/patches/rl-setenv.dpatch @@ -0,0 +1,30 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Prefer setenv over putenv + +--- lib/readline/shell.c~ 2004-10-17 13:07:37.000000000 +0200 ++++ lib/readline/shell.c 2004-10-17 13:06:48.000000000 +0200 +@@ -122,7 +122,7 @@ + { + char *b; + +-#if defined (HAVE_PUTENV) ++#if 0 + b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1); + sprintf (b, "LINES=%d", lines); + putenv (b); diff --git a/debian/patches/patches/template.dpatch b/debian/patches/patches/template.dpatch new file mode 100644 index 0000000..e583619 --- /dev/null +++ b/debian/patches/patches/template.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: <your description> diff --git a/debian/rules b/debian/rules index 0ff2789..54c4779 100755 --- a/debian/rules +++ b/debian/rules @@ -23,7 +23,7 @@ VERSION := 3.3 with_gfdl = no CC = gcc -CFLAGS = -g -O2 +CFLAGS = -g -O2 -Wall SHELL = bash YACC = bison -y |