Skip to content
Snippets Groups Projects
Verified Commit 1e22a073 authored by Anna Wilcox's avatar Anna Wilcox :fox:
Browse files

system/dash: Update to 0.5.12

parent f441488d
No related branches found
No related tags found
1 merge request!690system/ repo updates from A.
# 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"
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
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment