Преглед на файлове

apply a patch from the FreeBSD ports for fixing utmp support

Ralf S. Engelschall преди 20 години
родител
ревизия
51c610636b
променени са 2 файла, в които са добавени 77 реда и са изтрити 3 реда
  1. 72 0
      xterm/xterm.patch
  2. 5 3
      xterm/xterm.spec

+ 72 - 0
xterm/xterm.patch

@@ -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);

+ 5 - 3
xterm/xterm.spec

@@ -38,18 +38,19 @@ Class:        PLUS
 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 @@ AutoReqProv:  no
     %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