summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2023-03-31 00:50:40 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2023-04-01 21:20:00 -0500
commit1e22a0733e5969aed017e75ee44c7a4ba93a980d (patch)
tree4390a1c110502bc657c8d57bdda54ae62ae049bb
parentf441488dd1040792617e6231bb38238c0f9057fe (diff)
downloadpackages-1e22a0733e5969aed017e75ee44c7a4ba93a980d.tar.gz
packages-1e22a0733e5969aed017e75ee44c7a4ba93a980d.tar.bz2
packages-1e22a0733e5969aed017e75ee44c7a4ba93a980d.tar.xz
packages-1e22a0733e5969aed017e75ee44c7a4ba93a980d.zip
system/dash: Update to 0.5.12
-rw-r--r--system/dash/APKBUILD11
-rw-r--r--system/dash/posix-dashes.patch87
-rw-r--r--system/dash/ulimit-dash-r.patch33
3 files changed, 128 insertions, 3 deletions
diff --git a/system/dash/APKBUILD b/system/dash/APKBUILD
index 4733a9763..06785c7f2 100644
--- a/system/dash/APKBUILD
+++ b/system/dash/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=dash
-pkgver=0.5.11.5
+pkgver=0.5.12
pkgrel=0
pkgdesc="Small and fast POSIX-compliant shell"
url="http://gondor.apana.org.au/~herbert/dash/"
@@ -10,7 +10,10 @@ license="GPL-2.0+"
depends=""
makedepends=""
subpackages="$pkgname-binsh::noarch $pkgname-doc"
-source="http://gondor.apana.org.au/~herbert/$pkgname/files/$pkgname-$pkgver.tar.gz"
+source="http://gondor.apana.org.au/~herbert/$pkgname/files/$pkgname-$pkgver.tar.gz
+ ulimit-dash-r.patch
+ posix-dashes.patch
+ "
build() {
./configure \
@@ -41,4 +44,6 @@ binsh() {
ln -s /bin/dash "$subpkgdir"/bin/sh
}
-sha512sums="5387e213820eeb44d812bb4697543023fd4662b51a9ffd52a702810fed8b28d23fbe35a7f371e6686107de9f81902eff109458964b4622f4c5412d60190a66bf dash-0.5.11.5.tar.gz"
+sha512sums="13bd262be0089260cbd13530a9cf34690c0abeb2f1920eb5e61be7951b716f9f335b86279d425dbfae56cbd49231a8fdffdff70601a5177da3d543be6fc5eb17 dash-0.5.12.tar.gz
+84e5bf95c5824d1929d1c10935d0197715277aa29e2481dee03302731c06e97afb953ef6e4f6099a7abfd88fc0a52e3cf38e3d30d497dc3040ed4dc5d9802506 ulimit-dash-r.patch
+b0dd2742f58fb17725624aaad25bcef10bf54c1c4ec8237e1d5e45552aceecbc4bcf491f1f7b7b7a2dea4168939b07f7671d706e43d6e148d171cf48b389aa0c posix-dashes.patch"
diff --git a/system/dash/posix-dashes.patch b/system/dash/posix-dashes.patch
new file mode 100644
index 000000000..b852ec20c
--- /dev/null
+++ b/system/dash/posix-dashes.patch
@@ -0,0 +1,87 @@
+From 54485578e01017534dae30731f7682abadb38a09 Mon Sep 17 00:00:00 2001
+From: наб <nabijaczleweli@nabijaczleweli.xyz>
+Date: Wed, 4 Jan 2023 12:33:45 +0100
+Subject: builtin: Ignore first -- in getopts per POSIX
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Issue 7, XCU, getopts, OPTIONS reads "None.",
+and getopts isn't a special built-in listed in sexion 2.14 ‒
+this means that XCU, 1. Introduction, 1.4 Utility Description Defaults,
+OPTIONS, Default Behavior applies:
+ Default Behavior: When this section is listed as "None.", it means
+ that the implementation need not support any options. Standard
+ utilities that do not accept options, but that do accept operands,
+ shall recognize "--" as a first argument to be discarded.
+
+Test with: getopts -- d: a
+Correct output is no output, exit 1
+Wrong output errors out with d: being an invalid argument name
+
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+---
+ src/options.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/options.c b/src/options.c
+index 3158498..2d4bd3b 100644
+--- a/src/options.c
++++ b/src/options.c
+@@ -409,6 +409,9 @@ getoptscmd(int argc, char **argv)
+ {
+ char **optbase;
+
++ nextopt(nullstr);
++ argc -= argptr - argv - 1;
++ argv = argptr - 1;
+ if (argc < 3)
+ sh_error("Usage: getopts optstring var [arg...]");
+ else if (argc == 3) {
+--
+cgit
+
+From ba57b84b305dd16f9d3e0d798835a7e9e15454ae Mon Sep 17 00:00:00 2001
+From: наб <nabijaczleweli@nabijaczleweli.xyz>
+Date: Wed, 4 Jan 2023 12:35:13 +0100
+Subject: builtin: Ignore first -- in type for consistency
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This appears to be the only remaining built-in that doesn't use
+nextopt() to parse its arguments (and isn't forbidden from doing so) ‒
+users expect to be able to do this, and it's nice to be consistent here.
+
+Test with: type -- ls --
+Correct output lists ls=/bin/ls, then --=ENOENT
+Wrong output lists --=ENOENT, ls=/bin/ls, --=ENOENT
+
+Fixes: https://bugs.debian.org/870317
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+---
+ src/exec.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/exec.c b/src/exec.c
+index d7a1f53..83cba94 100644
+--- a/src/exec.c
++++ b/src/exec.c
+@@ -766,11 +766,11 @@ unsetfunc(const char *name)
+ int
+ typecmd(int argc, char **argv)
+ {
+- int i;
+ int err = 0;
+
+- for (i = 1; i < argc; i++) {
+- err |= describe_command(out1, argv[i], NULL, 1);
++ nextopt(nullstr);
++ while (*argptr) {
++ err |= describe_command(out1, *argptr++, NULL, 1);
+ }
+ return err;
+ }
+--
+cgit
+
diff --git a/system/dash/ulimit-dash-r.patch b/system/dash/ulimit-dash-r.patch
new file mode 100644
index 000000000..48111f16d
--- /dev/null
+++ b/system/dash/ulimit-dash-r.patch
@@ -0,0 +1,33 @@
+From 4bdefd16c6ea4b5b7c2b4dc2fccf5226401e13b7 Mon Sep 17 00:00:00 2001
+From: Vincent Lefevre <vincent@vinc17.net>
+Date: Fri, 16 Dec 2022 18:20:19 +0100
+Subject: builtin: Actually accept ulimit -r
+
+The original commit that added it supposes this works, but it only adds
+it to the ulimit -a listing and the manual, but doesn't allow it as an
+option.
+
+Fixes: 46abc8c6d8a5 ("[BUILTIN] Add support for ulimit -r")
+Link: https://bugs.debian.org/975326
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+---
+ src/miscbltin.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/miscbltin.c b/src/miscbltin.c
+index 5ccbbcb..e553f9e 100644
+--- a/src/miscbltin.c
++++ b/src/miscbltin.c
+@@ -440,6 +440,9 @@ ulimitcmd(int argc, char **argv)
+ #endif
+ #ifdef RLIMIT_LOCKS
+ "w"
++#endif
++#ifdef RLIMIT_RTPRIO
++ "r"
+ #endif
+ )) != '\0')
+ switch (optc) {
+--
+cgit
+