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 15:14:41
  Branch: OPENPKG_1_2_SOLID HEAD           Handle: 2003102314143802

  Modified files:
    openpkg-web             news.txt
  Modified files:           (Branch: OPENPKG_1_2_SOLID)
    openpkg-src/coreutils   coreutils.patch coreutils.spec

  Log:
    workaround to defeat "ls -w" resource starvation

  Summary:
    Revision    Changes     Path
    1.1.4.1     +63 -0      openpkg-src/coreutils/coreutils.patch
    1.9.2.1.2.2 +1  -1      openpkg-src/coreutils/coreutils.spec
    1.7128      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/coreutils/coreutils.patch
  ============================================================================
  $ cvs diff -u -r1.1 -r1.1.4.1 coreutils.patch
  --- openpkg-src/coreutils/coreutils.patch     12 Jan 2003 12:19:07 -0000      1.1
  +++ openpkg-src/coreutils/coreutils.patch     23 Oct 2003 13:14:40 -0000      1.1.4.1
  @@ -45,3 +45,66 @@
          return (TRUE == value);
    
        case 'O':                       /* File is owned by you? */
  +
  +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 = 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.9.2.1.2.1 -r1.9.2.1.2.2 coreutils.spec
  --- openpkg-src/coreutils/coreutils.spec      18 Jan 2003 17:19:12 -0000      
1.9.2.1.2.1
  +++ openpkg-src/coreutils/coreutils.spec      23 Oct 2003 13:14:40 -0000      
1.9.2.1.2.2
  @@ -33,7 +33,7 @@
   Group:        Utility
   License:      GPL
   Version:      4.5.4
  -Release:      1.2.0
  +Release:      1.2.1
   
   #   list of sources
   Source0:      ftp://alpha.gnu.org/gnu/coreutils/coreutils-%{version}.tar.bz2
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.7127 -r1.7128 news.txt
  --- openpkg-web/news.txt      23 Oct 2003 13:09:28 -0000      1.7127
  +++ openpkg-web/news.txt      23 Oct 2003 13:14:38 -0000      1.7128
  @@ -1,3 +1,4 @@
  +23-Oct-2003: Upgraded package: P<coreutils-4.5.4-1.2.1>
   23-Oct-2003: Upgraded package: P<coreutils-5.0.1-1.3.2>
   23-Oct-2003: Upgraded package: P<coreutils-5.0.91-20031023>
   23-Oct-2003: Upgraded package: P<sendmail-8.12.10-20031023>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to