diff options
author | Julian Ospald <hasufell@gentoo.org> | 2013-10-26 22:18:52 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2013-10-26 22:18:52 +0000 |
commit | 38364b78009fafba95894573054851761c1ebc56 (patch) | |
tree | 5069704bdc41b29726eb1d473fa55d16aa0827e0 /net-irc | |
parent | Use readme.gentoo.eclass to not show elog messages every time (#488138) (diff) | |
download | gentoo-2-38364b78009fafba95894573054851761c1ebc56.tar.gz gentoo-2-38364b78009fafba95894573054851761c1ebc56.tar.bz2 gentoo-2-38364b78009fafba95894573054851761c1ebc56.zip |
revbump backport sasl fix for inspircd
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'net-irc')
-rw-r--r-- | net-irc/hexchat/ChangeLog | 8 | ||||
-rw-r--r-- | net-irc/hexchat/files/hexchat-2.9.6.1-sasl.patch | 76 | ||||
-rw-r--r-- | net-irc/hexchat/hexchat-2.9.6.1-r1.ebuild | 170 |
3 files changed, 253 insertions, 1 deletions
diff --git a/net-irc/hexchat/ChangeLog b/net-irc/hexchat/ChangeLog index 5476946497ba..0e0894e7dfc8 100644 --- a/net-irc/hexchat/ChangeLog +++ b/net-irc/hexchat/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-irc/hexchat # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/hexchat/ChangeLog,v 1.82 2013/10/05 02:22:40 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/hexchat/ChangeLog,v 1.83 2013/10/26 22:18:52 hasufell Exp $ + +*hexchat-2.9.6.1-r1 (26 Oct 2013) + + 26 Oct 2013; Julian Ospald <hasufell@gentoo.org> +hexchat-2.9.6.1-r1.ebuild, + +files/hexchat-2.9.6.1-sasl.patch: + revbump backport sasl fix for inspircd 05 Oct 2013; Julian Ospald <hasufell@gentoo.org> hexchat-9999.ebuild: update live ebuild diff --git a/net-irc/hexchat/files/hexchat-2.9.6.1-sasl.patch b/net-irc/hexchat/files/hexchat-2.9.6.1-sasl.patch new file mode 100644 index 000000000000..bfa0a8903654 --- /dev/null +++ b/net-irc/hexchat/files/hexchat-2.9.6.1-sasl.patch @@ -0,0 +1,76 @@ +From 19e3fce2eb74beb6ba0ae4b315fe0284784087ac Mon Sep 17 00:00:00 2001 +From: TingPing <tingping@tingping.se> +Date: Sun, 20 Oct 2013 22:29:16 -0400 +Subject: [PATCH] Fix SASL on some networks + +--- + src/common/hexchat.h | 1 + + src/common/inbound.c | 27 +++++++++++++++++++++++++++ + 2 files changed, 28 insertions(+) + +diff --git a/src/common/hexchat.h b/src/common/hexchat.h +index e5d8a65..063a55b 100644 +--- a/src/common/hexchat.h ++++ b/src/common/hexchat.h +@@ -586,6 +586,7 @@ struct msproxy_state_t + unsigned int skip_next_whois:1; /* hide whois output */ + unsigned int inside_whois:1; + unsigned int doing_dns:1; /* /dns has been done */ ++ unsigned int retry_sasl:1; /* retrying another sasl mech */ + unsigned int end_of_motd:1; /* end of motd reached (logged in) */ + unsigned int sent_quit:1; /* sent a QUIT already? */ + unsigned int use_listargs:1; /* undernet and dalnet need /list >0,<10000 */ +diff --git a/src/common/inbound.c b/src/common/inbound.c +index 912fbbd..4e93b3c 100644 +--- a/src/common/inbound.c ++++ b/src/common/inbound.c +@@ -1771,6 +1771,29 @@ + ircnet *net = (ircnet*)serv->network; + char *user, *pass = NULL; + const char *mech = sasl_mechanisms[serv->sasl_mech]; ++ int i; ++ ++ /* Got a list of supported mechanisms */ ++ if (strchr (data, ',') != NULL) ++ { ++ if (serv->sasl_mech == MECH_EXTERNAL) ++ goto sasl_abort; ++ ++ /* Use most secure one supported */ ++ for (i = MECH_AES; i >= MECH_PLAIN; i--) ++ { ++ if (strstr (data, sasl_mechanisms[i]) != NULL) ++ { ++ serv->sasl_mech = i; ++ serv->retry_sasl = TRUE; ++ tcp_sendf (serv, "AUTHENTICATE %s\r\n", sasl_mechanisms[i]); ++ return; ++ } ++ } ++ ++ /* Nothing we support */ ++ goto sasl_abort; ++ } + + if (net->user && !(net->flags & FLAG_USE_GLOBAL)) + user = net->user; +@@ -1795,6 +1818,7 @@ + #endif + } + ++sasl_abort: + if (pass == NULL) + { + /* something went wrong abort */ +@@ -1815,6 +1839,9 @@ + int + inbound_sasl_error (server *serv) + { ++ if (serv->retry_sasl && !serv->sent_saslauth) ++ return 1; ++ + /* If server sent 904 before we sent password, + * mech not support so fallback to next mech */ + if (!serv->sent_saslauth && serv->sasl_mech != MECH_EXTERNAL && serv->sasl_mech != MECH_PLAIN) +-- +1.8.4 diff --git a/net-irc/hexchat/hexchat-2.9.6.1-r1.ebuild b/net-irc/hexchat/hexchat-2.9.6.1-r1.ebuild new file mode 100644 index 000000000000..71bf36101647 --- /dev/null +++ b/net-irc/hexchat/hexchat-2.9.6.1-r1.ebuild @@ -0,0 +1,170 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-irc/hexchat/hexchat-2.9.6.1-r1.ebuild,v 1.1 2013/10/26 22:18:52 hasufell Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_3 ) +inherit eutils fdo-mime gnome2-utils mono-env multilib python-single-r1 + +DESCRIPTION="Graphical IRC client based on XChat" +HOMEPAGE="http://hexchat.github.io/" +SRC_URI="http://dl.hexchat.org/hexchat/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux" +IUSE="dbus fastscroll +gtk gtkspell ipv6 libcanberra libnotify libproxy nls ntlm perl +plugins plugin-checksum plugin-doat plugin-fishlim plugin-sysinfo python sexy spell ssl theme-manager" +REQUIRED_USE="gtkspell? ( spell ) + plugin-checksum? ( plugins ) + plugin-doat? ( plugins ) + plugin-fishlim? ( plugins ) + plugin-sysinfo? ( plugins ) + python? ( ${PYTHON_REQUIRED_USE} ) + sexy? ( spell ) + ?? ( gtkspell sexy )" + +RDEPEND="dev-libs/glib:2 + dbus? ( >=dev-libs/dbus-glib-0.98 ) + fastscroll? ( x11-libs/libXft ) + gtk? ( x11-libs/gtk+:2 ) + libcanberra? ( media-libs/libcanberra ) + libproxy? ( net-libs/libproxy ) + libnotify? ( x11-libs/libnotify ) + nls? ( virtual/libintl ) + ntlm? ( net-libs/libntlm ) + perl? ( >=dev-lang/perl-5.8.0 ) + plugin-sysinfo? ( sys-apps/pciutils ) + python? ( ${PYTHON_DEPS} ) + spell? ( + app-text/enchant + gtkspell? ( app-text/gtkspell:2 ) + sexy? ( x11-libs/libsexy ) + !gtkspell? ( !sexy? ( dev-libs/libxml2 ) ) + ) + ssl? ( dev-libs/openssl:0 ) + theme-manager? ( dev-lang/mono )" +DEPEND="${RDEPEND} + app-arch/xz-utils + virtual/pkgconfig + nls? ( sys-devel/gettext ) + theme-manager? ( dev-util/monodevelop )" + +pkg_setup() { + use python && python-single-r1_pkg_setup + if use theme-manager ; then + mono-env_pkg_setup + export XDG_CACHE_HOME="${T}/.cache" + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-sasl.patch + epatch_user +} + +src_configure() { + local myspellconf + if use spell ; then + if use gtkspell ; then + myspellconf="--enable-spell=gtkspell" + elif use sexy ; then + myspellconf="--enable-spell=libsexy" + else + myspellconf="--enable-spell=static" + fi + else + myspellconf="--disable-spell" + fi + + econf \ + $(use_enable nls) \ + $(use_enable libproxy socks) \ + $(use_enable ipv6) \ + $(use_enable fastscroll xft) \ + $(use_enable ssl openssl) \ + $(use_enable gtk gtkfe) \ + $(use_enable !gtk textfe) \ + $(usex python "--enable-python=${EPYTHON}" "--disable-python") \ + $(use_enable perl) \ + $(use_enable plugins plugin) \ + $(use_enable plugin-checksum checksum) \ + $(use_enable plugin-doat doat) \ + $(use_enable plugin-fishlim fishlim) \ + $(use_enable plugin-sysinfo sysinfo) \ + $(use_enable dbus) \ + $(use_enable libnotify) \ + $(use_enable libcanberra) \ + --enable-shm \ + ${myspellconf} \ + $(use_enable ntlm) \ + $(use_enable libproxy) \ + --enable-minimal-flags \ + $(use_with theme-manager) +} + +src_install() { + emake DESTDIR="${D}" \ + UPDATE_ICON_CACHE=true \ + UPDATE_MIME_DATABASE=true \ + UPDATE_DESKTOP_DATABASE=true \ + install + dodoc share/doc/{readme,hacking}.md + use plugin-fishlim && dodoc share/doc/fishlim.md + prune_libtool_files --all +} + +pkg_preinst() { + if use gtk ; then + gnome2_icon_savelist + fi +} + +pkg_postinst() { + if use gtk ; then + gnome2_icon_cache_update + einfo + else + einfo + elog "You have disabled the gtk USE flag. This means you don't have" + elog "the GTK-GUI for HexChat but only a text interface called \"hexchat-text\"." + elog + fi + + if use theme-manager ; then + fdo-mime_desktop_database_update + fdo-mime_mime_database_update + elog "Themes are available at:" + elog " http://hexchat.org/themes.html" + elog + fi + + elog "If you're upgrading from hexchat <=2.9.3 remember to rename" + elog "the xchat.conf file found in ~/.config/hexchat/ to hexchat.conf" + elog + elog "If you're upgrading from hexchat <=2.9.5 you will have to fix" + elog "your auto-join channel settings, see:" + elog " https://bugs.gentoo.org/show_bug.cgi?id=473514#c1" + elog "Also, some internal hotkeys such as \"Ctrl+l\" (clear screen)" + elog "have been removed, but you can add them yourself via:" + elog " Settings -> Keyboard Shortcuts" + einfo + elog "optional dependencies:" + elog " media-sound/sox (sound playback if you don't have libcanberra" + elog " enabled)" + elog " x11-plugins/hexchat-javascript (javascript support)" + elog " x11-themes/sound-theme-freedesktop (default BEEP sound," + elog " needs libcanberra enabled)" + einfo +} + +pkg_postrm() { + if use gtk ; then + gnome2_icon_cache_update + fi + + if use theme-manager ; then + fdo-mime_desktop_database_update + fdo-mime_mime_database_update + fi +} |