summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Pawlik <nelchael@gentoo.org>2008-04-30 07:02:27 +0000
committerKrzysztof Pawlik <nelchael@gentoo.org>2008-04-30 07:02:27 +0000
commit2ccdccce487d25c3ef85c1ae559c02fcdd7a573f (patch)
tree46c6fc70620550623cee424e1a94f00c84f21609 /x11-terms/mrxvt
parentremove old (diff)
downloadgentoo-2-2ccdccce487d25c3ef85c1ae559c02fcdd7a573f.tar.gz
gentoo-2-2ccdccce487d25c3ef85c1ae559c02fcdd7a573f.tar.bz2
gentoo-2-2ccdccce487d25c3ef85c1ae559c02fcdd7a573f.zip
Added patch to fix unsecure default DISPLAY, patch created by Gautam Iyer. See bug #219750. Dropped stable mips keyword.
(Portage version: 2.1.5_rc6)
Diffstat (limited to 'x11-terms/mrxvt')
-rw-r--r--x11-terms/mrxvt/ChangeLog12
-rw-r--r--x11-terms/mrxvt/files/mrxvt-0.5.3-display-security.patch64
-rw-r--r--x11-terms/mrxvt/mrxvt-0.5.1.ebuild6
-rw-r--r--x11-terms/mrxvt/mrxvt-0.5.3-r1.ebuild6
-rw-r--r--x11-terms/mrxvt/mrxvt-0.5.3-r2.ebuild122
5 files changed, 202 insertions, 8 deletions
diff --git a/x11-terms/mrxvt/ChangeLog b/x11-terms/mrxvt/ChangeLog
index 96eae5a71917..e562209fc473 100644
--- a/x11-terms/mrxvt/ChangeLog
+++ b/x11-terms/mrxvt/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for x11-terms/mrxvt
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-terms/mrxvt/ChangeLog,v 1.60 2007/12/25 17:16:14 phreak Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-terms/mrxvt/ChangeLog,v 1.61 2008/04/30 07:02:27 nelchael Exp $
+
+*mrxvt-0.5.3-r2 (30 Apr 2008)
+
+ 30 Apr 2008; Krzysiek Pawlik <nelchael@gentoo.org>
+ +files/mrxvt-0.5.3-display-security.patch, mrxvt-0.5.1.ebuild,
+ mrxvt-0.5.3-r1.ebuild, +mrxvt-0.5.3-r2.ebuild:
+ Added patch to fix unsecure default DISPLAY, patch created by Gautam Iyer.
+ See bug #219750. Dropped stable mips keyword.
25 Dec 2007; Christian Heim <phreak@gentoo.org> metadata.xml:
Removing usata from metadata.xml as per #22931.
diff --git a/x11-terms/mrxvt/files/mrxvt-0.5.3-display-security.patch b/x11-terms/mrxvt/files/mrxvt-0.5.3-display-security.patch
new file mode 100644
index 000000000000..69f24d88eda4
--- /dev/null
+++ b/x11-terms/mrxvt/files/mrxvt-0.5.3-display-security.patch
@@ -0,0 +1,64 @@
+Index: src/init.c
+===================================================================
+--- src/init.c (revision 265)
++++ src/init.c (working copy)
+@@ -1030,38 +1030,38 @@
+ /*
+ * Open display, get options/resources and create the window
+ */
+- if (IS_NULL(rs[Rs_display_name] = getenv("DISPLAY")))
+- rs[Rs_display_name] = ":0";
+-
+ rxvt_get_options( r, r_argc, r_argv );
+ rxvt_free( r_argv ); /* XXX memory leak? */
+
+ #ifdef LOCAL_X_IS_UNIX
+- if( rs[Rs_display_name][0] == ':' )
++ /*
++ * 2008-04-29 gi1242: Force UNIX sockets for security (Gentoo Bug #219750)
++ */
++ if( IS_NULL( rs[Rs_display_name] ) )
++ rs[Rs_display_name] = getenv( "DISPLAY" );
++
++ if( rs[Rs_display_name] && rs[Rs_display_name][0] == ':' )
+ {
+- int l = 5 + STRLEN(rs[Rs_display_name]);
++ char *val;
++ int l = 5 + STRLEN(rs[Rs_display_name]);
+ if (l <= 0 || l > 1024) /* possible integer overflow */
+ l = 1024;
++
+ val = rxvt_malloc(l);
+- STRCPY(val, "unix");
+- STRNCAT(val, rs[Rs_display_name], l-5);
+- val[l-1] = (char) 0;
+- rxvt_msg (DBG_INFO, DBG_INIT, "Open X display %s\n", val);
+- r->Xdisplay = XOpenDisplay(val);
+- rxvt_free(val);
++ STRCPY( val, "unix");
++ STRNCAT( val, rs[Rs_display_name], l-5);
++
++ rs[Rs_display_name] = val;
+ }
+-#endif
++#endif /* LOCAL_X_IS_UNIX */
+
+- if (IS_NULL(r->Xdisplay))
++ rxvt_msg( DBG_INFO, DBG_INIT, "Open X display %s\n", rs[Rs_display_name] );
++ r->Xdisplay = XOpenDisplay( rs[Rs_display_name] );
++ if( IS_NULL(r->Xdisplay) )
+ {
+- rxvt_msg (DBG_INFO, DBG_INIT, "Open X display %s\n",
+- rs[Rs_display_name] ? rs[Rs_display_name] : "nil");
+- r->Xdisplay = XOpenDisplay( rs[Rs_display_name] );
+- if (IS_NULL(r->Xdisplay))
+- {
+- rxvt_msg (DBG_ERROR, DBG_INIT, "can't open display %s", rs[Rs_display_name] );
+- exit( EXIT_FAILURE );
+- }
++ rxvt_msg( DBG_ERROR, DBG_INIT, "Error opening display %s\n",
++ rs[Rs_display_name] );
++ exit( EXIT_FAILURE );
+ }
+
+
diff --git a/x11-terms/mrxvt/mrxvt-0.5.1.ebuild b/x11-terms/mrxvt/mrxvt-0.5.1.ebuild
index 7a90ec3609cd..b84266c8f14d 100644
--- a/x11-terms/mrxvt/mrxvt-0.5.1.ebuild
+++ b/x11-terms/mrxvt/mrxvt-0.5.1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-terms/mrxvt/mrxvt-0.5.1.ebuild,v 1.8 2007/11/11 11:01:06 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-terms/mrxvt/mrxvt-0.5.1.ebuild,v 1.9 2008/04/30 07:02:27 nelchael Exp $
inherit eutils
@@ -12,7 +12,7 @@ SRC_URI="mirror://sourceforge/materm/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="alpha amd64 mips ppc x86"
+KEYWORDS="alpha amd64 ~mips ppc x86"
RDEPEND="png? ( media-libs/libpng )
jpeg? ( media-libs/jpeg )
diff --git a/x11-terms/mrxvt/mrxvt-0.5.3-r1.ebuild b/x11-terms/mrxvt/mrxvt-0.5.3-r1.ebuild
index 168526316e2e..d921863ff064 100644
--- a/x11-terms/mrxvt/mrxvt-0.5.3-r1.ebuild
+++ b/x11-terms/mrxvt/mrxvt-0.5.3-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-terms/mrxvt/mrxvt-0.5.3-r1.ebuild,v 1.8 2007/11/20 05:30:18 kumba Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-terms/mrxvt/mrxvt-0.5.3-r1.ebuild,v 1.9 2008/04/30 07:02:27 nelchael Exp $
inherit eutils
@@ -10,7 +10,7 @@ SRC_URI="mirror://sourceforge/materm/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="alpha amd64 mips ppc x86"
+KEYWORDS="alpha amd64 ~mips ppc x86"
LINGUAS_IUSE="linguas_el linguas_ja linguas_ko linguas_th linguas_zh_CN linguas_zh_TW"
IUSE="debug png jpeg session truetype menubar utempter xpm ${LINGUAS_IUSE}"
diff --git a/x11-terms/mrxvt/mrxvt-0.5.3-r2.ebuild b/x11-terms/mrxvt/mrxvt-0.5.3-r2.ebuild
new file mode 100644
index 000000000000..345df6a4bb5d
--- /dev/null
+++ b/x11-terms/mrxvt/mrxvt-0.5.3-r2.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-terms/mrxvt/mrxvt-0.5.3-r2.ebuild,v 1.1 2008/04/30 07:02:27 nelchael Exp $
+
+inherit eutils
+
+DESCRIPTION="Multi-tabbed rxvt clone with XFT, transparent background and CJK support"
+HOMEPAGE="http://materm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/materm/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~mips ~ppc ~x86"
+
+LINGUAS_IUSE="linguas_el linguas_ja linguas_ko linguas_th linguas_zh_CN linguas_zh_TW"
+IUSE="debug png jpeg session truetype menubar utempter xpm ${LINGUAS_IUSE}"
+
+RDEPEND="png? ( media-libs/libpng )
+ utempter? ( sys-libs/libutempter )
+ jpeg? ( media-libs/jpeg )
+ truetype? ( virtual/xft
+ media-libs/fontconfig
+ media-libs/freetype )
+ x11-libs/libX11
+ x11-libs/libXt
+ xpm? ( x11-libs/libXpm )
+ x11-libs/libXrender"
+
+DEPEND="${RDEPEND}
+ x11-proto/xproto"
+
+src_unpack() {
+
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-no-scroll-with-buffer.patch"
+ epatch "${FILESDIR}/${P}-display-security.patch"
+
+}
+
+src_compile() {
+
+ local myconf
+
+ # if you want to pass any other flags, use EXTRA_ECONF.
+ if use linguas_el ; then
+ myconf="${myconf} --enable-greek"
+ fi
+ if use linguas_ja ; then
+ # --with-encoding=sjis
+ myconf="${myconf} --enable-kanji --with-encoding=eucj"
+ fi
+ if use linguas_ko ; then
+ myconf="${myconf} --enable-kr --with-encoding=kr"
+ fi
+ if use linguas_th ; then
+ myconf="${myconf} --enable-thai"
+ fi
+ if use linguas_zh_CN ; then
+ # --with-encoding=gbk
+ myconf="${myconf} --enable-gb --with-encoding=gb"
+ fi
+ if use linguas_zh_TW ; then
+ myconf="${myconf} --enable-big5 --with-encoding=big5"
+ fi
+
+ # 2006-03-13 gi1242: mrxvt works best with TERM=rxvt AND correctly set
+ # termcap / terminfo entries. If the rxvt termcap / terminfo entries are
+ # messed up then then it's better to set TERM=xterm.
+ #
+ # Provide support for this by setting the or RXVT_TERM environment variables
+ # before emerging, as done in the rxvt ebuild.
+
+ if [[ -n ${RXVT_TERM} ]]; then
+ myconf="${myconf} --with-term=${RXVT_TERM}"
+ fi
+
+ econf \
+ --enable-everything \
+ --with-atab-extra=25 \
+ $(use_enable debug) \
+ $(use_enable jpeg) \
+ $(use_enable png) \
+ $(use_enable xpm) \
+ $(use_enable session sessionmgr) \
+ $(use_enable truetype xft) \
+ $(use_enable utempter) \
+ $(use_enable menubar) \
+ ${myconf} || die
+
+ emake || die
+
+}
+
+src_install() {
+
+ make DESTDIR="${D}" docdir=/usr/share/doc/${PF} install || die
+ # Give mrxvt perms to update utmp
+ fowners root:utmp /usr/bin/mrxvt
+ fperms g+s /usr/bin/mrxvt
+ dodoc AUTHORS CREDITS ChangeLog FAQ NEWS README* TODO
+
+}
+
+pkg_postinst() {
+
+ if [[ -z $RXVT_TERM ]]; then
+ einfo
+ einfo "If you experience problems with curses programs, then this is"
+ einfo "most likely because of incorrectly set termcap / terminfo"
+ einfo "entries. To fix this you can dry and run (as user)"
+ einfo " tic /usr/share/doc/${P}/etc/mrxvt.terminfo"
+ einfo "Alternately, run the offending programs with TERM=xterm."
+ einfo
+ einfo "To emerge mrxvt with TERM=xterm by default, set the RXVT_TERM"
+ einfo "environment variable to 'xterm', or your desired default"
+ einfo "terminal name. Alternately you can put 'Mrxvt.termName: xterm'"
+ einfo "in your ~/.mrxvtrc, or /etc/mrxvt/mrxvtrc."
+ einfo
+ fi
+
+}