OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src openpkg-web Date: 23-Oct-2003 14:50:25 Branch: HEAD Handle: 2003102313502301 Modified files: openpkg-src/coreutils coreutils.patch coreutils.spec openpkg-web news.txt Log: workaround to defeat "ls -w" resource starvation Summary: Revision Changes Path 1.5 +62 -0 openpkg-src/coreutils/coreutils.patch 1.30 +2 -4 openpkg-src/coreutils/coreutils.spec 1.7126 +1 -0 openpkg-web/news.txt ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/coreutils/coreutils.patch ============================================================================ $ cvs diff -u -r1.4 -r1.5 coreutils.patch --- openpkg-src/coreutils/coreutils.patch 12 Sep 2003 11:26:07 -0000 1.4 +++ openpkg-src/coreutils/coreutils.patch 23 Oct 2003 12:50:24 -0000 1.5 @@ -64,3 +64,65 @@ #include <sys/types.h> #include "system.h" + +http://www.guninski.com/binls.html +Workaround to defeat resource starvation using "ls -W hugenumber" +taken from Conectiva Updates <[EMAIL PROTECTED]>, CLA-2003:768 +Index: src/ls.c +--- src/ls.c.orig 2003-07-27 08:33:36.000000000 +0200 ++++ src/ls.c 2003-10-23 13:45:46.000000000 +0200 +@@ -180,6 +180,8 @@ + #define ID_LENGTH_MAX \ + MAX (LOGIN_NAME_MAX - 1, LONGEST_HUMAN_READABLE) + ++#define COLUMNS_MAX 1024 ++ + enum filetype + { + unknown DT_INIT (DT_UNKNOWN), +@@ -1316,7 +1318,7 @@ + { + long int tmp_long; + if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK +- && 0 < tmp_long && tmp_long <= INT_MAX) ++ && 0 < tmp_long && tmp_long <= COLUMNS_MAX) + { + line_length = (int) tmp_long; + } +@@ -1334,7 +1336,7 @@ + struct winsize ws; + + if (ioctl (STDOUT_FILENO, TIOCGWINSZ, &ws) != -1 && ws.ws_col != 0) +- line_length = ws.ws_col; ++ line_length = MIN(ws.ws_col, COLUMNS_MAX); + } + #endif + +@@ -1347,7 +1349,7 @@ + { + long int tmp_long; + if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK +- && 0 <= tmp_long && tmp_long <= INT_MAX) ++ && 0 <= tmp_long && tmp_long <= COLUMNS_MAX) + { + tabsize = (int) tmp_long; + } +@@ -1470,7 +1472,7 @@ + { + long int tmp_long; + if (xstrtol (optarg, NULL, 0, &tmp_long, NULL) != LONGINT_OK +- || tmp_long <= 0 || tmp_long > INT_MAX) ++ || tmp_long <= 0 || tmp_long > COLUMNS_MAX) + error (EXIT_FAILURE, 0, _("invalid line width: %s"), + quotearg (optarg)); + line_length = (int) tmp_long; +@@ -1544,7 +1546,7 @@ + { + long int tmp_long; + if (xstrtol (optarg, NULL, 0, &tmp_long, NULL) != LONGINT_OK +- || tmp_long < 0 || tmp_long > INT_MAX) ++ || tmp_long < 0 || tmp_long > COLUMNS_MAX) + error (EXIT_FAILURE, 0, _("invalid tab size: %s"), + quotearg (optarg)); + tabsize = (int) tmp_long; + @@ . patch -p0 <<'@@ .' Index: openpkg-src/coreutils/coreutils.spec ============================================================================ $ cvs diff -u -r1.29 -r1.30 coreutils.spec --- openpkg-src/coreutils/coreutils.spec 12 Sep 2003 11:26:07 -0000 1.29 +++ openpkg-src/coreutils/coreutils.spec 23 Oct 2003 12:50:24 -0000 1.30 @@ -33,7 +33,7 @@ Group: Utility License: GPL Version: 5.0.91 -Release: 20030912 +Release: 20031023 # package options %option with_legacy no @@ -73,9 +73,7 @@ -e 's;^\(install-exec-local:\).*;\1;' \ -e 's;^\(bin_PROGRAMS =\);\1 su;' \ src/Makefile.in - touch man/nice.1 - touch man/stat.1 - touch man/test.1 + ( cd man && touch nice.1 stat.1 test.1 ls.1 dir.1 vdir.1 ) || exit 1 %build CC="%{l_cc}" \ @@ . patch -p0 <<'@@ .' Index: openpkg-web/news.txt ============================================================================ $ cvs diff -u -r1.7125 -r1.7126 news.txt --- openpkg-web/news.txt 23 Oct 2003 12:30:52 -0000 1.7125 +++ openpkg-web/news.txt 23 Oct 2003 12:50:23 -0000 1.7126 @@ -1,3 +1,4 @@ +23-Oct-2003: Upgraded package: P<coreutils-5.0.91-20031023> 23-Oct-2003: Upgraded package: P<sendmail-8.12.10-20031023> 23-Oct-2003: Upgraded package: P<subversion-0.32.0-20031023> 23-Oct-2003: Upgraded package: P<bind-9.2.3-20031023> @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]