From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-shells/dash/Manifest | 11 +++ app-shells/dash/dash-0.5.10.1-r2.ebuild | 79 +++++++++++++++++++ app-shells/dash/dash-0.5.10.2.ebuild | 81 +++++++++++++++++++ app-shells/dash/dash-0.5.9.1-r3.ebuild | 76 ++++++++++++++++++ app-shells/dash/files/dash-0.5.10-dumb-echo.patch | 92 ++++++++++++++++++++++ app-shells/dash/files/dash-0.5.10.1-parser.patch | 66 ++++++++++++++++ app-shells/dash/files/dash-0.5.9.1-dumb-echo.patch | 92 ++++++++++++++++++++++ .../dash/files/dash-0.5.9.1-format-security.patch | 13 +++ app-shells/dash/metadata.xml | 18 +++++ 9 files changed, 528 insertions(+) create mode 100644 app-shells/dash/Manifest create mode 100644 app-shells/dash/dash-0.5.10.1-r2.ebuild create mode 100644 app-shells/dash/dash-0.5.10.2.ebuild create mode 100644 app-shells/dash/dash-0.5.9.1-r3.ebuild create mode 100644 app-shells/dash/files/dash-0.5.10-dumb-echo.patch create mode 100644 app-shells/dash/files/dash-0.5.10.1-parser.patch create mode 100644 app-shells/dash/files/dash-0.5.9.1-dumb-echo.patch create mode 100644 app-shells/dash/files/dash-0.5.9.1-format-security.patch create mode 100644 app-shells/dash/metadata.xml (limited to 'app-shells/dash') diff --git a/app-shells/dash/Manifest b/app-shells/dash/Manifest new file mode 100644 index 000000000000..56fb9bdd1df8 --- /dev/null +++ b/app-shells/dash/Manifest @@ -0,0 +1,11 @@ +AUX dash-0.5.10-dumb-echo.patch 2612 BLAKE2B dd5fef2307ebc988b01f558373a5fb2be6bfa4e4d3abd72b179ce3d06a326769c5843416324971d00f363db92bcc691e6a555f7bac05544f2d9d21ac64026f4a SHA512 7f583e17f5b8df244575c0d08e7be8f213933d647168b85e19cc56378f1bb02f7fb83b8c87337c556b1436aaaca7d7367cb8566edaa43e3e7a4aaa7d87401323 +AUX dash-0.5.10.1-parser.patch 1963 BLAKE2B 205503ebbe7c805ab0e69b4821a507c01aa650161b3c8ef228e6ad08fbf25d650b3866af5992caa1be352cca1b1f790b698931faa9f918a1d8ef3bce7442741c SHA512 51e8b5edd6295e924f95a01bcba8d65ee667eb6bc274678914a675c207af598f1c02657a239becfc40040ef8dfe49da105f50f941d13ff414451d4bb4f091424 +AUX dash-0.5.9.1-dumb-echo.patch 2592 BLAKE2B 95e79281e579d0d40e320f0433fa94185f22e971a2e5c6b8a7686e96479a490c2d7820545875de2bdb81f52f7ce0b7ea0811a207c41601d7e2272c0829f07d14 SHA512 8dcbee6a53b46b78986c17860f84f47c94b3137b84cf46cd521ec9e4f0b5b4f5a2afbc9e7faa8130b591b3a0f9d2c9dc7853803c8b092c4ec1b5c5b7411fecbf +AUX dash-0.5.9.1-format-security.patch 374 BLAKE2B 63a9128f8a396e9c9808867ffdff90f1a176a99108db02d4ff03395d74c9eb69039604d3921cb26c42aced4411caa27cf20eafced3febbb4b175a7d118b66ca0 SHA512 4726d96ad1a86e47374c129f1cbd13bf5f2b6c77faa4e3e85be65978222cc040175313218fe29da176af2bbc2546c432d84247ea342d261a284b64b42ce138c6 +DIST dash-0.5.10.1.tar.gz 225253 BLAKE2B 55dbdca7f01d19656e002d6e210bcae920619e2e88d4d174a3e08cbbc40bf867ece3f24ce9690ec64f95b1f0995ab35cabc08381ac031a33b55282cec0b09e73 SHA512 7ca3bbcf8bac84d359cde710a9ab393f05cf8522e969a2c110d2e71620e53f349387128045e68738dc621afe0b48f43ae3d32851187f2ae02d49b3e2575ffa6b +DIST dash-0.5.10.2.tar.gz 225196 BLAKE2B af48879d29aee8041949b51f08eb89c3938e77b2e05553a3e1a9939da7b00fd80f7b9fb35f33e18b0c11850bfb1b8377e9dc9bcfd80754fd29c9d160e0ce5a4d SHA512 0ae29be77794df0ba254967649b9728611a75fbb3acd32ab6634d76399d1ce97c7d12d31da465482a7e4f3207093415c496c39525cace9b78ab3cb9444dd7640 +DIST dash-0.5.9.1.tar.gz 225217 BLAKE2B a80aa00ea5418d00b03c9ded21ef5c3a28d599059d1ac2f20082867b71ece6afac2f0bce9bc09946450c7618ad2c7f95df63b3d519a7f56552a291d09e44a71b SHA512 d56a043b8fab4693d3f70cceb531c37174e7ded4acd5549e53048d7ce29125ff21d7e758f51a4a73e06250d051e246467039989275838c19a2579edea3f72b7d +EBUILD dash-0.5.10.1-r2.ebuild 2144 BLAKE2B 993dd53a287bab6a660331ab88dc369688f1d70db9fb39749ade1b4d943916e484627e8ef746841e4aa5bb16795924ecf3286903be28423fbc3b24ed6bf91b59 SHA512 1193f962824e9255bc178bfacbee52fa8631b52903d667e8f3c904b26ced1c596a522450a6dd5dc9f1025e16ca4f6f952f81e96cbf81613ab30589e06b5192f6 +EBUILD dash-0.5.10.2.ebuild 2249 BLAKE2B bb1552561ed51bf94c514fe4dd8beddd6c14184c3a7ede04fdff5b000b1fe12ad51ee1e46faebd21cf50f09cd7e562e15db83e89125c1f9252d21eb323cb7b60 SHA512 7b98a1dcef2690d98a34e1dbb5a1e829bac2bf03eea3761ee9b322d14d7ad1a9cadf08c117040210c901bfaca93ccdbb193421cc1148492323cbc25faba3d105 +EBUILD dash-0.5.9.1-r3.ebuild 2102 BLAKE2B 4afafb3ed350dead0d0383877b612b8891d4241f742fbf7bac0f28f7c42bf0e29a59f5f512fbdc9914197cc930241b789e74239a33757f4383527cfe6b563b98 SHA512 9145720f7d1e33a8c6c60f265ba7574bed868893bb8190726afdd9ffb09a18f4c624f761ffe08746f2ec9f68f69611f8751684a04827bd480bb783056a9928ef +MISC metadata.xml 598 BLAKE2B 0ec9bc56758f158bfce29ffcbbb84c45abe17cd477014fa428240a9af5a4a9f8740c5a66f4aa4828795135d7464426c65410702e81aea81befec5e11a07ec3fa SHA512 a477ff729919625c910ef9a0b95ea85e683122383c4026c1c51f163d8faca06749ec05eef8b4f01ed9eede68b49e637f24f94202b8a00e67bb01bc21294610e6 diff --git a/app-shells/dash/dash-0.5.10.1-r2.ebuild b/app-shells/dash/dash-0.5.10.1-r2.ebuild new file mode 100644 index 000000000000..09d6f32c73f1 --- /dev/null +++ b/app-shells/dash/dash-0.5.10.1-r2.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs versionator + +#MY_PV="$(get_version_component_range 1-3)" +DEB_PATCH="" #$(get_version_component_range 4) +#MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Debian Almquist Shell" +HOMEPAGE="http://gondor.apana.org.au/~herbert/dash/" +SRC_URI="http://gondor.apana.org.au/~herbert/dash/files/${P}.tar.gz" +if [[ -n "${DEB_PATCH}" ]] ; then + DEB_PF="${PN}_${MY_PV}-${DEB_PATCH}" + SRC_URI+=" mirror://debian/pool/main/d/dash/${DEB_PF}.diff.gz" +fi + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="libedit static vanilla" + +RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )" +DEPEND="${RDEPEND} + virtual/pkgconfig + libedit? ( static? ( dev-libs/libedit[static-libs] ) )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.5.9.1-format-security.patch + "${FILESDIR}"/${P}-parser.patch +) + +src_prepare() { + if [[ -n "${DEB_PATCH}" ]] ; then + eapply "${WORKDIR}"/${DEB_PF}.diff + eapply */debian/diff/* + fi + + #337329 #527848 + use vanilla || eapply "${FILESDIR}"/${PN}-0.5.10-dumb-echo.patch + + default + + # Fix the invalid sort + sed -i -e 's/LC_COLLATE=C/LC_ALL=C/g' src/mkbuiltins + + # Use pkg-config for libedit linkage + sed -i \ + -e "/LIBS/s:-ledit:\`$(tc-getPKG_CONFIG) --libs libedit $(usex static --static '')\`:" \ + configure || die +} + +src_configure() { + # don't redefine stat on Solaris + if [[ ${CHOST} == *-solaris* ]] ; then + export ac_cv_func_stat64=yes + fi + append-cppflags -DJOBS=$(usex libedit 1 0) + use static && append-ldflags -static + # Do not pass --enable-glob due to #443552. + # Autotools use $LINENO as a proxy for extended debug support + # (i.e. they're running bash), so disable that. #527644 + local myeconfargs=( + --bindir="${EPREFIX}"/bin + --enable-fnmatch + --disable-lineno + $(use_with libedit) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + if [[ -n "${DEB_PATCH}" ]] ; then + dodoc */debian/changelog + fi +} diff --git a/app-shells/dash/dash-0.5.10.2.ebuild b/app-shells/dash/dash-0.5.10.2.ebuild new file mode 100644 index 000000000000..4935f47043ac --- /dev/null +++ b/app-shells/dash/dash-0.5.10.2.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs versionator + +#MY_PV="$(get_version_component_range 1-3)" +DEB_PATCH="" #$(get_version_component_range 4) +#MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Debian Almquist Shell" +HOMEPAGE="http://gondor.apana.org.au/~herbert/dash/" +SRC_URI="http://gondor.apana.org.au/~herbert/dash/files/${P}.tar.gz" +if [[ -n "${DEB_PATCH}" ]] ; then + DEB_PF="${PN}_${MY_PV}-${DEB_PATCH}" + SRC_URI+=" mirror://debian/pool/main/d/dash/${DEB_PF}.diff.gz" +fi + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="libedit static vanilla" + +RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )" +DEPEND="${RDEPEND} + virtual/pkgconfig + libedit? ( static? ( dev-libs/libedit[static-libs] ) )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.5.9.1-format-security.patch +) + +src_prepare() { + if [[ -n "${DEB_PATCH}" ]] ; then + eapply "${WORKDIR}"/${DEB_PF}.diff + eapply */debian/diff/* + fi + + #337329 #527848 + use vanilla || eapply "${FILESDIR}"/${PN}-0.5.10-dumb-echo.patch + + default + + # Fix the invalid sort + sed -i -e 's/LC_COLLATE=C/LC_ALL=C/g' src/mkbuiltins + + # Use pkg-config for libedit linkage + sed -i \ + -e "/LIBS/s:-ledit:\`$(tc-getPKG_CONFIG) --libs libedit $(usex static --static '')\`:" \ + configure || die +} + +src_configure() { + # don't redefine stat on Solaris + if [[ ${CHOST} == *-solaris* ]] ; then + export ac_cv_func_stat64=yes + + # if your headers strictly adhere to POSIX, you'll need this too + [[ ${CHOST##*solaris2.} -le 10 ]] && append-cppflags -DNAME_MAX=255 + fi + append-cppflags -DJOBS=$(usex libedit 1 0) + use static && append-ldflags -static + # Do not pass --enable-glob due to #443552. + # Autotools use $LINENO as a proxy for extended debug support + # (i.e. they're running bash), so disable that. #527644 + local myeconfargs=( + --bindir="${EPREFIX}"/bin + --enable-fnmatch + --disable-lineno + $(use_with libedit) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + if [[ -n "${DEB_PATCH}" ]] ; then + dodoc */debian/changelog + fi +} diff --git a/app-shells/dash/dash-0.5.9.1-r3.ebuild b/app-shells/dash/dash-0.5.9.1-r3.ebuild new file mode 100644 index 000000000000..44c8851d7e4a --- /dev/null +++ b/app-shells/dash/dash-0.5.9.1-r3.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs versionator + +#MY_PV="$(get_version_component_range 1-3)" +DEB_PATCH="" #$(get_version_component_range 4) +#MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Debian Almquist Shell" +HOMEPAGE="http://gondor.apana.org.au/~herbert/dash/" +SRC_URI="http://gondor.apana.org.au/~herbert/dash/files/${P}.tar.gz" +if [[ -n "${DEB_PATCH}" ]] ; then + DEB_PF="${PN}_${MY_PV}-${DEB_PATCH}" + SRC_URI+=" mirror://debian/pool/main/d/dash/${DEB_PF}.diff.gz" +fi + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="libedit static vanilla" + +RDEPEND="!static? ( libedit? ( dev-libs/libedit ) )" +DEPEND="${RDEPEND} + virtual/pkgconfig + libedit? ( static? ( dev-libs/libedit[static-libs] ) )" + +PATCHES=( "${FILESDIR}"/${PN}-0.5.9.1-format-security.patch ) + +src_prepare() { + if [[ -n "${DEB_PATCH}" ]] ; then + eapply "${WORKDIR}"/${DEB_PF}.diff + eapply */debian/diff/* + fi + + #337329 #527848 + use vanilla || eapply "${FILESDIR}"/${PN}-0.5.9.1-dumb-echo.patch + + default + + # Fix the invalid sort + sed -i -e 's/LC_COLLATE=C/LC_ALL=C/g' src/mkbuiltins + + # Use pkg-config for libedit linkage + sed -i \ + -e "/LIBS/s:-ledit:\`$(tc-getPKG_CONFIG) --libs libedit $(usex static --static '')\`:" \ + configure || die +} + +src_configure() { + # don't redefine stat on Solaris + if [[ ${CHOST} == *-solaris* ]] ; then + export ac_cv_func_stat64=yes + fi + append-cppflags -DJOBS=$(usex libedit 1 0) + use static && append-ldflags -static + # Do not pass --enable-glob due to #443552. + # Autotools use $LINENO as a proxy for extended debug support + # (i.e. they're running bash), so disable that. #527644 + local myeconfargs=( + --bindir="${EPREFIX}"/bin + --enable-fnmatch + --disable-lineno + $(use_with libedit) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + if [[ -n "${DEB_PATCH}" ]] ; then + dodoc */debian/changelog + fi +} diff --git a/app-shells/dash/files/dash-0.5.10-dumb-echo.patch b/app-shells/dash/files/dash-0.5.10-dumb-echo.patch new file mode 100644 index 000000000000..35d324609302 --- /dev/null +++ b/app-shells/dash/files/dash-0.5.10-dumb-echo.patch @@ -0,0 +1,92 @@ +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. + +--- dash-0.5.10/src/bltin/printf.c ++++ dash-0.5.10/src/bltin/printf.c +@@ -457,22 +457,13 @@ + int + echocmd(int argc, char **argv) + { +- const char *lastfmt = snlfmt; +- int nonl; ++ int i; + +- if (*++argv && equal(*argv, "-n")) { +- argv++; +- lastfmt = "%s"; ++ for (i = 1; i < argc; ++i) { ++ outstr(argv[i], out1); ++ if (i < argc - 1) ++ outc(' ', out1); + } +- +- do { +- const char *fmt = "%s "; +- char *s = *argv; +- +- if (!s || !*++argv) +- fmt = lastfmt; +- +- nonl = print_escape_str(fmt, NULL, NULL, s ?: nullstr); +- } while (!nonl && *argv); ++ outc('\n', out1); + return 0; + } +--- dash-0.5.10/src/dash.1 ++++ dash-0.5.10/src/dash.1 +@@ -1182,43 +1182,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 ++No arguments or backslash sequences are supported as they are not portable. ++They will be printed out exactly as passed in. + .Pp +-All other backslash sequences elicit undefined behaviour. ++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.10.1-parser.patch b/app-shells/dash/files/dash-0.5.10.1-parser.patch new file mode 100644 index 000000000000..0939b7cb7222 --- /dev/null +++ b/app-shells/dash/files/dash-0.5.10.1-parser.patch @@ -0,0 +1,66 @@ +From 469c5fd4f57622b1a6571172898ab29430319d4a Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Fri, 11 May 2018 23:41:25 +0800 +Subject: parser: Fix incorrect eating of backslash newlines + +With the introduction of synstack->syntax, a number of references +to the syntax variable was missed during the conversion. This +causes backslash newlines to be incorrectly removed in single +quote context. + +This patch also combines these calls into a new helper function +pgetc_top. + +Fixes: ab1cecb40478 ("parser: Add syntax stack for recursive...") +Reported-by: Leah Neukirchen +Signed-off-by: Herbert Xu +--- + src/parser.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/parser.c b/src/parser.c +index 8e40781..8bd3db4 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -853,6 +853,11 @@ static int pgetc_eatbnl(void) + return c; + } + ++static int pgetc_top(struct synstack *stack) ++{ ++ return stack->syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl(); ++} ++ + static void synstack_push(struct synstack **stack, struct synstack *next, + const char *syntax) + { +@@ -915,7 +920,7 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) + attyline(); + if (synstack->syntax == BASESYNTAX) + return readtoken(); +- c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl(); ++ c = pgetc_top(synstack); + goto loop; + } + #endif +@@ -929,7 +934,7 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) + goto endword; /* exit outer loop */ + USTPUTC(c, out); + nlprompt(); +- c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl(); ++ c = pgetc_top(synstack); + goto loop; /* continue outer loop */ + case CWORD: + USTPUTC(c, out); +@@ -1056,7 +1061,7 @@ toggledq: + USTPUTC(c, out); + } + } +- c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl(); ++ c = pgetc_top(synstack); + } + } + endword: +-- +cgit v1.1 + diff --git a/app-shells/dash/files/dash-0.5.9.1-dumb-echo.patch b/app-shells/dash/files/dash-0.5.9.1-dumb-echo.patch new file mode 100644 index 000000000000..cbf5febafd19 --- /dev/null +++ b/app-shells/dash/files/dash-0.5.9.1-dumb-echo.patch @@ -0,0 +1,92 @@ +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. + +--- dash-0.5.9.1/src/bltin/printf.c ++++ dash-0.5.9.1/src/bltin/printf.c +@@ -449,21 +449,12 @@ + int + echocmd(int argc, char **argv) + { +- int nonl; +- +- nonl = *++argv ? equal(*argv, "-n") : 0; +- argv += nonl; +- +- do { +- int c; +- +- if (likely(*argv)) +- nonl += print_escape_str("%s", NULL, NULL, *argv++); +- if (likely((nonl + !*argv) > 1)) +- break; +- +- c = *argv ? ' ' : '\n'; +- out1c(c); +- } while (*argv); ++ int i; ++ for (i = 1; i < argc; ++i) { ++ outstr(argv[i], out1); ++ if (i < argc - 1) ++ outc(' ', out1); ++ } ++ outc('\n', out1); + return 0; + } +--- dash-0.5.9.1/src/dash.1 ++++ dash-0.5.9.1/src/dash.1 +@@ -1182,43 +1182,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 ++No arguments or backslash sequences are supported as they are not portable. ++They will be printed out exactly as passed in. + .Pp +-All other backslash sequences elicit undefined behaviour. ++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.9.1-format-security.patch b/app-shells/dash/files/dash-0.5.9.1-format-security.patch new file mode 100644 index 000000000000..ea2114f392b3 --- /dev/null +++ b/app-shells/dash/files/dash-0.5.9.1-format-security.patch @@ -0,0 +1,13 @@ +Origin: https://bugzilla.redhat.com/show_bug.cgi?id=1037030#c2 + +--- a/src/jobs.c ++++ a/src/jobs.c +@@ -427,7 +427,7 @@ sprint_status(char *s, int status, int sigonly) + goto out; + #endif + } +- col = fmtstr(s, 32, strsignal(st)); ++ col = fmtstr(s, 32, "%s", strsignal(st)); + #ifdef WCOREDUMP + if (WCOREDUMP(status)) { + col += fmtstr(s + col, 16, " (core dumped)"); diff --git a/app-shells/dash/metadata.xml b/app-shells/dash/metadata.xml new file mode 100644 index 000000000000..0d01a34d50df --- /dev/null +++ b/app-shells/dash/metadata.xml @@ -0,0 +1,18 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + cpe:/a:dash:dash + + + Support echo -n, and enable echo -e all the time (unsupported) + + + DASH is a direct descendant of the NetBSD version of ash (the Almquist SHell) + and is POSIX compliant. + + -- cgit v1.2.3