OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   06-Oct-2006 08:16:34
  Branch: HEAD                             Handle: 2006100607163200

  Modified files:
    openpkg-src/inetutils   inetutils.patch inetutils.spec
  Removed files:
    openpkg-src/inetutils   setenv.c setenv.h unsetenv.c unsetenv.h

  Log:
    completely work-off packaging

  Summary:
    Revision    Changes     Path
    1.4         +258 -82    openpkg-src/inetutils/inetutils.patch
    1.13        +7  -23     openpkg-src/inetutils/inetutils.spec
    1.2         +0  -62     openpkg-src/inetutils/setenv.c
    1.2         +0  -29     openpkg-src/inetutils/setenv.h
    1.2         +0  -65     openpkg-src/inetutils/unsetenv.c
    1.2         +0  -29     openpkg-src/inetutils/unsetenv.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/inetutils/inetutils.patch
  ============================================================================
  $ cvs diff -u -r1.3 -r1.4 inetutils.patch
  --- openpkg-src/inetutils/inetutils.patch     31 Mar 2006 17:21:30 -0000      
1.3
  +++ openpkg-src/inetutils/inetutils.patch     6 Oct 2006 06:16:32 -0000       
1.4
  @@ -1,84 +1,6 @@
  ---- libinetutils/xalloc.h.orig       2002-12-11 13:51:10.000000000 +0100
  -+++ libinetutils/xalloc.h    2003-09-12 16:25:19.000000000 +0200
  -@@ -39,7 +39,9 @@
  - /* Exit value when the requested amount of memory is not available.
  -    It is initialized to EXIT_FAILURE, but the caller may set it to
  -    some other value.  */
  -+#ifdef __GLIBC__
  - extern int xalloc_exit_failure;
  -+#endif
  - 
  - /* If this pointer is non-zero, run the specified function upon each
  -    allocation failure.  It is initialized to zero. */
  ---- libinetutils/xmalloc.c.orig      2002-12-11 13:42:01.000000000 +0100
  -+++ libinetutils/xmalloc.c   2003-09-12 16:25:51.000000000 +0200
  -@@ -23,6 +23,7 @@
  - 
  - #if STDC_HEADERS
  - # include <stdlib.h>
  -+# include <stdio.h>
  - #else
  - void *calloc ();
  - void *malloc ();
  -@@ -34,7 +35,9 @@
  - #define _(msgid) gettext (msgid)
  - #define N_(msgid) msgid
  - 
  -+#ifdef __GLIBC__
  - #include "error.h"
  -+#endif
  - #include "xalloc.h"
  - 
  - #ifndef EXIT_FAILURE
  -@@ -53,7 +56,9 @@
  - 
  - /* Exit value when the requested amount of memory is not available.
  -    The caller may set it to some other value.  */
  -+#ifdef __GLIBC__
  - int xalloc_exit_failure = EXIT_FAILURE;
  -+#endif
  - 
  - /* If non NULL, call this function when memory is exhausted. */
  - void (*xalloc_fail_func) PARAMS ((void)) = 0;
  -@@ -67,7 +72,11 @@
  - {
  -   if (xalloc_fail_func)
  -     (*xalloc_fail_func) ();
  -+#ifdef __GLIBC__
  -   error (xalloc_exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
  -+#else
  -+  fprintf(stderr, "%s", _(xalloc_msg_memory_exhausted));
  -+#endif
  -   /* The `noreturn' cannot be given to error, since it may return if
  -      its first argument is 0.  To help compilers understand the
  -      xalloc_die does terminate, call exit. */
  ---- talk/io.c.orig   2001-06-02 17:27:15.000000000 +0200
  -+++ talk/io.c        2003-09-12 16:27:15.000000000 +0200
  -@@ -129,7 +129,9 @@
  - }
  - 
  - extern      int errno;
  -+#if !defined(__FreeBSD__)
  - extern      int sys_nerr;
  -+#endif
  - 
  - /*
  -  * p_error prints the system error message on the standard location
  -Index: libinetutils/ttymsg.c
  ---- libinetutils/ttymsg.c.orig       2001-11-01 16:52:19 +0100
  -+++ libinetutils/ttymsg.c    2006-01-23 11:52:04 +0100
  -@@ -132,7 +132,7 @@
  -         }
  -       if (wret)
  -         {
  --          (char *)iov->iov_base += wret;
  -+          iov->iov_base += wret;
  -           iov->iov_len -= wret;
  -         }
  -       continue;
   Index: ftp/ftp_var.h
  ---- ftp/ftp_var.h.orig       2000-07-08 03:00:53 +0200
  -+++ ftp/ftp_var.h    2006-01-23 14:39:09 +0100
  +--- ftp/ftp_var.h.orig       2000-07-08 03:00:53.000000000 +0200
  ++++ ftp/ftp_var.h    2006-10-06 08:11:07.845316590 +0200
   @@ -36,6 +36,24 @@
    #include <sys/param.h>
    #include <setjmp.h>
  @@ -128,8 +50,9 @@
    
    FTP_EXTERN int macnum;                      /* number of defined macros */
    FTP_EXTERN struct macel macros[16];
  ---- libinetutils/revoke.c.orig       2006-03-30 16:00:38.000000000 -0500
  -+++ libinetutils/revoke.c    2006-03-30 16:00:44.000000000 -0500
  +Index: libinetutils/revoke.c
  +--- libinetutils/revoke.c.orig       2002-06-26 05:15:06.000000000 +0200
  ++++ libinetutils/revoke.c    2006-10-06 08:11:07.855316674 +0200
   @@ -10,6 +10,14 @@
    extern int errno;
    #endif
  @@ -150,3 +73,256 @@
      return -1;
    }
   +#endif
  +Index: libinetutils/setenv.c
  +--- libinetutils/setenv.c.orig       2002-12-11 13:40:24.000000000 +0100
  ++++ libinetutils/setenv.c    2006-10-06 08:12:44.556778332 +0200
  +@@ -1,129 +1,49 @@
  +-/* Copyright (C) 1992, 1995, 2000 Free Software Foundation, Inc.
  +-
  +-NOTE: The canonical source of this file is maintained with the GNU C 
Library.
  +-Bugs can be reported to [EMAIL PROTECTED]
  +-
  +-This program is free software; you can redistribute it and/or modify it
  +-under the terms of the GNU General Public License as published by the
  +-Free Software Foundation; either version 2, or (at your option) any
  +-later version.
  +-
  +-This program is distributed in the hope that it will be useful,
  +-but WITHOUT ANY WARRANTY; without even the implied warranty of
  +-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  +-GNU General Public License for more details.
  +-
  +-You should have received a copy of the GNU General Public License
  +-along with this program; if not, write to the Free Software
  +-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  +-USA.  */
  + 
  + #ifdef HAVE_CONFIG_H
  +-# include <config.h>
  +-#endif
  +-
  +-#include <errno.h>
  +-
  +-#if _LIBC || HAVE_STDLIB_H
  +-# include <stdlib.h>
  +-#endif
  +-#if _LIBC || HAVE_STRING_H
  +-# include <string.h>
  +-#endif
  +-#if _LIBC || HAVE_UNISTD_H
  +-# include <unistd.h>
  +-#endif
  +-
  +-#ifndef     HAVE_GNU_LD
  +-# define __environ  environ
  ++#include "config.h"
  + #endif
  ++#include <sys/types.h>
  ++#include <stdlib.h>
  ++#include <string.h>
  + 
  +-int
  +-setenv (name, value, replace)
  +-     const char *name;
  +-     const char *value;
  +-     int replace;
  ++#ifndef HAVE_SETENV
  ++int setenv(const char *kszName, const char *kszValue, int nOverwrite)
  + {
  +-  register char **ep;
  +-  register size_t size;
  +-  const size_t namelen = strlen (name);
  +-  const size_t vallen = strlen (value) + 1;
  +-
  +-  size = 0;
  +-  for (ep = __environ; *ep != NULL; ++ep)
  +-    if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
  +-      break;
  +-    else
  +-      ++size;
  +-
  +-  if (*ep == NULL)
  +-    {
  +-      static char **last_environ;
  +-      char **new_environ;
  +-      if (__environ == last_environ)
  +-    /* We allocated this space; we can extend it.  */
  +-    new_environ = (char **) realloc (last_environ,
  +-                                     (size + 2) * sizeof (char *));
  +-      else
  +-    new_environ = (char **) malloc ((size + 2) * sizeof (char *));
  +-
  +-      if (new_environ == NULL)
  +-    return -1;
  +-
  +-      new_environ[size] = malloc (namelen + 1 + vallen);
  +-      if (new_environ[size] == NULL)
  +-    {
  +-      free ((char *) new_environ);
  +-      errno = ENOMEM;
  +-      return -1;
  +-    }
  +-
  +-      if (__environ != last_environ)
  +-    memcpy ((char *) new_environ, (char *) __environ,
  +-            size * sizeof (char *));
  +-
  +-      memcpy (new_environ[size], name, namelen);
  +-      new_environ[size][namelen] = '=';
  +-      memcpy (&new_environ[size][namelen + 1], value, vallen);
  +-
  +-      new_environ[size + 1] = NULL;
  +-
  +-      last_environ = __environ = new_environ;
  +-    }
  +-  else if (replace)
  +-    {
  +-      size_t len = strlen (*ep);
  +-      if (len + 1 < namelen + 1 + vallen)
  +-    {
  +-      /* The existing string is too short; malloc a new one.  */
  +-      char *new = malloc (namelen + 1 + vallen);
  +-      if (new == NULL)
  +-        return -1;
  +-      *ep = new;
  +-    }
  +-      memcpy (*ep, name, namelen);
  +-      (*ep)[namelen] = '=';
  +-      memcpy (&(*ep)[namelen + 1], value, vallen);
  +-    }
  ++    char *szPair = NULL;
  + 
  +-  return 0;
  ++    if (nOverwrite == 0 && getenv(kszName) != 0)
  ++        return 0;
  ++    szPair = malloc(strlen(kszName) + 1 + strlen(kszValue) + 1);
  ++    if (szPair == NULL)
  ++        return -1;
  ++    strcpy(szPair, kszName);
  ++    strcat(szPair, "=");
  ++    strcat(szPair, kszValue);
  ++    putenv(szPair);
  ++    return 0;
  + }
  ++#endif /* !HAVE_SETENV */
  + 
  +-void
  +-unsetenv (name)
  +-     const char *name;
  ++#ifndef HAVE_UNSETENV
  ++extern char **environ;
  ++void unsetenv(const char *kszName)
  + {
  +-  const size_t len = strlen (name);
  +-  char **ep;
  +-
  +-  for (ep = __environ; *ep; ++ep)
  +-    if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
  +-      {
  +-    /* Found it.  Remove this pointer by moving later ones back.  */
  +-    char **dp = ep;
  +-    do
  +-      dp[0] = dp[1];
  +-    while (*dp++);
  +-    /* Continue the loop in case NAME appears again.  */
  +-      }
  ++    int nLen;
  ++    const char *kszTail;
  ++    char **ppEnv;
  ++
  ++    if (kszName == 0 || environ == 0)
  ++        return;
  ++    for (kszTail = kszName; *kszTail && *kszTail != '='; kszTail++)
  ++        /* noop */;
  ++    nLen = kszTail - kszName;
  ++    for (ppEnv = environ; *ppEnv != 0; ppEnv++)
  ++        if (strncmp(*ppEnv, kszName, nLen) == 0 && (*ppEnv)[nLen] == '=')
  ++            break;
  ++    while (*ppEnv != 0) {
  ++        *ppEnv = *(ppEnv + 1);
  ++        ppEnv++;
  ++    }
  + }
  ++#endif /* !HAVE_UNSETENV */
  ++
  +Index: libinetutils/ttymsg.c
  +--- libinetutils/ttymsg.c.orig       2001-11-01 16:52:19.000000000 +0100
  ++++ libinetutils/ttymsg.c    2006-10-06 08:11:07.855316674 +0200
  +@@ -132,7 +132,7 @@
  +         }
  +       if (wret)
  +         {
  +-          (char *)iov->iov_base += wret;
  ++          iov->iov_base += wret;
  +           iov->iov_len -= wret;
  +         }
  +       continue;
  +Index: libinetutils/xalloc.h
  +--- libinetutils/xalloc.h.orig       2002-12-11 13:51:10.000000000 +0100
  ++++ libinetutils/xalloc.h    2006-10-06 08:11:07.855316674 +0200
  +@@ -39,7 +39,9 @@
  + /* Exit value when the requested amount of memory is not available.
  +    It is initialized to EXIT_FAILURE, but the caller may set it to
  +    some other value.  */
  ++#ifdef __GLIBC__
  + extern int xalloc_exit_failure;
  ++#endif
  + 
  + /* If this pointer is non-zero, run the specified function upon each
  +    allocation failure.  It is initialized to zero. */
  +Index: libinetutils/xmalloc.c
  +--- libinetutils/xmalloc.c.orig      2002-12-11 13:42:01.000000000 +0100
  ++++ libinetutils/xmalloc.c   2006-10-06 08:11:07.855316674 +0200
  +@@ -23,6 +23,7 @@
  + 
  + #if STDC_HEADERS
  + # include <stdlib.h>
  ++# include <stdio.h>
  + #else
  + void *calloc ();
  + void *malloc ();
  +@@ -34,7 +35,9 @@
  + #define _(msgid) gettext (msgid)
  + #define N_(msgid) msgid
  + 
  ++#ifdef __GLIBC__
  + #include "error.h"
  ++#endif
  + #include "xalloc.h"
  + 
  + #ifndef EXIT_FAILURE
  +@@ -53,7 +56,9 @@
  + 
  + /* Exit value when the requested amount of memory is not available.
  +    The caller may set it to some other value.  */
  ++#ifdef __GLIBC__
  + int xalloc_exit_failure = EXIT_FAILURE;
  ++#endif
  + 
  + /* If non NULL, call this function when memory is exhausted. */
  + void (*xalloc_fail_func) PARAMS ((void)) = 0;
  +@@ -67,7 +72,11 @@
  + {
  +   if (xalloc_fail_func)
  +     (*xalloc_fail_func) ();
  ++#ifdef __GLIBC__
  +   error (xalloc_exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
  ++#else
  ++  fprintf(stderr, "%s", _(xalloc_msg_memory_exhausted));
  ++#endif
  +   /* The `noreturn' cannot be given to error, since it may return if
  +      its first argument is 0.  To help compilers understand the
  +      xalloc_die does terminate, call exit. */
  +Index: talk/io.c
  +--- talk/io.c.orig   2001-06-02 17:27:15.000000000 +0200
  ++++ talk/io.c        2006-10-06 08:11:07.855316674 +0200
  +@@ -129,7 +129,9 @@
  + }
  + 
  + extern      int errno;
  ++#if !defined(__FreeBSD__)
  + extern      int sys_nerr;
  ++#endif
  + 
  + /*
  +  * p_error prints the system error message on the standard location
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/inetutils/inetutils.spec
  ============================================================================
  $ cvs diff -u -r1.12 -r1.13 inetutils.spec
  --- openpkg-src/inetutils/inetutils.spec      31 Mar 2006 17:21:30 -0000      
1.12
  +++ openpkg-src/inetutils/inetutils.spec      6 Oct 2006 06:16:32 -0000       
1.13
  @@ -22,8 +22,6 @@
   ##  SUCH DAMAGE.
   ##
   
  -#   FIXME: rse: uses OSSP fsl but provides no fsl.inetutils
  -
   #   package information
   Name:         inetutils
   Summary:      GNU Internet Utilities
  @@ -35,18 +33,13 @@
   Group:        Network
   License:      GPL
   Version:      1.4.2
  -Release:      20060331
  +Release:      20061006
   
   #   package options
  -%option       with_fsl     yes
   %option       with_legacy  no
   
   #   list of sources
   Source0:      ftp://ftp.gnu.org/gnu/inetutils/inetutils-%{version}.tar.gz
  -Source1:      setenv.h
  -Source2:      setenv.c
  -Source3:      unsetenv.h
  -Source4:      unsetenv.c
   Patch0:       inetutils.patch
   
   #   build information
  @@ -54,19 +47,14 @@
   BuildRoot:    %{l_buildroot}
   BuildPreReq:  OpenPKG, openpkg >= 20040130, make
   PreReq:       OpenPKG, openpkg >= 20040130
  -%if "%{with_fsl}" == "yes"
  -BuildPreReq:  fsl >= 1.2.0
  -PreReq:       fsl >= 1.2.0
  -%endif
   AutoReq:      no
   AutoReqProv:  no
   
   %description
       The GNU Internet Utilities are a collection of common network
  -    programs.
  -
  -    Please note that specific to this OpenPKG version only a subset of
  -    the original GNU Internet Utilities is provided.
  +    programs. Please note that specific to this OpenPKG version only a
  +    subset of the original GNU Internet Utilities is provided. Mainly we
  +    provide networking clients only.
   
   %track
       prog inetutils = {
  @@ -78,17 +66,12 @@
   %prep
       %setup -q
       %patch -p0
  -    cp -f %{SOURCE setenv.c} libinetutils/
  -    cp -f %{SOURCE setenv.h} libinetutils/
  -    cp -f %{SOURCE unsetenv.c} libinetutils/
  -    cp -f %{SOURCE unsetenv.h} libinetutils/
   
   %build
       CC="%{l_cc}" \
       CFLAGS="%{l_cflags -O}" \
       CPPFLAGS="%{l_cppflags}" \
  -    LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
  -    LIBS="%{l_fsl_libs}" \
  +    LDFLAGS="%{l_ldflags}" \
       ./configure \
           --prefix=%{l_prefix} \
           --program-prefix=g \
  @@ -123,7 +106,8 @@
           done
       done
   %endif
  -    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  +        %{l_files_std} \
           '%attr(4711,%{l_susr},%{l_sgrp}) %{l_prefix}/bin/gping' \
           '%attr(4711,%{l_susr},%{l_sgrp}) %{l_prefix}/bin/grcp' \
           '%attr(4711,%{l_susr},%{l_sgrp}) %{l_prefix}/bin/grlogin' \
  @@ .
  rm -f openpkg-src/inetutils/setenv.c <<'@@ .'
  Index: openpkg-src/inetutils/setenv.c
  ============================================================================
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  rm -f openpkg-src/inetutils/setenv.h <<'@@ .'
  Index: openpkg-src/inetutils/setenv.h
  ============================================================================
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  rm -f openpkg-src/inetutils/unsetenv.c <<'@@ .'
  Index: openpkg-src/inetutils/unsetenv.c
  ============================================================================
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  rm -f openpkg-src/inetutils/unsetenv.h <<'@@ .'
  Index: openpkg-src/inetutils/unsetenv.h
  ============================================================================
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to