[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xdm: Changes to 'debian-unstable'



 debian/patches/debian.diff                   |   80 ++-------------------------
 debian/patches/series                        |    5 +
 debian/patches/storepid_rewrite.diff         |   31 +++++-----
 debian/patches/support_logfile_rotation.diff |   43 +++++---------
 debian/rules                                 |    2 
 5 files changed, 42 insertions(+), 119 deletions(-)

New commits:
commit 9063478dcdd0fd8e0a589748fa7c208124f05654
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Dec 6 22:38:30 2009 +0100

    Some progress towards updating the patch stack
    
    - debian.diff: upstream applied Red Hat's patch to make authdir
      configurable, use the new configure option and drop the part of this
      patch that dealt with that
    - storepid_rewrite.diff: update
    - support_logfile_rotation.diff: update
    - disable 20_xdm_log_timestamp.diff and 21_xdm_log_append.diff for now,
      they need lots of changes

diff --git a/debian/patches/debian.diff b/debian/patches/debian.diff
index e01dd40..d2e6649 100644
--- a/debian/patches/debian.diff
+++ b/debian/patches/debian.diff
@@ -5,8 +5,6 @@
 Ported parts of 905_debian_xdm.diff. Some changes are now done through
 configure flags
 
-* Use different paths for the auth directory.  This is just an effort to move
-  in the direction of the FHS.
 * config/Xservers.ws.cpp:
   - add comments to help local admins
   - run local server with TCP listening turned off for security
@@ -22,7 +20,7 @@ Index: xdm/config/Makefile.am
 ===================================================================
 --- xdm.orig/config/Makefile.am
 +++ xdm/config/Makefile.am
-@@ -55,7 +55,7 @@
+@@ -56,7 +56,7 @@
      -DXDMPIDDIR="$(XDMPIDDIR)" -DXDMCONFIGDIR="$(XDMCONFIGDIR)" \
      -DXDMSCRIPTDIR="$(XDMSCRIPTDIR)" -DSU="$(SU)" \
      -DCHOOSERPATH="$(XDMLIBDIR)/chooser" $(XPMDEFINES) \
@@ -30,12 +28,12 @@ Index: xdm/config/Makefile.am
 +    -DSHELL_CMD="$(SHELL_CMD)" $(MKTEMP_DEFINES) -DXDMAUTHDIR="$(XDMAUTHDIR)"
  
  Xservers.ws: $(srcdir)/Xservers.ws.cpp
- 	$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/Xservers.ws.cpp | $(CPP_SED_MAGIC) > $@
+ 	$(cpp_verbose)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/Xservers.ws.cpp | $(CPP_SED_MAGIC) > $@
 Index: xdm/config/Xservers.ws.cpp
 ===================================================================
 --- xdm.orig/config/Xservers.ws.cpp
 +++ xdm/config/Xservers.ws.cpp
-@@ -10,4 +10,26 @@
+@@ -9,4 +9,26 @@
  XCOMM look like:
  XCOMM	XTerminalName:0 foreign
  XCOMM
@@ -67,9 +65,9 @@ Index: xdm/config/Xsession.cpp
 ===================================================================
 --- xdm.orig/config/Xsession.cpp
 +++ xdm/config/Xsession.cpp
-@@ -4,84 +4,5 @@
- XCOMM $Xorg: Xsession,v 1.4 2000/08/17 19:54:17 cpqbld Exp $
- XCOMM $XFree86: xc/programs/xdm/config/Xsession,v 1.2 1998/01/11 03:48:32 dawes Exp $
+@@ -1,84 +1,5 @@
+ XCOMM!SHELL_CMD
+ XCOMM
  
 -XCOMM redirect errors to a file in user's home directory if we can
 -
@@ -158,11 +156,7 @@ Index: xdm/config/xdm-config.cpp
 ===================================================================
 --- xdm.orig/config/xdm-config.cpp
 +++ xdm/config/xdm-config.cpp
-@@ -17,22 +17,22 @@
- DisplayManager.keyFile:		XDMCONFIGDIR/xdm-keys
- DisplayManager.servers:		XDMCONFIGDIR/Xservers
- DisplayManager.accessFile:	XDMCONFIGDIR/Xaccess
-+DisplayManager.authDir:	XDMAUTHDIR
+@@ -18,19 +18,18 @@
  DisplayManager*resources:	XDMCONFIGDIR/Xresources
  DisplayManager.willing:		SU nobody -c XDMSCRIPTDIR/Xwilling
  ! All displays should use authorization, but we cannot be sure
@@ -187,63 +181,3 @@ Index: xdm/config/xdm-config.cpp
  #ifdef XPM
  DisplayManager*loginmoveInterval:	10
  #endif /* XPM */
-Index: xdm/configure.ac
-===================================================================
---- xdm.orig/configure.ac
-+++ xdm/configure.ac
-@@ -221,6 +221,12 @@
- 	[XDMSCRIPTDIR="$withval"], [XDMSCRIPTDIR="${XDMLIBDIR}"])
- AC_SUBST(XDMSCRIPTDIR)
- 
-+AC_ARG_WITH(xdmauthdir,
-+	AC_HELP_STRING([--with-xdmauthdir=<pathname>],
-+	  [specify a directory where authentication cookie files should be stored (default is same as xdmconfigdir)]),
-+	[XDMAUTHDIR="$withval"], [XDMAUTHDIR="${XDMCONFIGDIR}"])
-+AC_SUBST(XDMAUTHDIR)
-+
- AC_ARG_WITH(logdir,
- 	AC_HELP_STRING([--with-logdir=<pathname>],
- 	  [specify directory for xdm log files (default=/var/log)]),
-@@ -526,7 +532,7 @@
- 
- # -DDEF_AUTH_DIR="$(XDMDIR)"
- 
--AC_DEFINE_DIR(DEF_AUTH_DIR, XDMCONFIGDIR, 
-+AC_DEFINE_DIR(DEF_AUTH_DIR, XDMAUTHDIR,
- 	[Define to pathname where authentication cookie files should be stored])
- 
- # -DDEF_GREETER_LIB="$(XDMDIR)/libXdmGreet.so"
-Index: xdm/xdm.man.cpp
-===================================================================
---- xdm.orig/xdm.man.cpp
-+++ xdm/xdm.man.cpp
-@@ -306,7 +306,7 @@
- This names a directory under which
- .I xdm
- stores authorization files while initializing the session.  The
--default value is \fI XDMDIR.\fP
-+default value is \fI XDMAUTHDIR.\fP
- Can be overridden for specific displays by
- DisplayManager.\fIDISPLAY\fP.authFile.
- .IP \fBDisplayManager.autoRescan\fP
-@@ -1464,7 +1464,7 @@
- .I BINDIR/xterm
- the default session program and failsafe client
- .TP 20
--.I XDMDIR/A<display>\-<suffix>
-+.I XDMAUTHDIR/authdir/authfiles/A<display>\-<suffix>
- the default place for authorization files
- .TP 20
- .I /tmp/K5C<display>
-Index: xdm/Makefile.am
-===================================================================
---- xdm.orig/Makefile.am
-+++ xdm/Makefile.am
-@@ -116,6 +116,7 @@
- 	-D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
- 	-DCHOOSERPATH=$(xdmlibdir)/chooser -DXDMLOGDIR=$(XDMLOGDIR) \
- 	-DXDMDIR=$(XDMCONFIGDIR) -DBINDIR=$(bindir) -DXDMPIDDIR=$(XDMPIDDIR) \
-+	-DXDMAUTHDIR=$(XDMAUTHDIR) \
- 	-D__appmansuffix__=$(APP_MAN_SUFFIX) \
- 	-D__filemansuffix__=$(FILE_MAN_SUFFIX) \
- 	-D__libmansuffix__=$(LIB_MAN_SUFFIX) \
diff --git a/debian/patches/series b/debian/patches/series
index 59a6555..9d7f63e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,8 +8,9 @@
 # not sure this one is still relevant now we use mkstemp
 15_xdm_openfiles.diff
 
-20_xdm_log_timestamp.diff
-21_xdm_log_append.diff
+# painful merge
+#XXX 20_xdm_log_timestamp.diff
+#XXX 21_xdm_log_append.diff
 
 90_xdm_write_dummy_auth.diff
 # depends on patch 90
diff --git a/debian/patches/storepid_rewrite.diff b/debian/patches/storepid_rewrite.diff
index 4e52508..d216756 100644
--- a/debian/patches/storepid_rewrite.diff
+++ b/debian/patches/storepid_rewrite.diff
@@ -18,7 +18,7 @@ Index: xdm/dm.c
 ===================================================================
 --- xdm.orig/dm.c
 +++ xdm/dm.c
-@@ -109,7 +109,7 @@
+@@ -106,7 +106,7 @@
  static SIGVAL ChildNotify (int n);
  #endif
  
@@ -27,7 +27,7 @@ Index: xdm/dm.c
  static void RemovePid (void);
  
  static pid_t parent_pid = -1; 	/* PID of parent xdm process */
-@@ -910,64 +910,64 @@
+@@ -902,65 +902,64 @@
  static int  pidFd;
  static FILE *pidFilePtr;
  
@@ -48,7 +48,12 @@ Index: xdm/dm.c
 -	if (pidFd == -1 && errno == ENOENT)
 -	    pidFd = open (pidFile, O_RDWR|O_CREAT, 0666);
 -	if (pidFd == -1 || !(pidFilePtr = fdopen (pidFd, "r+")))
--	{
++    if (pidFile[0] != '\0')
++    {
++	Debug ("storing process ID in %s\n", pidFile);
++	pidFd = open (pidFile, O_WRONLY|O_CREAT|O_EXCL, 0666);
++	if (pidFd == -1)
+ 	{
 -	    LogError ("process-id file %s cannot be opened\n",
 -		      pidFile);
 -	    return -1;
@@ -57,16 +62,11 @@ Index: xdm/dm.c
 -	    oldpid = -1;
 -	fseek (pidFilePtr, 0l, 0);
 -	if (lockPidFile)
-+    if (pidFile[0] != '\0')
-+    {
-+	Debug ("storing process ID in %s\n", pidFile);
-+	pidFd = open (pidFile, O_WRONLY|O_CREAT|O_EXCL, 0666);
-+	if (pidFd == -1)
- 	{
+-	{
 -#ifdef F_SETLK
--#ifndef SEEK_SET
--#define SEEK_SET 0
--#endif
+-# ifndef SEEK_SET
+-#  define SEEK_SET 0
+-# endif
 -	    struct flock lock_data;
 -	    lock_data.l_type = F_WRLCK;
 -	    lock_data.l_whence = SEEK_SET;
@@ -95,7 +95,7 @@ Index: xdm/dm.c
 +		return oldpid;
  	    }
 -#else
--#ifdef LOCK_EX
+-# ifdef LOCK_EX
 -	    if (flock (pidFd, LOCK_EX|LOCK_NB) == -1)
 -	    {
 -		if (errno == EWOULDBLOCK)
@@ -103,7 +103,7 @@ Index: xdm/dm.c
  		else
 -		    return -1;
 -	    }
--#else
+-# else
 -	    if (lockf (pidFd, F_TLOCK, 0) == -1)
  	    {
 -		if (errno == EACCES)
@@ -114,9 +114,10 @@ Index: xdm/dm.c
 +			  "%s\n", pidFile, _SysErrorMsg (errno));
 +		return -1;
  	    }
--#endif
+-# endif
 -#endif
  	}
+-	ftruncate(pidFd, 0);
 -	fprintf (pidFilePtr, "%5ld\n", (long)getpid ());
 +	if ((pidFilePtr = fdopen (pidFd, "w")) == NULL)
 +	{
diff --git a/debian/patches/support_logfile_rotation.diff b/debian/patches/support_logfile_rotation.diff
index ea54e98..160f290 100644
--- a/debian/patches/support_logfile_rotation.diff
+++ b/debian/patches/support_logfile_rotation.diff
@@ -13,7 +13,7 @@ Index: xdm/dm.c
 ===================================================================
 --- xdm.orig/dm.c
 +++ xdm/dm.c
-@@ -83,8 +83,10 @@
+@@ -80,8 +80,10 @@
  extern FILE    *fdopen();
  #endif
  
@@ -25,7 +25,7 @@ Index: xdm/dm.c
  static void	RestartDisplay (struct display *d, int forceReserver);
  static void	ScanServers (void);
  static void	SetAccessFileTime (void);
-@@ -93,6 +95,7 @@
+@@ -90,6 +92,7 @@
  static void	TerminateProcess (pid_t pid, int signal);
  
  volatile int	Rescan;
@@ -33,15 +33,15 @@ Index: xdm/dm.c
  static long	ServersModTime, ConfigModTime, AccessFileModTime;
  
  int nofork_session = 0;
-@@ -202,6 +205,7 @@
+@@ -199,6 +202,7 @@
      AddOtherEntropy();
  #endif
      (void) Signal (SIGHUP, RescanNotify);
-+	(void) Signal (SIGUSR2, ReopenLogFileNotify);
++    (void) Signal (SIGUSR2, ReopenLogFileNotify);
  #ifndef UNRELIABLE_SIGNALS
      (void) Signal (SIGCHLD, ChildNotify);
  #endif
-@@ -212,6 +216,11 @@
+@@ -209,6 +213,11 @@
  #endif
  	   AnyDisplaysLeft ())
      {
@@ -53,15 +53,15 @@ Index: xdm/dm.c
  	if (Rescan)
  	{
  	    RescanServers ();
-@@ -236,6 +245,7 @@
+@@ -233,6 +242,7 @@
      int olderrno = errno;
  
      Debug ("Caught SIGHUP\n");
-+	Reopen = 1;
++    Reopen = 1;
      Rescan = 1;
  #ifdef SIGNALS_RESET_WHEN_CAUGHT
      (void) Signal (SIGHUP, RescanNotify);
-@@ -243,6 +253,26 @@
+@@ -240,6 +250,26 @@
      errno = olderrno;
  }
  
@@ -88,7 +88,7 @@ Index: xdm/dm.c
  static void
  ScanServers (void)
  {
-@@ -310,6 +340,14 @@
+@@ -307,6 +337,14 @@
  }
  
  static void
@@ -107,33 +107,20 @@ Index: xdm/dm_error.h
 ===================================================================
 --- xdm.orig/dm_error.h
 +++ xdm/dm_error.h
-@@ -44,6 +44,8 @@
- # define GCC_PRINTFLIKE(fmt,var) /*nothing*/
- #endif
+@@ -40,6 +40,8 @@
+ #  define GCC_PRINTFLIKE(fmt,var) /*nothing*/
+ # endif
  
 +#define WRITES(fd, buf) write(fd, buf, strlen(buf))
 +
- extern void Debug        (char * fmt, ...) GCC_PRINTFLIKE(1,2);
+ extern void Debug        (const char * fmt, ...) GCC_PRINTFLIKE(1,2);
  extern void InitErrorLog (void);
- extern void LogError     (char * fmt, ...) GCC_PRINTFLIKE(1,2);
-Index: xdm/error.c
-===================================================================
---- xdm.orig/error.c
-+++ xdm/error.c
-@@ -49,8 +49,6 @@
- #include "dm.h"
- #include "dm_error.h"
- 
--#define WRITES(fd, buf) write(fd, buf, strlen(buf))
--
- void
- LogInfo(char * fmt, ...)
- {
+ extern void LogAppend    (const char * fmt, ...) GCC_PRINTFLIKE(1,2);
 Index: xdm/xdm.man.cpp
 ===================================================================
 --- xdm.orig/xdm.man.cpp
 +++ xdm/xdm.man.cpp
-@@ -1411,6 +1411,37 @@
+@@ -1403,6 +1403,37 @@
  multiple window systems on the same hardware, you'll probably be more
  interested in
  .I xinit.
diff --git a/debian/rules b/debian/rules
index 0b2c13e..d145721 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,7 @@ include debian/xsfbs/xsfbs.mk
 confflags += --with-pam \
 	--with-xdmconfigdir=/etc/X11/xdm \
 	--with-xdmscriptdir=\$${xdmconfigdir} \
-	--with-xdmauthdir=/var/lib/xdm \
+	--with-authdir=/var/lib/xdm \
 	--with-default-vt=vt7 \
 	--with-pixmapdir=/usr/share/X11/xdm/pixmaps \
 	--with-color-pixmap=debian.xpm \


Reply to: