xorg-server: Changes to 'ubuntu'
debian/changelog | 6
debian/patches/100_rethrow_signals.patch | 360 +++++++++++++++++++++++++++++++
debian/patches/135_rethrow_signals.patch | 174 --------------
debian/patches/series | 2
4 files changed, 367 insertions(+), 175 deletions(-)
New commits:
commit cd6f8073986c8eed42a6abb8bbec1e64529c8663
Author: Bryce Harrington <bryce@bryceharrington.org>
Date: Wed Dec 16 00:04:28 2009 -0800
Rename patch 135 to 100
diff --git a/debian/patches/135_rethrow_signals.patch b/debian/patches/135_rethrow_signals.patch
deleted file mode 100644
index 271ff49..0000000
--- a/debian/patches/135_rethrow_signals.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-When the X server aborts with a signal, also re-raise that signal. This
-allows crash handlers like apport a chance to listen for and act on the
-signal appropriately. Apport uses this to capture a backtrace and post
-a bug report.
-
-Signed-off-by: Bryce Harrington <bryce@canonical.com>
-
-diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
-index 8cd765a..d2fb1a4 100644
---- a/hw/xfree86/common/xf86Events.c
-+++ b/hw/xfree86/common/xf86Events.c
-@@ -355,6 +355,8 @@ xf86InterceptSigIll(void (*sigillhandler)(void))
- int
- xf86SigWrapper(int signo)
- {
-+ static Bool beenhere = FALSE;
-+
- if ((signo == SIGILL) && xf86SigIllHandler) {
- (*xf86SigIllHandler)();
- return 0; /* continue */
-@@ -377,6 +379,41 @@ void
- xf86PrintBacktrace(void)
- {
- xorg_backtrace();
-+ switch (signo) {
-+ case SIGSEGV:
-+ case SIGBUS:
-+ case SIGILL:
-+ case SIGFPE:
-+ signal(signo,SIG_DFL);
-+ ErrorF ("Saw signal %d. Server aborting.\n", signo);
-+#ifdef DDXOSFATALERROR
-+ if (!beenhere) {
-+ OsVendorFatalError();
-+ }
-+#endif
-+#ifdef ABORTONFATALERROR
-+ abort();
-+#endif
-+ if (!beenhere) {
-+ beenhere = TRUE;
-+ OsCleanup(TRUE);
-+ CloseDownDevices();
-+ SigAbortDDX(signo);
-+ fflush(stderr);
-+ if (CoreDump) {
-+ if (signo != 0)
-+ raise(signo);
-+ else
-+ abort();
-+ }
-+ /*exit (1);*/
-+
-+ } else {
-+ abort();
-+ }
-+ return;
-+ }
-+
- }
-
- #define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7)))
-diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
-index d3de670..dc3eff5 100644
---- a/hw/xfree86/common/xf86Init.c
-+++ b/hw/xfree86/common/xf86Init.c
-@@ -1174,14 +1174,17 @@ OsVendorInit(void)
- }
-
- /*
-- * ddxGiveUp --
-+ * ddxSigGiveUp --
- * Device dependent cleanup. Called by by dix before normal server death.
- * For SYSV386 we must switch the terminal back to normal mode. No error-
- * checking here, since there should be restored as much as possible.
-+ *
-+ * If a non-zero signo is passed, re-raise that signal rather than
-+ * calling abort().
- */
-
- void
--ddxGiveUp(void)
-+ddxSigGiveUp(int signo)
- {
- int i;
-
-@@ -1207,24 +1210,47 @@ ddxGiveUp(void)
-
- xf86CloseConsole();
-
-+ ErrorF (" ddxSigGiveUp: Closing log\n");
- xf86CloseLog();
-
- /* If an unexpected signal was caught, dump a core for debugging */
-- if (xf86Info.caughtSignal)
-- abort();
-+ if (xf86Info.caughtSignal) {
-+ if (signo != 0) {
-+ ErrorF (" ddxSigGiveUp: re-raising %d\n", signo);
-+ raise(signo);
-+ } else {
-+ ErrorF (" ddxSigGiveUp: aborting\n");
-+ abort();
-+ }
-+ }
- }
-
-+/*
-+ * ddxGiveUp --
-+ * Device dependent cleanup. Called by by dix before normal server death.
-+ * For SYSV386 we must switch the terminal back to normal mode. No error-
-+ * checking here, since there should be restored as much as possible.
-+ */
-+
-+void
-+ddxGiveUp()
-+{
-+ ddxSigGiveUp(0);
-+}
-
-
- /*
-- * AbortDDX --
-+ * SigAbortDDX --
- * DDX - specific abort routine. Called by AbortServer(). The attempt is
- * made to restore all original setting of the displays. Also all devices
- * are closed.
-+ *
-+ * If a non-zero signo is passed, re-raise that signal rather than calling
-+ * abort()
- */
-
- void
--AbortDDX(void)
-+SigAbortDDX(int signo)
- {
- int i;
-
-@@ -1255,7 +1281,20 @@ AbortDDX(void)
- * This is needed for an abnormal server exit, since the normal exit stuff
- * MUST also be performed (i.e. the vt must be left in a defined state)
- */
-- ddxGiveUp();
-+ ddxSigGiveUp(signo);
-+}
-+
-+/*
-+ * AbortDDX --
-+ * DDX - specific abort routine. The attempt is made to restore
-+ * all original setting of the displays. Also all devices are
-+ * closed.
-+ */
-+
-+void
-+AbortDDX()
-+{
-+ SigAbortDDX(0);
- }
-
- void
-diff --git a/include/os.h b/include/os.h
-index 2f6b0c0..d58be5e 100644
---- a/include/os.h
-+++ b/include/os.h
-@@ -434,7 +434,9 @@ typedef struct {
- /* stuff for FlushCallback */
- extern _X_EXPORT CallbackListPtr FlushCallback;
-
-+extern _X_EXPORT void SigAbortDDX(int signo);
- extern _X_EXPORT void AbortDDX(void);
-+extern _X_EXPORT void ddxSigGiveUp(int signo);
- extern _X_EXPORT void ddxGiveUp(void);
- extern _X_EXPORT int TimeSinceLastInputEvent(void);
-
commit 64e4c47af2eeff4db9c6092d15fa4e373dddc925
Author: Bryce Harrington <bryce@bryceharrington.org>
Date: Tue Dec 15 17:37:39 2009 -0800
Update rethrow_signals patch to build.
diff --git a/debian/changelog b/debian/changelog
index f782008..f35f009 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xorg-server (2:1.7.3.901-1ubuntu3) karmic; urgency=low
+
+ * Update 100_rethrow_signals.patch to work with xserver 1.7
+
+ -- Bryce Harrington <bryce@ubuntu.com> Tue, 15 Dec 2009 15:00:08 -0800
+
xorg-server (2:1.7.3.901-1ubuntu2) lucid; urgency=low
[ Alberto Milone ]
diff --git a/debian/patches/100_rethrow_signals.patch b/debian/patches/100_rethrow_signals.patch
new file mode 100644
index 0000000..2da1df4
--- /dev/null
+++ b/debian/patches/100_rethrow_signals.patch
@@ -0,0 +1,360 @@
+diff -Nurp xorg-server-ubuntu-git-patched/hw/dmx/dmxinit.c xorg-server-ubuntu-git-working/hw/dmx/dmxinit.c
+--- xorg-server-ubuntu-git-patched/hw/dmx/dmxinit.c 2009-12-15 11:52:54.000000000 -0800
++++ xorg-server-ubuntu-git-working/hw/dmx/dmxinit.c 2009-12-15 17:25:56.000000000 -0800
+@@ -834,7 +834,7 @@ static void dmxSetDefaultFontPath(char *
+ /** This function is called in Xserver/os/utils.c from \a AbortServer().
+ * We must ensure that backend and console state is restored in the
+ * event the server shutdown wasn't clean. */
+-void AbortDDX(void)
++void SigAbortDDX(int signo)
+ {
+ int i;
+
+@@ -846,6 +846,11 @@ void AbortDDX(void)
+ }
+ }
+
++void AbortDDX(void)
++{
++ SigAbortDDX(0);
++}
++
+ /** This function is called in Xserver/dix/main.c from \a main() when
+ * dispatchException & DE_TERMINATE (which is the only way to exit the
+ * main loop without an interruption. */
+diff -Nurp xorg-server-ubuntu-git-patched/hw/kdrive/src/kdrive.c xorg-server-ubuntu-git-working/hw/kdrive/src/kdrive.c
+--- xorg-server-ubuntu-git-patched/hw/kdrive/src/kdrive.c 2009-12-15 11:52:54.000000000 -0800
++++ xorg-server-ubuntu-git-working/hw/kdrive/src/kdrive.c 2009-12-15 17:30:49.000000000 -0800
+@@ -322,7 +322,7 @@ KdProcessSwitch (void)
+ }
+
+ void
+-AbortDDX(void)
++SigAbortDDX(int signo)
+ {
+ KdDisableScreens ();
+ if (kdOsFuncs)
+@@ -339,6 +339,12 @@ AbortDDX(void)
+ }
+
+ void
++AbortDDX(void)
++{
++ SigAbortDDX(0);
++}
++
++void
+ ddxGiveUp (void)
+ {
+ AbortDDX ();
+diff -Nurp xorg-server-ubuntu-git-patched/hw/vfb/InitOutput.c xorg-server-ubuntu-git-working/hw/vfb/InitOutput.c
+--- xorg-server-ubuntu-git-patched/hw/vfb/InitOutput.c 2009-12-15 11:52:53.000000000 -0800
++++ xorg-server-ubuntu-git-working/hw/vfb/InitOutput.c 2009-12-15 16:25:37.000000000 -0800
+@@ -214,11 +214,17 @@ ddxGiveUp(void)
+ }
+
+ void
+-AbortDDX(void)
++SigAbortDDX(int signo)
+ {
+ ddxGiveUp();
+ }
+
++void
++AbortDDX(void)
++{
++ SigAbortDDX(0);
++}
++
+ #ifdef __APPLE__
+ void
+ DarwinHandleGUI(int argc, char *argv[])
+diff -Nurp xorg-server-ubuntu-git-patched/hw/xfree86/common/xf86Events.c xorg-server-ubuntu-git-working/hw/xfree86/common/xf86Events.c
+--- xorg-server-ubuntu-git-patched/hw/xfree86/common/xf86Events.c 2009-12-15 11:52:54.000000000 -0800
++++ xorg-server-ubuntu-git-working/hw/xfree86/common/xf86Events.c 2009-12-15 14:25:32.000000000 -0800
+@@ -355,6 +355,8 @@ xf86InterceptSigIll(void (*sigillhandler
+ int
+ xf86SigWrapper(int signo)
+ {
++ static Bool beenhere = FALSE;
++
+ if ((signo == SIGILL) && xf86SigIllHandler) {
+ (*xf86SigIllHandler)();
+ return 0; /* continue */
+diff -Nurp xorg-server-ubuntu-git-patched/hw/xfree86/common/xf86Init.c xorg-server-ubuntu-git-working/hw/xfree86/common/xf86Init.c
+--- xorg-server-ubuntu-git-patched/hw/xfree86/common/xf86Init.c 2009-12-15 11:53:14.000000000 -0800
++++ xorg-server-ubuntu-git-working/hw/xfree86/common/xf86Init.c 2009-12-15 11:54:07.000000000 -0800
+@@ -1188,14 +1188,17 @@ OsVendorInit(void)
+ }
+
+ /*
+- * ddxGiveUp --
++ * ddxSigGiveUp --
+ * Device dependent cleanup. Called by by dix before normal server death.
+ * For SYSV386 we must switch the terminal back to normal mode. No error-
+ * checking here, since there should be restored as much as possible.
++ *
++ * If a non-zero signo is passed, re-raise that signal rather than
++ * calling abort().
+ */
+
+ void
+-ddxGiveUp(void)
++ddxSigGiveUp(int signo)
+ {
+ int i;
+
+@@ -1221,24 +1224,47 @@ ddxGiveUp(void)
+
+ xf86CloseConsole();
+
++ ErrorF (" ddxSigGiveUp: Closing log\n");
+ xf86CloseLog();
+
+ /* If an unexpected signal was caught, dump a core for debugging */
+- if (xf86Info.caughtSignal)
+- abort();
++ if (xf86Info.caughtSignal) {
++ if (signo != 0) {
++ ErrorF (" ddxSigGiveUp: re-raising %d\n", signo);
++ raise(signo);
++ } else {
++ ErrorF (" ddxSigGiveUp: aborting\n");
++ abort();
++ }
++ }
+ }
+
++/*
++ * ddxGiveUp --
++ * Device dependent cleanup. Called by by dix before normal server death.
++ * For SYSV386 we must switch the terminal back to normal mode. No error-
++ * checking here, since there should be restored as much as possible.
++ */
++
++void
++ddxGiveUp()
++{
++ ddxSigGiveUp(0);
++}
+
+
+ /*
+- * AbortDDX --
++ * SigAbortDDX --
+ * DDX - specific abort routine. Called by AbortServer(). The attempt is
+ * made to restore all original setting of the displays. Also all devices
+ * are closed.
++ *
++ * If a non-zero signo is passed, re-raise that signal rather than calling
++ * abort()
+ */
+
+ void
+-AbortDDX(void)
++SigAbortDDX(int signo)
+ {
+ int i;
+
+@@ -1269,7 +1295,20 @@ AbortDDX(void)
+ * This is needed for an abnormal server exit, since the normal exit stuff
+ * MUST also be performed (i.e. the vt must be left in a defined state)
+ */
+- ddxGiveUp();
++ ddxSigGiveUp(signo);
++}
++
++/*
++ * AbortDDX --
++ * DDX - specific abort routine. The attempt is made to restore
++ * all original setting of the displays. Also all devices are
++ * closed.
++ */
++
++void
++AbortDDX()
++{
++ SigAbortDDX(0);
+ }
+
+ void
+diff -Nurp xorg-server-ubuntu-git-patched/hw/xnest/Init.c xorg-server-ubuntu-git-working/hw/xnest/Init.c
+--- xorg-server-ubuntu-git-patched/hw/xnest/Init.c 2009-12-15 11:52:54.000000000 -0800
++++ xorg-server-ubuntu-git-working/hw/xnest/Init.c 2009-12-15 17:20:01.000000000 -0800
+@@ -112,12 +112,17 @@ InitInput(int argc, char *argv[])
+ /*
+ * DDX - specific abort routine. Called by AbortServer().
+ */
+-void AbortDDX(void)
++void SigAbortDDX(int signo)
+ {
+ xnestDoFullGeneration = True;
+ xnestCloseDisplay();
+ }
+
++void AbortDDX(void)
++{
++ SigAbortDDX(0);
++}
++
+ /* Called by GiveUp(). */
+ void ddxGiveUp(void)
+ {
+diff -Nurp xorg-server-ubuntu-git-patched/hw/xquartz/darwin.c xorg-server-ubuntu-git-working/hw/xquartz/darwin.c
+--- xorg-server-ubuntu-git-patched/hw/xquartz/darwin.c 2009-12-15 11:52:53.000000000 -0800
++++ xorg-server-ubuntu-git-working/hw/xquartz/darwin.c 2009-12-15 17:31:50.000000000 -0800
+@@ -798,12 +798,12 @@ void ddxGiveUp( void )
+
+
+ /*
+- * AbortDDX --
++ * [Sig]AbortDDX --
+ * DDX - specific abort routine. Called by AbortServer(). The attempt is
+ * made to restore all original setting of the displays. Also all devices
+ * are closed.
+ */
+-void AbortDDX( void )
++void SigAbortDDX( void )
+ {
+ ErrorF( " AbortDDX\n" );
+ /*
+@@ -813,6 +813,11 @@ void AbortDDX( void )
+ ddxGiveUp();
+ }
+
++void AbortDDX( void )
++{
++ SigAbortDDX(0);
++}
++
+ #include "mivalidate.h" // for union _Validate used by windowstr.h
+ #include "windowstr.h" // for struct _Window
+ #include "scrnintstr.h" // for struct _Screen
+diff -Nurp xorg-server-ubuntu-git-patched/hw/xwin/InitOutput.c xorg-server-ubuntu-git-working/hw/xwin/InitOutput.c
+--- xorg-server-ubuntu-git-patched/hw/xwin/InitOutput.c 2009-12-15 11:52:54.000000000 -0800
++++ xorg-server-ubuntu-git-working/hw/xwin/InitOutput.c 2009-12-15 17:32:36.000000000 -0800
+@@ -283,7 +283,7 @@ ddxGiveUp (void)
+
+ /* See Porting Layer Definition - p. 57 */
+ void
+-AbortDDX (void)
++SigAbortDDX (int signo)
+ {
+ #if CYGDEBUG
+ winDebug ("AbortDDX\n");
+@@ -291,6 +291,12 @@ AbortDDX (void)
+ ddxGiveUp ();
+ }
+
++void
++AbortDDX (void)
++{
++ SigAbortDDX(0);
++}
++
+ #ifdef __CYGWIN__
+ /* hasmntopt is currently not implemented for cygwin */
+ static const char *winCheckMntOpt(const struct mntent *mnt, const char *opt)
+diff -Nurp xorg-server-ubuntu-git-patched/include/os.h xorg-server-ubuntu-git-working/include/os.h
+--- xorg-server-ubuntu-git-patched/include/os.h 2009-12-15 11:52:53.000000000 -0800
++++ xorg-server-ubuntu-git-working/include/os.h 2009-12-15 11:54:07.000000000 -0800
+@@ -434,7 +434,9 @@ typedef struct {
+ /* stuff for FlushCallback */
+ extern _X_EXPORT CallbackListPtr FlushCallback;
+
++extern _X_EXPORT void SigAbortDDX(int signo);
+ extern _X_EXPORT void AbortDDX(void);
++extern _X_EXPORT void ddxSigGiveUp(int signo);
+ extern _X_EXPORT void ddxGiveUp(void);
+ extern _X_EXPORT int TimeSinceLastInputEvent(void);
+
+diff -Nurp xorg-server-ubuntu-git-patched/os/log.c xorg-server-ubuntu-git-working/os/log.c
+--- xorg-server-ubuntu-git-patched/os/log.c 2009-12-15 11:53:14.000000000 -0800
++++ xorg-server-ubuntu-git-working/os/log.c 2009-12-15 14:21:41.000000000 -0800
+@@ -413,11 +413,12 @@ LogMessage(MessageType type, const char
+ }
+
+ #ifdef __GNUC__
++void SigAbortServer(int signo) __attribute__((noreturn));
+ void AbortServer(void) __attribute__((noreturn));
+ #endif
+
+ void
+-AbortServer(void)
++SigAbortServer(int signo)
+ {
+ #ifdef XF86BIGFONT
+ XF86BigfontCleanup();
+@@ -425,11 +426,21 @@ AbortServer(void)
+ CloseWellKnownConnections();
+ OsCleanup(TRUE);
+ CloseDownDevices();
+- AbortDDX();
++ SigAbortDDX(signo);
+ fflush(stderr);
+- if (CoreDump)
+- abort();
+- exit (1);
++ if (CoreDump) {
++ if (signo != 0)
++ raise(signo);
++ else
++ abort();
++ }
++ /* exit (1); */
++}
++
++void
++AbortServer(void)
++{
++ SigAbortServer(0);
+ }
+
+ #define AUDIT_PREFIX "AUDIT: %s: %ld: "
+@@ -532,6 +543,27 @@ VAuditF(const char *f, va_list args)
+ }
+
+ void
++FatalSignal(int signo)
++{
++ static Bool beenhere = FALSE;
++
++ if (beenhere)
++ ErrorF("\nFatalSignal re-entered, aborting\n");
++ else
++ ErrorF("\nCaught signal %d (%s). Server aborting\n",
++ signo, strsignal(signo));
++
++ if (!beenhere)
++ OsVendorFatalError();
++ if (!beenhere) {
++ beenhere = TRUE;
++ SigAbortServer(signo);
++ } else
++ abort();
++ /*NOTREACHED*/
++}
++
++void
+ FatalError(const char *f, ...)
+ {
+ va_list args;
+diff -Nurp xorg-server-ubuntu-git-patched/os/osinit.c xorg-server-ubuntu-git-working/os/osinit.c
+--- xorg-server-ubuntu-git-patched/os/osinit.c 2009-12-15 11:52:56.000000000 -0800
++++ xorg-server-ubuntu-git-working/os/osinit.c 2009-12-15 14:28:37.000000000 -0800
+@@ -148,13 +148,13 @@ OsSigHandler(int signo)
+ case SIGBUS:
+ case SIGILL:
+ case SIGFPE:
++ signal(signo,SIG_DFL);
+ ErrorF("%s at address %p\n", strsignal(signo), sip->si_addr);
+ }
+ }
+ #endif
+
+- FatalError("Caught signal %d (%s). Server aborting\n",
+- signo, strsignal(signo));
++ FatalSignal(signo);
+ }
+
+ void
diff --git a/debian/patches/series b/debian/patches/series
index 265b6ce..56da980 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,10 +11,10 @@
13-configure-config-udev-defaults-to-off-for-now.diff
14-config-add-example-udev-rules.diff
15-config-udev-look-for-xkb-rules-model-layout-variant-.diff
+100_rethrow_signals.patch
#104_nvidia_autodetect.patch
#105_fglrx_autodetect.patch
121_only_switch_vt_when_active.diff
-#135_rethrow_signals.patch
#143_default_to_vesa.patch
157_check_null_modes.patch
160_log_timestamping.patch
Reply to: