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:   28-Sep-2005 16:41:14
  Branch: HEAD                             Handle: 2005092815411400

  Added files:
    openpkg-src/xterm       xterm.patch
  Modified files:
    openpkg-src/xterm       xterm.spec

  Log:
    apply a patch from the FreeBSD ports for fixing utmp support

  Summary:
    Revision    Changes     Path
    1.5         +72 -0      openpkg-src/xterm/xterm.patch
    1.100       +5  -3      openpkg-src/xterm/xterm.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/xterm/xterm.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.5 xterm.patch
  --- /dev/null 2005-09-28 16:40:52 +0200
  +++ xterm.patch       2005-09-28 16:41:14 +0200
  @@ -0,0 +1,72 @@
  +Index: main.c
  +--- main.c.orig      2005-09-19 01:48:12 +0200
  ++++ main.c   2005-09-28 16:39:42 +0200
  +@@ -379,14 +379,6 @@
  + #include <util.h>
  + #endif
  + 
  +-#ifdef __FreeBSD__
  +-#include <sys/types.h>
  +-#include <sys/ioctl.h>
  +-#include <termios.h>
  +-#include <libutil.h>
  +-#include <grp.h>
  +-#endif
  +-
  + #if !defined(UTMP_FILENAME)
  + #if defined(UTMP_FILE)
  + #define UTMP_FILENAME UTMP_FILE
  +@@ -472,7 +464,7 @@
  + 
  + static Bool added_utmp_entry = False;
  + 
  +-#if defined(__OpenBSD__) || defined(__FreeBSD__)
  ++#if defined(__OpenBSD__)
  + static gid_t utmpGid = -1;
  + #endif
  + 
  +@@ -1606,7 +1598,7 @@
  +     strcpy(ptydev, PTYDEV);
  + #endif
  + 
  +-#if defined(__OpenBSD__) || defined(__FreeBSD__)
  ++#if defined(__OpenBSD__)
  +     get_pty(NULL, NULL);
  +     seteuid(getuid());
  +     setuid(getuid());
  +@@ -1944,7 +1936,7 @@
  +     }
  + #endif
  + 
  +-#if defined(__OpenBSD__) || defined(__FreeBSD__)
  ++#if defined(__OpenBSD__)
  +     if (resource.utmpInhibit) {
  +         /* Can totally revoke group privs */
  +         setegid(getgid());
  +@@ -2354,7 +2346,7 @@
  + {
  +     int result = 1;
  + 
  +-#if defined(__OpenBSD__) || defined(__FreeBSD__)
  ++#if defined(__OpenBSD__)
  +     static int m_tty = -1;
  +     static int m_pty = -1;
  +     struct group *ttygrp;
  +@@ -4061,7 +4053,7 @@
  +         }
  + #endif /* USE_LASTLOG */
  + 
  +-#if defined(__OpenBSD__) || defined(__FreeBSD__)
  ++#if defined(__OpenBSD__)
  +         /* Switch to real gid after writing utmp entry */
  +         utmpGid = getegid();
  +         if (getgid() != getegid()) {
  +@@ -4436,7 +4428,7 @@
  +     && (resource.ptyHandshake && added_utmp_entry)
  + #endif /* OPT_PTY_HANDSHAKE */
  +     ) {
  +-#if defined(__OpenBSD__) || defined(__FreeBSD__)
  ++#if defined(__OpenBSD__)
  +     if (utmpGid != -1) {
  +         /* Switch back to group utmp */
  +         setegid(utmpGid);
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/xterm/xterm.spec
  ============================================================================
  $ cvs diff -u -r1.99 -r1.100 xterm.spec
  --- openpkg-src/xterm/xterm.spec      19 Sep 2005 12:27:24 -0000      1.99
  +++ openpkg-src/xterm/xterm.spec      28 Sep 2005 14:41:14 -0000      1.100
  @@ -38,18 +38,19 @@
   Group:        XWindow
   License:      X11
   Version:      %{V_xterm}
  -Release:      20050919
  +Release:      20050928
   
   #   list of sources
   Source0:      ftp://invisible-island.net/xterm/xterm-%{V_xterm}.tgz
   Source1:      
http://osdn.dl.sourceforge.net/sourceforge/clts/xtermset-%{V_xtermset}.tar.gz
   Source2:      
http://www.thrysoee.dk/xtermcontrol/xtermcontrol-%{V_xtermcontrol}.tar.gz
  +Patch0:       xterm.patch
   
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
  -BuildPreReq:  OpenPKG, openpkg >= 20040130, X11, xaw3d
  -PreReq:       OpenPKG, openpkg >= 20040130, X11, xaw3d
  +BuildPreReq:  OpenPKG, openpkg >= 20040130, X11
  +PreReq:       OpenPKG, openpkg >= 20040130, X11
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -81,6 +82,7 @@
       %setup -q -c
       %setup -q -T -D -a 1
       %setup -q -T -D -a 2
  +    %patch -p0 -d xterm-%{V_xterm}
       %{l_shtool} subst \
           -e 's;/usr/contrib/X11R6;%{l_prefix};g' \
           xterm-%{V_xterm}/configure
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to