diff options
-rw-r--r-- | sys-libs/gpm/ChangeLog | 6 | ||||
-rw-r--r-- | sys-libs/gpm/files/digest-gpm-1.20.1-r6 | 6 | ||||
-rw-r--r-- | sys-libs/gpm/files/gpm-OPEN_MAX.patch | 35 | ||||
-rw-r--r-- | sys-libs/gpm/files/gpm-daemon.patch | 48 | ||||
-rw-r--r-- | sys-libs/gpm/gpm-1.20.1-r6.ebuild | 6 |
5 files changed, 10 insertions, 91 deletions
diff --git a/sys-libs/gpm/ChangeLog b/sys-libs/gpm/ChangeLog index e2431cf51b25..f131787c4038 100644 --- a/sys-libs/gpm/ChangeLog +++ b/sys-libs/gpm/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-libs/gpm # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/ChangeLog,v 1.57 2007/11/01 19:09:21 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/ChangeLog,v 1.58 2007/11/12 06:57:47 vapier Exp $ + + 12 Nov 2007; Mike Frysinger <vapier@gentoo.org> -files/gpm-OPEN_MAX.patch, + -files/gpm-daemon.patch, gpm-1.20.1-r6.ebuild: + Relocate patches to patchset like they should have been in the first place. 01 Nov 2007; Christian Heim <phreak@gentoo.org> +files/gpm-OPEN_MAX.patch, gpm-1.20.1-r6.ebuild: diff --git a/sys-libs/gpm/files/digest-gpm-1.20.1-r6 b/sys-libs/gpm/files/digest-gpm-1.20.1-r6 index 0083e96a72bb..29e145f2ccf4 100644 --- a/sys-libs/gpm/files/digest-gpm-1.20.1-r6 +++ b/sys-libs/gpm/files/digest-gpm-1.20.1-r6 @@ -1,6 +1,6 @@ -MD5 ede95b6eb848f87440a2d7f86eaaf13a gpm-1.20.1-patches-1.4.tar.bz2 8049 -RMD160 9bf31260db39870a678ed1167c0b242a778b2b61 gpm-1.20.1-patches-1.4.tar.bz2 8049 -SHA256 64d68412c95358f7d3a525dce38661aa53f13c0ddf2e20eb869325e8dd170e07 gpm-1.20.1-patches-1.4.tar.bz2 8049 +MD5 ded7710f3b39ce0a7ed80623925c1a4d gpm-1.20.1-patches-1.5.tar.bz2 9045 +RMD160 911d3e6f2d4c37f9d1fedf436b346969331e9ce2 gpm-1.20.1-patches-1.5.tar.bz2 9045 +SHA256 9aeb116b17258ac4729c8476edef8d8efed332213df07e0a879061c152812d0c gpm-1.20.1-patches-1.5.tar.bz2 9045 MD5 2c63e827d755527950d9d13fe3d87692 gpm-1.20.1.tar.bz2 565014 RMD160 2650ae1e3e87fcf8bdad80acf62777e8a62b6582 gpm-1.20.1.tar.bz2 565014 SHA256 11fabe7f27a205ff1ea6aee23e1dc2bb2dc5dbfc45ff0320fca0cd559806a936 gpm-1.20.1.tar.bz2 565014 diff --git a/sys-libs/gpm/files/gpm-OPEN_MAX.patch b/sys-libs/gpm/files/gpm-OPEN_MAX.patch deleted file mode 100644 index 34384ce28624..000000000000 --- a/sys-libs/gpm/files/gpm-OPEN_MAX.patch +++ /dev/null @@ -1,35 +0,0 @@ -Daemons should always close stdin, stdout and stderr after forking otherwise -the controlling terminal will have issues closing. -Examples include starting over ssh or baselayout-2 -http://bugs.gentoo.org/show_bug.cgi?id=182721 - - -diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y -index 3a97602..b496550 100644 ---- a/src/prog/gpm-root.y -+++ b/src/prog/gpm-root.y -@@ -526,7 +526,9 @@ int f_bgcmd(int mode, DrawItem *self, int uid) - open("/dev/null",O_RDONLY); /* stdin */ - open(consolename,O_WRONLY); /* stdout */ - dup(1); /* stderr */ -- for (i=3;i<OPEN_MAX; i++) close(i); -+ int open_max = sysconf(_SC_OPEN_MAX); -+ if (open_max == -1) open_max = 1024; -+ for (i=3;i<open_max; i++) close(i); - execl("/bin/sh","sh","-c",self->arg,(char *)NULL); - exit(1); /* shouldn't happen */ - default: return 0; -diff --git a/src/special.c b/src/special.c -index 5bed91a..c6cd04d 100644 ---- a/src/special.c -+++ b/src/special.c -@@ -156,7 +156,9 @@ int processSpecial(Gpm_Event *event) - open(GPM_NULL_DEV,O_RDONLY); /* stdin */ - open(console.device, O_WRONLY); /* stdout */ - dup(1); /* stderr */ -- for (i=3;i<OPEN_MAX; i++) close(i); -+ int open_max = sysconf(_SC_OPEN_MAX); -+ if (open_max == -1) open_max = 1024; -+ for (i=3;i<open_max; i++) close(i); - execl("/bin/sh","sh","-c",command,(char *)NULL); - exit(1); /* shouldn't happen */
\ No newline at end of file diff --git a/sys-libs/gpm/files/gpm-daemon.patch b/sys-libs/gpm/files/gpm-daemon.patch deleted file mode 100644 index 75bbb9945c49..000000000000 --- a/sys-libs/gpm/files/gpm-daemon.patch +++ /dev/null @@ -1,48 +0,0 @@ -Daemons should always close stdin, stdout and stderr after forking otherwise -the controlling terminal will have issues closing. -Examples include starting over ssh or baselayout-2 -http://bugs.gentoo.org/show_bug.cgi?id=182721 - -diff -ur a/src/startup.c b/src/startup.c ---- a/src/startup.c 2002-12-24 22:57:16.000000000 +0000 -+++ b/src/startup.c 2007-07-06 23:33:50.000000000 +0100 -@@ -29,7 +29,7 @@ - #include <sys/types.h> /* geteuid, mknod */ - #include <sys/stat.h> /* mknod */ - #include <fcntl.h> /* mknod */ --#include <unistd.h> /* mknod */ -+#include <unistd.h> /* mknod, daemon */ - - - #include "headers/gpmInt.h" -@@ -134,26 +134,17 @@ - } - } - -- if(option.run_status == GPM_RUN_STARTUP ) { /* else is debugging */ -- /* goto background and become a session leader (Stefan Giessler) */ -- switch(fork()) { -- case -1: gpm_report(GPM_PR_OOPS,GPM_MESS_FORK_FAILED); /* error */ -- case 0: option.run_status = GPM_RUN_DAEMON; break; /* child */ -- default: _exit(0); /* parent */ -- } -+ if (option.run_status == GPM_RUN_STARTUP ) { /* else is debugging */ -+ if (daemon(0,0)) -+ gpm_report(GPM_PR_OOPS,GPM_MESS_FORK_FAILED); /* error */ - -- if (setsid() < 0) gpm_report(GPM_PR_OOPS,GPM_MESS_SETSID_FAILED); -+ option.run_status = GPM_RUN_DAEMON; /* child */ - } - - /* damon init: check whether we run or not, display message */ - check_uniqueness(); - gpm_report(GPM_PR_INFO,GPM_MESS_STARTED); - -- /* 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); -- -- - //return mouse_table[1].fd; /* the second is handled in the main() */ - - /****************** OLD CODE from gpn.c END ***********************/ diff --git a/sys-libs/gpm/gpm-1.20.1-r6.ebuild b/sys-libs/gpm/gpm-1.20.1-r6.ebuild index ec0b80222294..f8c305ec4759 100644 --- a/sys-libs/gpm/gpm-1.20.1-r6.ebuild +++ b/sys-libs/gpm/gpm-1.20.1-r6.ebuild @@ -1,13 +1,13 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/gpm-1.20.1-r6.ebuild,v 1.2 2007/11/01 19:09:21 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/gpm-1.20.1-r6.ebuild,v 1.3 2007/11/12 06:57:47 vapier Exp $ # emacs support disabled due to Bug 99533 inherit eutils toolchain-funcs #elisp-common -PATCH_VER="1.4" +PATCH_VER="1.5" DESCRIPTION="Console-based mouse driver" HOMEPAGE="http://linux.schottelius.org/gpm/" SRC_URI="ftp://arcana.linux.it/pub/gpm/${P}.tar.bz2 @@ -28,8 +28,6 @@ src_unpack() { cd "${S}" EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch epatch "${FILESDIR}"/gpm-configure-LANG.patch - epatch "${FILESDIR}"/gpm-daemon.patch - epatch "${FILESDIR}"/gpm-OPEN_MAX.patch } src_compile() { |