summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2013-12-04 08:07:18 +0000
committerHans de Graaff <graaff@gentoo.org>2013-12-04 08:07:18 +0000
commit4cb615209c04e2d0c1ee1414a712e6f9c8de4183 (patch)
tree7266352cad694cf89311f8792ff6851424818507 /net-p2p
parentVersion bump for security bug 493284. (diff)
downloadgentoo-2-4cb615209c04e2d0c1ee1414a712e6f9c8de4183.tar.gz
gentoo-2-4cb615209c04e2d0c1ee1414a712e6f9c8de4183.tar.bz2
gentoo-2-4cb615209c04e2d0c1ee1414a712e6f9c8de4183.zip
Fix bug causing all other gtk-gnutella instances to be reported as hostile.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/gtk-gnutella/ChangeLog8
-rw-r--r--net-p2p/gtk-gnutella/files/gtk-gnutella-1.0.0-gtkg-hostile.patch20
-rw-r--r--net-p2p/gtk-gnutella/gtk-gnutella-1.0.0-r1.ebuild86
3 files changed, 113 insertions, 1 deletions
diff --git a/net-p2p/gtk-gnutella/ChangeLog b/net-p2p/gtk-gnutella/ChangeLog
index 18102d5abe0d..65f6183dc407 100644
--- a/net-p2p/gtk-gnutella/ChangeLog
+++ b/net-p2p/gtk-gnutella/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-p2p/gtk-gnutella
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/gtk-gnutella/ChangeLog,v 1.149 2013/10/29 22:22:38 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/gtk-gnutella/ChangeLog,v 1.150 2013/12/04 08:07:18 graaff Exp $
+
+*gtk-gnutella-1.0.0-r1 (04 Dec 2013)
+
+ 04 Dec 2013; Hans de Graaff <graaff@gentoo.org>
+ +gtk-gnutella-1.0.0-r1.ebuild, +files/gtk-gnutella-1.0.0-gtkg-hostile.patch:
+ Fix bug causing all other gtk-gnutella instances to be reported as hostile.
29 Oct 2013; Tony Vroon <chainsaw@gentoo.org> gtk-gnutella-1.0.0.ebuild:
Marked stable on AMD64 based on arch testing by Elijah "Armageddon" El
diff --git a/net-p2p/gtk-gnutella/files/gtk-gnutella-1.0.0-gtkg-hostile.patch b/net-p2p/gtk-gnutella/files/gtk-gnutella-1.0.0-gtkg-hostile.patch
new file mode 100644
index 000000000000..b5ed4bee412b
--- /dev/null
+++ b/net-p2p/gtk-gnutella/files/gtk-gnutella-1.0.0-gtkg-hostile.patch
@@ -0,0 +1,20 @@
+commit e4dc3902f6c451448bbeb5c1908df617bd44e244
+Author: Raphael Manfredi <Raphael.Manfredi@pobox.com>
+Date: Tue Dec 3 23:41:31 2013 +0100
+
+ guid_extract_gtkg_info(): fixed grave bug, making all GTKGs appear hostile.
+
+diff --git a/src/core/guid.c b/src/core/guid.c
+index c6f1651..fb4c838 100644
+--- a/src/core/guid.c
++++ b/src/core/guid.c
+@@ -345,7 +345,8 @@ guid_extract_gtkg_info(const struct guid *guid, size_t start,
+ product_major = product_get_major();
+
+ if (major != product_major) {
+- if (major + 1 != product_major || major - 1 != product_major)
++ int8 delta = product_major - major;
++ if (delta < -1 || delta > 1)
+ return FALSE;
+ }
+
diff --git a/net-p2p/gtk-gnutella/gtk-gnutella-1.0.0-r1.ebuild b/net-p2p/gtk-gnutella/gtk-gnutella-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..d9f7111ac394
--- /dev/null
+++ b/net-p2p/gtk-gnutella/gtk-gnutella-1.0.0-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/gtk-gnutella/gtk-gnutella-1.0.0-r1.ebuild,v 1.1 2013/12/04 08:07:18 graaff Exp $
+
+EAPI=5
+
+inherit eutils
+
+IUSE="nls dbus ssl +gtk"
+
+DESCRIPTION="A GTK+ Gnutella client"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+HOMEPAGE="http://gtk-gnutella.sourceforge.net/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
+
+RDEPEND="
+ dev-libs/glib:2
+ sys-libs/zlib
+ gtk? ( >=x11-libs/gtk+-2.2.1:2 )
+ dbus? ( >=sys-apps/dbus-0.35.2 )
+ ssl? ( >=net-libs/gnutls-2.2.5 )
+ nls? ( >=sys-devel/gettext-0.11.5 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ strip-linguas -i po
+
+ echo "# Gentoo-selected LINGUAS" > po/LINGUAS
+ for ling in ${LINGUAS}; do
+ echo $ling >> po/LINGUAS
+ done
+
+ # Already fixed upstream but not released yet. Included as requested
+ # by upstream.
+ epatch "${FILESDIR}/${P}-bdf.patch"
+ epatch "${FILESDIR}/${P}-gtkg-hostile.patch"
+}
+
+src_configure() {
+ # There is no option to turn off optimization through the build.sh
+ # script.
+ sed -i -e "s/Configure -Oder/Configure -Oder -Doptimize=none/" build.sh || die
+
+ # The build script does not support the equivalent --enable
+ # options so we must construct the configuration by hand.
+
+ local myconf
+
+ if ! use nls; then
+ myconf="${myconf} --disable-nls"
+ fi
+
+ if ! use dbus; then
+ myconf="${myconf} --disable-dbus"
+ fi
+
+ if ! use ssl; then
+ myconf="${myconf} --disable-gnutls"
+ fi
+
+ if use gtk; then
+ myconf="${myconf} --gtk2"
+ else
+ myconf="${myconf} --topless"
+ fi
+
+ ./build.sh \
+ --configure-only \
+ --prefix="/usr" \
+ --cc=$(tc-getCC) \
+ ${myconf}
+}
+
+src_install() {
+ dodir /usr/bin
+ emake INSTALL_PREFIX="${D}" install || die "Install failed"
+ dodoc AUTHORS ChangeLog README TODO
+
+ # Touch the symbols file into the future to avoid warnings from
+ # gtk-gnutella later on, since we will most likely strip the binary.
+ touch --date="next minute" "${D}/usr/lib/gtk-gnutella/gtk-gnutella.nm" || die
+}