Better support for socket buffer size limits. Clean up env usage (not needed any longer). Bump PKGREVISION.diff -r1.58 -r1.59 pkgsrc/shells/zsh/Makefile
(wiz)
@@ -1,36 +1,32 @@ | @@ -1,36 +1,32 @@ | |||
1 | # $NetBSD: Makefile,v 1.58 2012/08/17 10:53:09 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.59 2012/08/17 12:15:37 wiz Exp $ | |
2 | 2 | |||
3 | .include "../../shells/zsh/Makefile.common" | 3 | .include "../../shells/zsh/Makefile.common" | |
4 | 4 | |||
5 | ZSH_VERSION= 5.0.0 | 5 | ZSH_VERSION= 5.0.0 | |
6 | ZSH_MAINTAINER= uebayasi@NetBSD.org | 6 | ZSH_MAINTAINER= uebayasi@NetBSD.org | |
7 | PKGREVISION= 1 | 7 | PKGREVISION= 2 | |
8 | ||||
9 | USE_TOOLS+= env | |||
10 | 8 | |||
11 | CONFIGURE_ARGS+= --disable-gdbm | 9 | CONFIGURE_ARGS+= --disable-gdbm | |
12 | 10 | |||
13 | SUBST_CLASSES+= prefix-fixup | 11 | SUBST_CLASSES+= prefix-fixup | |
14 | SUBST_STAGE.prefix-fixup= pre-configure | 12 | SUBST_STAGE.prefix-fixup= pre-configure | |
15 | SUBST_FILES.prefix-fixup= \ | 13 | SUBST_FILES.prefix-fixup= \ | |
16 | Misc/globtests \ | 14 | Misc/globtests \ | |
17 | Misc/globtests.ksh \ | 15 | Misc/globtests.ksh \ | |
18 | Test/ztst.zsh \ | 16 | Test/ztst.zsh \ | |
19 | Util/reporter \ | 17 | Util/reporter \ | |
20 | Functions/Calendar/calendar_add \ | 18 | Functions/Calendar/calendar_add \ | |
21 | Functions/Misc/run-help \ | 19 | Functions/Misc/run-help \ | |
22 | Functions/Misc/checkmail \ | 20 | Functions/Misc/checkmail \ | |
23 | Functions/Misc/sticky-note \ | 21 | Functions/Misc/sticky-note \ | |
24 | Functions/Misc/zcalc \ | 22 | Functions/Misc/zcalc \ | |
25 | Functions/Misc/zkbd \ | 23 | Functions/Misc/zkbd \ | |
26 | Functions/Misc/zed \ | 24 | Functions/Misc/zed \ | |
27 | Functions/Example/cat | 25 | Functions/Example/cat | |
28 | SUBST_SED.prefix-fixup= \ | 26 | SUBST_SED.prefix-fixup= \ | |
29 | -e 's|^\#\!/bin/env|\#\!${TOOLS_PATH.env}|g' \ | |||
30 | -e 's|^\#\! /bin/env|\#\! ${TOOLS_PATH.env}|g' \ | |||
31 | -e 's|^\#\!/bin/zsh|\#\!${PREFIX}/bin/zsh|g' \ | 27 | -e 's|^\#\!/bin/zsh|\#\!${PREFIX}/bin/zsh|g' \ | |
32 | -e 's|^\#\! /bin/zsh|\#\! ${PREFIX}/bin/zsh|g' \ | 28 | -e 's|^\#\! /bin/zsh|\#\! ${PREFIX}/bin/zsh|g' \ | |
33 | -e 's|^\#\!/usr/local/bin/zsh|\#\!${PREFIX}/bin/zsh|g' \ | 29 | -e 's|^\#\!/usr/local/bin/zsh|\#\!${PREFIX}/bin/zsh|g' \ | |
34 | -e 's|^\#\! /usr/local/bin/zsh|\#\! ${PREFIX}/bin/zsh|g' | 30 | -e 's|^\#\! /usr/local/bin/zsh|\#\! ${PREFIX}/bin/zsh|g' | |
35 | 31 | |||
36 | .include "../../mk/bsd.pkg.mk" | 32 | .include "../../mk/bsd.pkg.mk" |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: distinfo,v 1.39 2012/08/17 10:53:09 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.40 2012/08/17 12:15:37 wiz Exp $ | |
2 | 2 | |||
3 | SHA1 (zsh-5.0.0.tar.bz2) = 692669243433c55384a54b397a1cc926e582e9f2 | 3 | SHA1 (zsh-5.0.0.tar.bz2) = 692669243433c55384a54b397a1cc926e582e9f2 | |
4 | RMD160 (zsh-5.0.0.tar.bz2) = d2aff295e245dd5e805215c6dcca1e76af8b9725 | 4 | RMD160 (zsh-5.0.0.tar.bz2) = d2aff295e245dd5e805215c6dcca1e76af8b9725 | |
5 | Size (zsh-5.0.0.tar.bz2) = 3014362 bytes | 5 | Size (zsh-5.0.0.tar.bz2) = 3014362 bytes | |
6 | SHA1 (patch-Doc_Zsh_builtins.yo) = 37f1d49ae99da20b9027b2b386422cc8bb3d509a | 6 | SHA1 (patch-Doc_Zsh_builtins.yo) = 04dd90403760c5d774024cbe641d7cc5e6d0877f | |
7 | SHA1 (patch-Src_Builtins_rlimits.awk) = dd397c3d9dd39da15d4338055ce909e787f67cba | 7 | SHA1 (patch-Src_Builtins_rlimits.awk) = dd397c3d9dd39da15d4338055ce909e787f67cba | |
8 | SHA1 (patch-Src_Builtins_rlimits.c) = c607f322fe105f79bdb8817020330da1d3eab8ba | 8 | SHA1 (patch-Src_Builtins_rlimits.c) = 3faf198d63bdc13eb91a70393a668438b9e9593c | |
9 | SHA1 (patch-Src_prototypes.h) = 14a766668bda382b3fc736ef4fccf49670e1be9c | 9 | SHA1 (patch-Src_prototypes.h) = 14a766668bda382b3fc736ef4fccf49670e1be9c | |
10 | SHA1 (patch-Src_zsh__system.h) = 1d5827a571b897ae139cb7b0c31d3e5a429aa190 | 10 | SHA1 (patch-Src_zsh__system.h) = 1d5827a571b897ae139cb7b0c31d3e5a429aa190 | |
11 | SHA1 (patch-ab) = ebde4d35de2754dc9113988930764552c4bf811e | 11 | SHA1 (patch-ab) = ebde4d35de2754dc9113988930764552c4bf811e | |
12 | SHA1 (patch-ac) = a442cbf576582a7efb2f25d20c20db7f7fc64346 | 12 | SHA1 (patch-ac) = a442cbf576582a7efb2f25d20c20db7f7fc64346 | |
13 | SHA1 (patch-config.h.in) = 2853aa18096bedaa8864a2eb8a5948024712d466 | 13 | SHA1 (patch-config.h.in) = 2853aa18096bedaa8864a2eb8a5948024712d466 | |
14 | SHA1 (patch-configure.ac) = 7ce0c325557185485bf9462d030d4f64d579788f | 14 | SHA1 (patch-configure.ac) = 7ce0c325557185485bf9462d030d4f64d579788f |
@@ -1,36 +1,39 @@ | @@ -1,36 +1,39 @@ | |||
1 | $NetBSD: patch-Doc_Zsh_builtins.yo,v 1.1 2012/08/17 10:53:10 wiz Exp $ | 1 | $NetBSD: patch-Doc_Zsh_builtins.yo,v 1.2 2012/08/17 12:15:37 wiz Exp $ | |
2 | 2 | |||
3 | Add support for thread limits. | 3 | Add support for thread limits and socket buffer size. | |
4 | From Peter Stephenson <Peter.Stephenson@csr.com> on zsh-workers. | 4 | From Peter Stephenson <Peter.Stephenson@csr.com> on zsh-workers. | |
5 | 5 | |||
6 | --- Doc/Zsh/builtins.yo.orig 2012-03-13 20:04:40.000000000 +0000 | 6 | --- Doc/Zsh/builtins.yo.orig 2012-03-13 20:04:40.000000000 +0000 | |
7 | +++ Doc/Zsh/builtins.yo | 7 | +++ Doc/Zsh/builtins.yo | |
8 | @@ -1736,7 +1736,7 @@ enditem() | 8 | @@ -1736,7 +1736,7 @@ enditem() | |
9 | findex(ulimit) | 9 | findex(ulimit) | |
10 | cindex(resource limits) | 10 | cindex(resource limits) | |
11 | cindex(limits, resource) | 11 | cindex(limits, resource) | |
12 | -item(tt(ulimit) [ [ tt(-SHacdfilmnpqstvx) | tt(-N) var(resource) [ var(limit) ] ... ])( | 12 | -item(tt(ulimit) [ [ tt(-SHacdfilmnpqstvx) | tt(-N) var(resource) [ var(limit) ] ... ])( | |
13 | +item(tt(ulimit) [ [ tt(-SHacdfilmnpqrstvx) | tt(-N) var(resource) [ var(limit) ] ... ])( | 13 | +item(tt(ulimit) [ [ tt(-SHacdfilmnpqrstvx) | tt(-N) var(resource) [ var(limit) ] ... ])( | |
14 | Set or display resource limits of the shell and the processes started by | 14 | Set or display resource limits of the shell and the processes started by | |
15 | the shell. The value of var(limit) can be a number in the unit specified | 15 | the shell. The value of var(limit) can be a number in the unit specified | |
16 | below or one of the values `tt(unlimited)', which removes the limit on the | 16 | below or one of the values `tt(unlimited)', which removes the limit on the | |
17 | @@ -1757,6 +1757,9 @@ When looping over multiple resources, th | 17 | @@ -1757,8 +1757,12 @@ When looping over multiple resources, th | |
18 | it detects a badly formed argument. However, if it fails to set a limit | 18 | it detects a badly formed argument. However, if it fails to set a limit | |
19 | for some other reason it will continue trying to set the remaining limits. | 19 | for some other reason it will continue trying to set the remaining limits. | |
20 | 20 | |||
21 | +Not all the following resources are supported on all systems. Running | 21 | +Not all the following resources are supported on all systems. Running | |
22 | +tt(ulimit -a) will show which are supported. | 22 | +tt(ulimit -a) will show which are supported. | |
23 | + | 23 | + | |
24 | startsitem() | 24 | startsitem() | |
25 | sitem(tt(-a))(Lists all of the current resource limits.) | 25 | sitem(tt(-a))(Lists all of the current resource limits.) | |
26 | +sitem(tt(-b))(Socket buffer size in bytes LPAR()N.B. not kilobytes+RPAR()) | |||
26 | sitem(tt(-c))(512-byte blocks on the size of core dumps.) | 27 | sitem(tt(-c))(512-byte blocks on the size of core dumps.) | |
27 | @@ -1769,7 +1772,8 @@ sitem(tt(-n))(open file descriptors.) | 28 | sitem(tt(-d))(K-bytes on the size of the data segment.) | |
29 | sitem(tt(-f))(512-byte blocks on the size of files written.) | |||
30 | @@ -1769,7 +1773,8 @@ sitem(tt(-n))(open file descriptors.) | |||
28 | sitem(tt(-q))(Bytes in POSIX message queues.) | 31 | sitem(tt(-q))(Bytes in POSIX message queues.) | |
29 | sitem(tt(-s))(K-bytes on the size of the stack.) | 32 | sitem(tt(-s))(K-bytes on the size of the stack.) | |
30 | sitem(tt(-t))(CPU seconds to be used.) | 33 | sitem(tt(-t))(CPU seconds to be used.) | |
31 | -sitem(tt(-u))(processes available to the user.) | 34 | -sitem(tt(-u))(processes available to the user.) | |
32 | +sitem(tt(-r))(The number of simultaneous threads available to the user.) | 35 | +sitem(tt(-r))(The number of simultaneous threads available to the user.) | |
33 | +sitem(tt(-u))(The number of processes available to the user.) | 36 | +sitem(tt(-u))(The number of processes available to the user.) | |
34 | sitem(tt(-v))(K-bytes on the size of virtual memory. On some systems this | 37 | sitem(tt(-v))(K-bytes on the size of virtual memory. On some systems this | |
35 | refers to the limit called `address space'.) | 38 | refers to the limit called `address space'.) | |
36 | sitem(tt(-x))(The number of locks on files.) | 39 | sitem(tt(-x))(The number of locks on files.) |
@@ -1,32 +1,67 @@ | @@ -1,32 +1,67 @@ | |||
1 | $NetBSD: patch-Src_Builtins_rlimits.c,v 1.1 2012/08/17 10:53:10 wiz Exp $ | 1 | $NetBSD: patch-Src_Builtins_rlimits.c,v 1.2 2012/08/17 12:15:37 wiz Exp $ | |
2 | 2 | |||
3 | Add support for thread limits. | 3 | Add support for thread limits and socket buffer size. | |
4 | From Peter Stephenson <Peter.Stephenson@csr.com> on zsh-workers. | 4 | From Peter Stephenson <Peter.Stephenson@csr.com> on zsh-workers. | |
5 | 5 | |||
6 | --- Src/Builtins/rlimits.c.orig 2011-11-04 20:47:24.000000000 +0000 | 6 | --- Src/Builtins/rlimits.c.orig 2011-11-04 20:47:24.000000000 +0000 | |
7 | +++ Src/Builtins/rlimits.c | 7 | +++ Src/Builtins/rlimits.c | |
8 | @@ -314,6 +314,12 @@ printulimit(char *nam, int lim, int hard | 8 | @@ -314,6 +314,12 @@ printulimit(char *nam, int lim, int hard | |
9 | printf("-u: processes "); | 9 | printf("-u: processes "); | |
10 | break; | 10 | break; | |
11 | # endif /* HAVE_RLIMIT_NPROC */ | 11 | # endif /* HAVE_RLIMIT_NPROC */ | |
12 | +# ifdef HAVE_RLIMIT_NTHR | 12 | +# ifdef HAVE_RLIMIT_NTHR | |
13 | + case RLIMIT_NTHR: | 13 | + case RLIMIT_NTHR: | |
14 | + if (head) | 14 | + if (head) | |
15 | + printf("-r: threads "); | 15 | + printf("-r: threads "); | |
16 | + break; | 16 | + break; | |
17 | +#endif /* HAVE_RLIMIT_NTHR */ | 17 | +#endif /* HAVE_RLIMIT_NTHR */ | |
18 | # if defined(HAVE_RLIMIT_VMEM) && (!defined(HAVE_RLIMIT_RSS) || !defined(RLIMIT_VMEM_IS_RSS)) | 18 | # if defined(HAVE_RLIMIT_VMEM) && (!defined(HAVE_RLIMIT_RSS) || !defined(RLIMIT_VMEM_IS_RSS)) | |
19 | case RLIMIT_VMEM: | 19 | case RLIMIT_VMEM: | |
20 | if (head) | 20 | if (head) | |
21 | @@ -791,6 +797,11 @@ bin_ulimit(char *name, char **argv, UNUS | 21 | @@ -359,9 +365,7 @@ printulimit(char *nam, int lim, int hard | |
22 | # ifdef HAVE_RLIMIT_SBSIZE | |||
23 | case RLIMIT_SBSIZE: | |||
24 | if (head) | |||
25 | - printf("-N %2d: socket buffer size (kb) ", RLIMIT_SBSIZE); | |||
26 | - if (limit != RLIM_INFINITY) | |||
27 | - limit /= 1024; | |||
28 | + printf("-b: socket buffer size (bytes) ", RLIMIT_SBSIZE); | |||
29 | break; | |||
30 | # endif /* HAVE_RLIMIT_SBSIZE */ | |||
31 | # ifdef HAVE_RLIMIT_PTHREAD | |||
32 | @@ -776,21 +780,31 @@ bin_ulimit(char *name, char **argv, UNUS | |||
33 | case 'c': | |||
34 | res = RLIMIT_CORE; | |||
35 | break; | |||
36 | -# ifdef HAVE_RLIMIT_RSS | |||
37 | - case 'm': | |||
38 | - res = RLIMIT_RSS; | |||
39 | +# ifdef HAVE_RLIMIT_SBSIZE | |||
40 | + case 'b': | |||
41 | + res = RLIMIT_SBSIZE; | |||
42 | break; | |||
43 | -# endif /* HAVE_RLIMIT_RSS */ | |||
44 | +# endif /* HAVE_RLIMIT_SBSIZE */ | |||
45 | # ifdef HAVE_RLIMIT_MEMLOCK | |||
46 | case 'l': | |||
47 | res = RLIMIT_MEMLOCK; | |||
48 | break; | |||
49 | # endif /* HAVE_RLIMIT_MEMLOCK */ | |||
50 | +# ifdef HAVE_RLIMIT_RSS | |||
51 | + case 'm': | |||
52 | + res = RLIMIT_RSS; | |||
53 | + break; | |||
54 | +# endif /* HAVE_RLIMIT_RSS */ | |||
55 | # ifdef HAVE_RLIMIT_NOFILE | |||
56 | case 'n': | |||
22 | res = RLIMIT_NOFILE; | 57 | res = RLIMIT_NOFILE; | |
23 | break; | 58 | break; | |
24 | # endif /* HAVE_RLIMIT_NOFILE */ | 59 | # endif /* HAVE_RLIMIT_NOFILE */ | |
25 | +# ifdef HAVE_RLIMIT_NTHR | 60 | +# ifdef HAVE_RLIMIT_NTHR | |
26 | + case 'r': | 61 | + case 'r': | |
27 | + res = RLIMIT_NTHR; | 62 | + res = RLIMIT_NTHR; | |
28 | + break; | 63 | + break; | |
29 | +# endif /* HAVE_RLIMIT_NTHR */ | 64 | +# endif /* HAVE_RLIMIT_NTHR */ | |
30 | # ifdef HAVE_RLIMIT_NPROC | 65 | # ifdef HAVE_RLIMIT_NPROC | |
31 | case 'u': | 66 | case 'u': | |
32 | res = RLIMIT_NPROC; | 67 | res = RLIMIT_NPROC; |