summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-shells/dash/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-shells/dash/files')
-rw-r--r--app-shells/dash/files/dash-0.5.5.1-octal.patch29
-rw-r--r--app-shells/dash/files/dash-0.5.8.1-dumb-echo.patch105
-rw-r--r--app-shells/dash/files/dash-0.5.8.1-eval-warnx.patch12
3 files changed, 146 insertions, 0 deletions
diff --git a/app-shells/dash/files/dash-0.5.5.1-octal.patch b/app-shells/dash/files/dash-0.5.5.1-octal.patch
new file mode 100644
index 000000000000..760e4ad56209
--- /dev/null
+++ b/app-shells/dash/files/dash-0.5.5.1-octal.patch
@@ -0,0 +1,29 @@
+http://bugs.gentoo.org/337329
+
+do not interpret \\1 as an octal sequence. require it to start with \\0.
+
+--- a/src/bltin/printf.c
++++ b/src/bltin/printf.c
+@@ -247,18 +247,10 @@ conv_escape_str(char *str)
+ * They start with a \0, and are followed by 0, 1, 2,
+ * or 3 octal digits.
+ */
+- if (ch == '0') {
+- unsigned char i;
+- i = 3;
+- ch = 0;
+- do {
+- unsigned k = octtobin(*str);
+- if (k > 7)
+- break;
+- str++;
+- ch <<= 3;
+- ch += k;
+- } while (--i);
++ if (ch >= '1' && ch <= '9') {
++ /* Filter \1...\9; let \0 fall to conv_escape(). */
++ ch = '\\';
++ --str;
+ continue;
+ }
+
diff --git a/app-shells/dash/files/dash-0.5.8.1-dumb-echo.patch b/app-shells/dash/files/dash-0.5.8.1-dumb-echo.patch
new file mode 100644
index 000000000000..4059a80e3301
--- /dev/null
+++ b/app-shells/dash/files/dash-0.5.8.1-dumb-echo.patch
@@ -0,0 +1,105 @@
+http://bugs.gentoo.org/337329
+http://bugs.gentoo.org/527848
+
+there's no requirement for `echo` to support escape sequences. bash, by default,
+does not, while dash always does. POSIX permits either behavior:
+http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html
+
+however, since the behavior is not portable, no one should be relying on echo
+having any specific behavior. they should use `printf` when they want an escape
+sequence. it also makes dash smaller & faster to disable this logic entirely.
+
+--- a/src/bltin/printf.c
++++ b/src/bltin/printf.c
+@@ -439,34 +444,12 @@
+ int
+ echocmd(int argc, char **argv)
+ {
+- int nonl = 0;
+- struct output *outs = out1;
+-
+- if (!*++argv)
+- goto end;
+- if (equal(*argv, "-n")) {
+- nonl = ~nonl;
+- if (!*++argv)
+- goto end;
++ int i;
++ for (i = 1; i < argc; ++i) {
++ outstr(argv[i], out1);
++ if (i < argc - 1)
++ outc(' ', out1);
+ }
+-
+- do {
+- int c;
+-
+- nonl += conv_escape_str(*argv);
+- outstr(stackblock(), outs);
+- if (nonl > 0)
+- break;
+-
+- c = ' ';
+- if (!*++argv) {
+-end:
+- if (nonl) {
+- break;
+- }
+- c = '\n';
+- }
+- outc(c, outs);
+- } while (*argv);
++ outc('\n', out1);
+ return 0;
+ }
+--- a/src/dash.1
++++ b/src/dash.1
+@@ -1180,43 +1180,15 @@
+ option turns off the effect of any preceding
+ .Fl P
+ options.
+-.It Xo echo Op Fl n
++.It Xo echo
+ .Ar args...
+ .Xc
+ Print the arguments on the standard output, separated by spaces.
+-Unless the
+-.Fl n
+-option is present, a newline is output following the arguments.
+-.Pp
+-If any of the following sequences of characters is encountered during
+-output, the sequence is not output. Instead, the specified action is
+-performed:
+-.Bl -tag -width indent
+-.It Li \eb
+-A backspace character is output.
+-.It Li \ec
+-Subsequent output is suppressed. This is normally used at the end of the
+-last argument to suppress the trailing newline that
+-.Ic echo
+-would otherwise output.
+-.It Li \ef
+-Output a form feed.
+-.It Li \en
+-Output a newline character.
+-.It Li \er
+-Output a carriage return.
+-.It Li \et
+-Output a (horizontal) tab character.
+-.It Li \ev
+-Output a vertical tab.
+-.It Li \e0 Ns Ar digits
+-Output the character whose value is given by zero to three octal digits.
+-If there are zero digits, a nul character is output.
+-.It Li \e\e
+-Output a backslash.
+-.El
+ .Pp
+-All other backslash sequences elicit undefined behaviour.
++No arguments or backslash sequences are supported as they are not portable.
++They will be printed out exactly as passed in.
++.Pp
++You can replace `echo -n ...` with the portable `printf %s ...` construct.
+ .It eval Ar string ...
+ Concatenate all the arguments with spaces.
+ Then re-parse and execute the command.
diff --git a/app-shells/dash/files/dash-0.5.8.1-eval-warnx.patch b/app-shells/dash/files/dash-0.5.8.1-eval-warnx.patch
new file mode 100644
index 000000000000..51530bfdaf53
--- /dev/null
+++ b/app-shells/dash/files/dash-0.5.8.1-eval-warnx.patch
@@ -0,0 +1,12 @@
+fix one of the Debian patches -- it uses warnx but doesn't include err.h.
+
+--- a/src/eval.c
++++ b/src/eval.c
+@@ -36,6 +36,7 @@
+ #include <signal.h>
+ #include <unistd.h>
+ #include <sys/types.h>
++#include <err.h>
+
+ /*
+ * Evaluate a command.