~ubuntu-branches/ubuntu/wily/wdm/wily-proposed

« back to all changes in this revision

Viewing changes to debian/xdm.Debian.patches

  • Committer: Package Import Robot
  • Author(s): Agustin Martin Domingo
  • Date: 2012-03-06 15:42:13 UTC
  • Revision ID: package-import@ubuntu.com-20120306154213-zjci9axgw7mcv5du
Tags: 1.28-10
* QA upload.
* debian/control:
  - Change libpng12-dev Build-Depends to libpng-dev (Closes: #662545).
  - Bump Standards Version. No changes required.
* Some changes to mimic xdm equivalent files:
  - Xreset,Xstartup,Xsetup_0:
    + Use which function instead of checking hardcoded locations.
    + Copy Xstartup nologin stuff from xdm for consistency.
    + Use grep -qs '^whatever' instead of plain grep -q ^whatever.
  - wdm.init:
    + Use lsb/init-functions.
    + Merge some of the xdm lsb/init dependencies.
    + Add status option.
    + Misc changes.
* wdm.init:
  - Use a common wdm_may_update_wmlist function for possible
    update_wdm_wmlist calls.
* Remove obsolete and unused init file and rename {dir,docs} ->
  wdm.{dir,docs} for consistency.
* debian/xdm.Debian.patches: Remove this ancient and unused file.
* 03_autoconf.patch:
  - No need to add -lXft, get-wings-flags --libs will (needlessly) do it.
  - Do not try to filter out unneeded X libs, --as-needed will do it.
* debian/rules:
  - Use dh_prep instead of obsolete dh_clean -k.
  - Use --as-needed to avoid linking to unneeded libs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -ruN xdm-wdm/policy.c xdm-debian/policy.c
2
 
--- xdm-wdm/policy.c    Sat Jan 18 01:02:22 1997
3
 
+++ xdm-debian/policy.c Fri Aug 14 11:17:36 1998
4
 
@@ -1,5 +1,7 @@
5
 
 /* $XConsortium: policy.c,v 1.12 94/04/17 20:03:41 hersh Exp $ */
6
 
 /* $XFree86: xc/programs/xdm/policy.c,v 3.1 1997/01/18 07:02:22 dawes Exp $ */
7
 
+/* Debian: added feature to display load average of available hosts if
8
 
+           possible */
9
 
 /*
10
 
 
11
 
 Copyright (c) 1988  X Consortium
12
 
@@ -53,6 +55,8 @@
13
 
 #endif
14
 
 #endif
15
 
 
16
 
+#include <stdio.h>
17
 
+
18
 
 static ARRAY8 noAuthentication = { (CARD16) 0, (CARD8Ptr) 0 };
19
 
 
20
 
 typedef struct _XdmAuth {
21
 
@@ -123,6 +127,43 @@
22
 
     return -1;
23
 
 }
24
 
 
25
 
+/* Find out the system load, and fill in either:
26
 
+   "Available (load x.xx)"
27
 
+   or
28
 
+   "Willing to manage"
29
 
+   if finding the load turns out to be impossible */
30
 
+static void
31
 
+avail_msg(char *statusBuf)
32
 
+{
33
 
+#ifndef __linux__
34
 
+    sprintf(statusBuf, "Willing to manage");
35
 
+    return;
36
 
+#else /* __linux__ */
37
 
+    FILE *lavg;
38
 
+    const char *err = "Willing to manage";
39
 
+    char buf[5];
40
 
+
41
 
+    lavg = fopen("/proc/loadavg", "r");
42
 
+    if (lavg == NULL)
43
 
+    {
44
 
+        sprintf(statusBuf, err);
45
 
+        return;
46
 
+    }
47
 
+
48
 
+    if (fread(buf, sizeof(char), 4, lavg) != 4)
49
 
+    {
50
 
+        fclose(lavg);
51
 
+        sprintf(statusBuf, err);
52
 
+        return;
53
 
+    }
54
 
+    buf[4] = '\0';
55
 
+
56
 
+    sprintf(statusBuf, "Available (load: %s)", buf);
57
 
+    fclose(lavg);
58
 
+    return;
59
 
+#endif /* __linux__ */
60
 
+}
61
 
+
62
 
 /*ARGSUSED*/
63
 
 int
64
 
 Willing (addr, connectionType, authenticationName, status, type)
65
 
@@ -139,7 +180,7 @@
66
 
     if (!ret)
67
 
        sprintf (statusBuf, "Display not authorized to connect");
68
 
     else
69
 
-       sprintf (statusBuf, "Willing to manage");
70
 
+       avail_msg (statusBuf);
71
 
     status->length = strlen (statusBuf);
72
 
     status->data = (CARD8Ptr) malloc (status->length);
73
 
     if (!status->data)
74
 
diff -ruN xdm-wdm/server.c xdm-debian/server.c
75
 
--- xdm-wdm/server.c    Fri Jan  5 07:21:01 1996
76
 
+++ xdm-debian/server.c Fri Aug 14 11:17:37 1998
77
 
@@ -1,5 +1,6 @@
78
 
 /* $XConsortium: server.c,v 1.20 94/10/17 18:29:34 converse Exp $ */
79
 
 /* $XFree86: xc/programs/xdm/server.c,v 3.2 1996/01/05 13:21:01 dawes Exp $ */
80
 
+/* Debian: patch from Matthieu Herrb to close open chooser socket */
81
 
 /*
82
 
 
83
 
 Copyright (c) 1988  X Consortium
84
 
diff -ruN xdm-wdm/session.c xdm-debian/session.c
85
 
--- xdm-wdm/session.c   Mon Mar  2 05:56:36 1998
86
 
+++ xdm-debian/session.c        Fri Aug 14 11:17:37 1998
87
 
@@ -1,5 +1,6 @@
88
 
 /* $XConsortium: session.c /main/77 1996/11/24 17:32:33 rws $ */
89
 
 /* $XFree86: xc/programs/xdm/session.c,v 3.11.2.1 1998/01/23 12:35:20 dawes Exp $ */
90
 
+/* Debian: patch from Matthieu Herrb to close open chooser socket */
91
 
 /*
92
 
 
93
 
 Copyright (c) 1988  X Consortium
94
 
diff -ruN xdm-wdm/xdm.man xdm-debian/xdm.man
95
 
--- xdm-wdm/xdm.man     Sat May 10 01:03:03 1997
96
 
+++ xdm-debian/xdm.man  Fri Aug 14 11:17:37 1998
97
 
@@ -1,5 +1,6 @@
98
 
 .\" $XConsortium: xdm.man /main/44 1996/12/09 17:08:44 kaleb $
99
 
 .\" $XFree86: xc/programs/xdm/xdm.man,v 3.7.2.1 1997/05/10 07:03:03 hohndel Exp $
100
 
+.\" Debian: deleted repeated paragraph "When the user selects a host..."
101
 
 .\" Copyright (c) 1988, 1994  X Consortium
102
 
 .\" 
103
 
 .\" Permission is hereby granted, free of charge, to any person obtaining
104
 
@@ -718,15 +719,6 @@
105
 
 \fIxdm\fP remembers the user's choice (for
106
 
 \fBDisplayManager.choiceTimeout\fP seconds) and forwards the request
107
 
 to the chosen host, which starts a session on that display.
108
 
-
109
 
-When the user selects a host, \fIchooser\fP prints the host chosen,
110
 
-which is read by the parent \fIxdm\fP, and exits.
111
 
-\fIxdm\fP closes its connection to the X server, and the server resets
112
 
-and sends another \fBIndirect\fP XDMCP request.
113
 
-\fIxdm\fP remembers the user's choice (for
114
 
-\fBDisplayManager.choiceTimeout\fP seconds) and forwards the request
115
 
-to the chosen host, which starts a session on that display.
116
 
-
117
 
 .\"
118
 
 .SH "LOCAL SERVER SPECIFICATION"
119
 
 .PP