summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-07-07 19:48:14 +0000
committerRoy Marples <uberlord@gentoo.org>2007-07-07 19:48:14 +0000
commitac41ceb9232ec165d56686f02156dc1d73841ca3 (patch)
treed11adaaa10ea752823847b119f510150678a0256 /sys-libs
parentStable on ppc; bug #184435. (diff)
downloadhistorical-ac41ceb9232ec165d56686f02156dc1d73841ca3.tar.gz
historical-ac41ceb9232ec165d56686f02156dc1d73841ca3.tar.bz2
historical-ac41ceb9232ec165d56686f02156dc1d73841ca3.zip
Close stdin, stdout and stderr after forking, #182721.
Package-Manager: portage-2.1.3_rc6
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/gpm/ChangeLog10
-rw-r--r--sys-libs/gpm/Manifest19
-rw-r--r--sys-libs/gpm/files/digest-gpm-1.20.1-r66
-rw-r--r--sys-libs/gpm/files/gpm-daemon.patch48
-rw-r--r--sys-libs/gpm/gpm-1.20.1-r6.ebuild75
5 files changed, 152 insertions, 6 deletions
diff --git a/sys-libs/gpm/ChangeLog b/sys-libs/gpm/ChangeLog
index 0ae3fe790ab6..ceb559de995e 100644
--- a/sys-libs/gpm/ChangeLog
+++ b/sys-libs/gpm/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-libs/gpm
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/ChangeLog,v 1.55 2006/09/05 03:44:50 kumba Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/ChangeLog,v 1.56 2007/07/07 19:48:14 uberlord Exp $
+
+*gpm-1.20.1-r6 (07 Jul 2007)
+
+ 07 Jul 2007; Roy Marples <uberlord@gentoo.org> +files/gpm-daemon.patch,
+ +gpm-1.20.1-r6.ebuild:
+ Close stdin, stdout and stderr after forking, #182721.
05 Sep 2006; Joshua Kinard <kumba@gentoo.org> gpm-1.20.1-r5.ebuild:
Marked stable on mips.
diff --git a/sys-libs/gpm/Manifest b/sys-libs/gpm/Manifest
index 3139e16ee8f3..e28744bd9b76 100644
--- a/sys-libs/gpm/Manifest
+++ b/sys-libs/gpm/Manifest
@@ -2,6 +2,10 @@ AUX gpm-configure-LANG.patch 2052 RMD160 91f5b90600dfccb10c4e2308a5a1485275fdfee
MD5 e1d606df0fb23c52c4ec513d52fa50ab files/gpm-configure-LANG.patch 2052
RMD160 91f5b90600dfccb10c4e2308a5a1485275fdfeee files/gpm-configure-LANG.patch 2052
SHA256 63de6d2dcfe14f21d147abeb1390405b9220c03f8e968f482d4b4c1cf279c88b files/gpm-configure-LANG.patch 2052
+AUX gpm-daemon.patch 1885 RMD160 c02203779e3369e3a16c30ca2c9a05da46fa9fb6 SHA1 798092cc66d3ff32a88158338bee465972ab2c02 SHA256 e852b15f12304c18523ab567fce5fbf9f8d45cddd93c9a6fd9bb2411bf8d67e9
+MD5 9c91abc35d405b7fed8e75b27568bacb files/gpm-daemon.patch 1885
+RMD160 c02203779e3369e3a16c30ca2c9a05da46fa9fb6 files/gpm-daemon.patch 1885
+SHA256 e852b15f12304c18523ab567fce5fbf9f8d45cddd93c9a6fd9bb2411bf8d67e9 files/gpm-daemon.patch 1885
AUX gpm.conf.d 580 RMD160 5ce706d89a3e2c01b75a01dd614267f918290be9 SHA1 44035e2059ac0fc178bfe427900d43ad33aeaa2a SHA256 73e7483fdc4b12ab4225a4cb13bbe7da71b07b9e69b17e3a6a4c63cb5e2287c8
MD5 5968cb47e493e348cf289b0dd1990f4a files/gpm.conf.d 580
RMD160 5ce706d89a3e2c01b75a01dd614267f918290be9 files/gpm.conf.d 580
@@ -21,10 +25,14 @@ EBUILD gpm-1.20.1-r5.ebuild 1927 RMD160 78a7a4a26511fcb366e38fbe13a079a18f1630eb
MD5 17cd4021459611a75056ae90e2502dad gpm-1.20.1-r5.ebuild 1927
RMD160 78a7a4a26511fcb366e38fbe13a079a18f1630eb gpm-1.20.1-r5.ebuild 1927
SHA256 2b1144ad72a161b0dccf0aaaab31523731c0de3e3faab97143b22dc8fc1b9f66 gpm-1.20.1-r5.ebuild 1927
-MISC ChangeLog 7592 RMD160 1ebc941a614879381e3202b5789ca73c6fe88234 SHA1 f0d085335836641a2e2d3a2aed2b12069dc45dbc SHA256 83af757e7fe33ae61127de10bd0587b7a11ae94096c59c63a1ec88cc56fe7b63
-MD5 9e077363b7cc16ecfd19b780c038f0df ChangeLog 7592
-RMD160 1ebc941a614879381e3202b5789ca73c6fe88234 ChangeLog 7592
-SHA256 83af757e7fe33ae61127de10bd0587b7a11ae94096c59c63a1ec88cc56fe7b63 ChangeLog 7592
+EBUILD gpm-1.20.1-r6.ebuild 1981 RMD160 1247ea85c614e8afddc57e6a00d9502388dca5da SHA1 75aa61409ae1f17c3c9ebac232f9bca631d9f338 SHA256 08a5b02393fcad7260227aa43e35373be759529ceef310c5bdd5e2e4207ed57c
+MD5 0a5aa2346fdb1af5e76bf103609a654e gpm-1.20.1-r6.ebuild 1981
+RMD160 1247ea85c614e8afddc57e6a00d9502388dca5da gpm-1.20.1-r6.ebuild 1981
+SHA256 08a5b02393fcad7260227aa43e35373be759529ceef310c5bdd5e2e4207ed57c gpm-1.20.1-r6.ebuild 1981
+MISC ChangeLog 7782 RMD160 88b0d293c509e3199aed2c0b69eeba3a3d5743e9 SHA1 8749cbf0e8932d31014d66d94346ca4b2352d4d7 SHA256 0c2a98693a197c1bdf5b66e0f25379436beb1c088dc3de0789ed40a4e909dbf4
+MD5 fda10f306b04d222e4f220d5f9010d21 ChangeLog 7782
+RMD160 88b0d293c509e3199aed2c0b69eeba3a3d5743e9 ChangeLog 7782
+SHA256 0c2a98693a197c1bdf5b66e0f25379436beb1c088dc3de0789ed40a4e909dbf4 ChangeLog 7782
MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 metadata.xml 164
@@ -35,3 +43,6 @@ SHA256 93297434737f68c2cf314483c1b0a681c72a0ab5972bbb4388c4f5e9aaec728e files/di
MD5 729bb8c1fccf2aabb2e619665d67ed38 files/digest-gpm-1.20.1-r5 500
RMD160 462e9eb4a0b8587158ff9dd23d39cfb66279f4d7 files/digest-gpm-1.20.1-r5 500
SHA256 00e2a9daccf2985241490b46ef7695d12de12042fc8c4efd2991ea2f3218abbb files/digest-gpm-1.20.1-r5 500
+MD5 729bb8c1fccf2aabb2e619665d67ed38 files/digest-gpm-1.20.1-r6 500
+RMD160 462e9eb4a0b8587158ff9dd23d39cfb66279f4d7 files/digest-gpm-1.20.1-r6 500
+SHA256 00e2a9daccf2985241490b46ef7695d12de12042fc8c4efd2991ea2f3218abbb files/digest-gpm-1.20.1-r6 500
diff --git a/sys-libs/gpm/files/digest-gpm-1.20.1-r6 b/sys-libs/gpm/files/digest-gpm-1.20.1-r6
new file mode 100644
index 000000000000..0083e96a72bb
--- /dev/null
+++ b/sys-libs/gpm/files/digest-gpm-1.20.1-r6
@@ -0,0 +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 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-daemon.patch b/sys-libs/gpm/files/gpm-daemon.patch
new file mode 100644
index 000000000000..75bbb9945c49
--- /dev/null
+++ b/sys-libs/gpm/files/gpm-daemon.patch
@@ -0,0 +1,48 @@
+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
new file mode 100644
index 000000000000..db71761253d7
--- /dev/null
+++ b/sys-libs/gpm/gpm-1.20.1-r6.ebuild
@@ -0,0 +1,75 @@
+# 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.1 2007/07/07 19:48:14 uberlord Exp $
+
+# emacs support disabled due to Bug 99533
+
+inherit eutils toolchain-funcs
+#elisp-common
+
+PATCH_VER="1.4"
+DESCRIPTION="Console-based mouse driver"
+HOMEPAGE="http://linux.schottelius.org/gpm/"
+SRC_URI="ftp://arcana.linux.it/pub/gpm/${P}.tar.bz2
+ ftp://ftp.schottelius.org/pub/linux/gpm/${P}.tar.bz2
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="selinux" # emacs"
+
+DEPEND="sys-libs/ncurses"
+# emacs? ( virtual/emacs )"
+RDEPEND="selinux? ( sec-policy/selinux-gpm )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ epatch "${FILESDIR}"/gpm-configure-LANG.patch
+ epatch "${FILESDIR}"/gpm-daemon.patch
+}
+
+src_compile() {
+ econf \
+ --libdir=/$(get_libdir) \
+ --sysconfdir=/etc/gpm \
+ || die "econf failed"
+ emake \
+ CC=$(tc-getCC) \
+ AR=$(tc-getAR) \
+ RANLIB=$(tc-getRANLIB) \
+ EMACS=: \
+ || die "emake failed"
+
+# local lisp="emacs/t-mouse.el emacs/t-mouse.elc"
+# if use emacs ; then
+# cd "${S}"/contrib ; make clean
+# make EMACS=emacs ELISP="${lisp}" || die
+# fi
+}
+
+src_install() {
+ make install DESTDIR="${D}" EMACS=: ELISP="" || die "make install failed"
+ # fix lib symlinks since the default is missing/bogus
+ dosym libgpm.so.1.19.0 /$(get_libdir)/libgpm.so.1
+ dosym libgpm.so.1 /$(get_libdir)/libgpm.so
+ dodir /usr/$(get_libdir)
+ mv "${D}"/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/
+ gen_usr_ldscript libgpm.so
+
+# if use emacs ; then
+# cd "${S}"/contrib/emacs
+# elisp-install . t-mouse*
+# fi
+
+ insinto /etc/gpm
+ doins conf/gpm-*.conf
+
+ dodoc BUGS Changes README TODO
+ dodoc doc/Announce doc/FAQ doc/README*
+
+ newinitd "${FILESDIR}"/gpm.rc6 gpm
+ newconfd "${FILESDIR}"/gpm.conf.d gpm
+}