rpms/gpm/FC-5 gpm-1.20.1-aligned-sleep.patch, NONE, 1.1 gpm-1.20.1-close-fds.patch, NONE, 1.1 gpm.init, 1.15, 1.16 gpm.spec, 1.40, 1.41

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Jan 22 12:35:10 UTC 2007


Author: tjanouse

Update of /cvs/dist/rpms/gpm/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv5493

Modified Files:
	gpm.init gpm.spec 
Added Files:
	gpm-1.20.1-aligned-sleep.patch gpm-1.20.1-close-fds.patch 
Log Message:
* Mon Jan 22 2007 Tomas Janousek <tjanouse at redhat.com> - 1.20.1-78
- refuse connections while waiting for console, fixes #168076

* Mon Jan 22 2007 Tomas Janousek <tjanouse at redhat.com> - 1.20.1-77
- #223696: non-failsafe install-info use in scriptlets

* Tue Oct 10 2006 Petr Rockai <prockai at redhat.com> - 1.20-1-76
- align sleeps to tick boundary, should reduce cpu wakeups
  on laptops, fixes #205064 (patch by Arjan van de Ven)
- disable gpm altogether in runlevel 5, it is probably not
  worth the overhead considering it is barely used at all

* Fri Sep 22 2006 Petr Rockai <prockai at redhat.com> - 1.20.1-75
- fix a bug where gpm daemon kept stdin/out/err open after
  detaching from terminal, causing eg. pipes from initscript
  to hang for the lifetime of gpm

* Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 1.20.1-74.1
- rebuild

* Wed Jun  7 2006 Jeremy Katz <katzj at redhat.com> - 1.20.1-74
- rebuild for -devel deps


gpm-1.20.1-aligned-sleep.patch:
 console.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletion(-)

--- NEW FILE gpm-1.20.1-aligned-sleep.patch ---
--- gpm-1.20.1/src/console.c.org	2006-09-03 10:11:17.000000000 +0200
+++ gpm-1.20.1/src/console.c	2006-09-03 10:14:34.000000000 +0200
@@ -30,6 +30,7 @@
 #include <time.h>          /* time() */
 #include <sys/fcntl.h>     /* O_RDONLY */
 #include <sys/stat.h>      /* mkdir()  */
+#include <sys/time.h>
 #include <asm/types.h>     /* __u32 */
 
 #include <linux/vt.h>      /* VT_GETSTATE */
@@ -102,8 +103,17 @@ int is_text_console(void)
 /*-------------------------------------------------------------------*/
 void wait_text_console(void)
 {
+   struct timeval now;
+   int usecs;
    do {
-      sleep(2);
+      /* sleep to the top of the seconds about 2 seconds from now */
+      gettimeofday(&now, NULL);
+      usecs = 2000000;
+      if (now.tv_usec <= 250000)
+          usecs -= 1000000;
+      usecs += 1000000 - now.tv_usec;
+
+      usleep(usecs);
    } while (!is_text_console());
 }
 

gpm-1.20.1-close-fds.patch:
 startup.c |    5 +++++
 1 files changed, 5 insertions(+)

--- NEW FILE gpm-1.20.1-close-fds.patch ---
--- gpm-1.20.1/src/startup.c.close-fds	2006-09-22 13:46:19.000000000 +0200
+++ gpm-1.20.1/src/startup.c	2006-09-22 13:46:44.000000000 +0200
@@ -97,6 +97,11 @@
    /* is changing to root needed, because of relative paths ? or can we just
     * remove and ignore it ?? FIXME */
    if (chdir("/") < 0) gpm_report(GPM_PR_OOPS,GPM_MESS_CHDIR_FAILED);
+
+   // close extra fds
+   close(0);
+   close(1);
+   close(2);
    
    atexit(gpm_exited);                          /* call gpm_exited at the end */
 }


Index: gpm.init
===================================================================
RCS file: /cvs/dist/rpms/gpm/FC-5/gpm.init,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- gpm.init	21 Oct 2004 18:24:47 -0000	1.15
+++ gpm.init	22 Jan 2007 12:35:08 -0000	1.16
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# chkconfig: 2345 85 15
+# chkconfig: 234 85 15
 # description: GPM adds mouse support to text-based Linux applications such \
 #              as the Midnight Commander. It also allows mouse-based console \
 #              cut-and-paste operations, and includes support for pop-up \


Index: gpm.spec
===================================================================
RCS file: /cvs/dist/rpms/gpm/FC-5/gpm.spec,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- gpm.spec	13 Feb 2006 10:15:48 -0000	1.40
+++ gpm.spec	22 Jan 2007 12:35:08 -0000	1.41
@@ -1,7 +1,7 @@
 Summary: A mouse server for the Linux console.
 Name: gpm
 Version: 1.20.1
-Release: 73.3
+Release: 78
 License: GPL
 Group: System Environment/Daemons
 Source: http://ftp.linux.it/pub/People/rubini/gpm/%{name}-%{version}.tar.gz
@@ -19,6 +19,8 @@
 Patch19: gpm-1.20.1-multilib.patch
 Patch20: gpm-1.20.1-no-console-error.patch
 Patch21: gpm-1.20.1-lib-silent.patch
+Patch22: gpm-1.20.1-close-fds.patch
+Patch23: gpm-1.20.1-aligned-sleep.patch
 
 Prereq: /sbin/chkconfig /sbin/ldconfig /sbin/install-info
 Requires: bash >= 2.0
@@ -62,6 +64,8 @@
 %patch19 -p1 -b .multilib
 %patch20 -p1 -b .no-console-error
 %patch21 -p1 -b .lib-silent
+%patch22 -p1 -b .close-fds
+%patch23 -p1 -b .aligned-sleep
 
 %build
 autoconf
@@ -133,6 +137,7 @@
 %endif
 /sbin/ldconfig
 /sbin/install-info %{_infodir}/gpm.info.gz %{_infodir}/dir
+exit 0
 
 %preun
 if [ $1 = 0 ]; then
@@ -178,6 +183,29 @@
 %{_libdir}/libgpm.so
 
 %changelog
+* Mon Jan 22 2007 Tomas Janousek <tjanouse at redhat.com> - 1.20.1-78
+- refuse connections while waiting for console, fixes #168076
+
+* Mon Jan 22 2007 Tomas Janousek <tjanouse at redhat.com> - 1.20.1-77
+- #223696: non-failsafe install-info use in scriptlets
+
+* Tue Oct 10 2006 Petr Rockai <prockai at redhat.com> - 1.20-1-76
+- align sleeps to tick boundary, should reduce cpu wakeups
+  on laptops, fixes #205064 (patch by Arjan van de Ven)
+- disable gpm altogether in runlevel 5, it is probably not
+  worth the overhead considering it is barely used at all
+
+* Fri Sep 22 2006 Petr Rockai <prockai at redhat.com> - 1.20.1-75
+- fix a bug where gpm daemon kept stdin/out/err open after
+  detaching from terminal, causing eg. pipes from initscript
+  to hang for the lifetime of gpm
+
+* Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 1.20.1-74.1
+- rebuild
+
+* Wed Jun  7 2006 Jeremy Katz <katzj at redhat.com> - 1.20.1-74
+- rebuild for -devel deps
+
 * Mon Feb 13 2006 Petr Rockai <prockai at redhat.com> - 1.20.1-73.3
 - rebuild due to failure on x86-64 (possibly a glitch?)
 




More information about the fedora-cvs-commits mailing list