summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWulf Krueger <philantrop@gentoo.org>2007-08-18 22:49:33 +0000
committerWulf Krueger <philantrop@gentoo.org>2007-08-18 22:49:33 +0000
commit944600ea4f429a1182d70ff438171fb9a8b64739 (patch)
tree24cab35b4e4aa0d8372bbd2e342c7e5ab6da868f /net-nntp
parentVersion bump (bug #171089), fixes bugs #132752, #180286. Dropped old version. (diff)
downloadgentoo-2-944600ea4f429a1182d70ff438171fb9a8b64739.tar.gz
gentoo-2-944600ea4f429a1182d70ff438171fb9a8b64739.tar.bz2
gentoo-2-944600ea4f429a1182d70ff438171fb9a8b64739.zip
Added a patch to fix some problems with unexpected server replies, cf. bug 185468.
(Portage version: 2.1.3.5)
Diffstat (limited to 'net-nntp')
-rw-r--r--net-nntp/newspost/files/digest-newspost-2.1.1-r23
-rw-r--r--net-nntp/newspost/files/newspost-2.1.1-nntp.patch69
-rw-r--r--net-nntp/newspost/newspost-2.1.1-r2.ebuild40
3 files changed, 112 insertions, 0 deletions
diff --git a/net-nntp/newspost/files/digest-newspost-2.1.1-r2 b/net-nntp/newspost/files/digest-newspost-2.1.1-r2
new file mode 100644
index 000000000000..b924b933f069
--- /dev/null
+++ b/net-nntp/newspost/files/digest-newspost-2.1.1-r2
@@ -0,0 +1,3 @@
+MD5 099a69ce511f746aec88a57d03575d5f newspost-2.1.1.tar.gz 61412
+RMD160 a954f727e3ba5b3dcf845b8158b2752d76dbac2a newspost-2.1.1.tar.gz 61412
+SHA256 bdd1ae83d7459d2cdd726115c028405fce33f9b60e71b88969f82fbc02672be7 newspost-2.1.1.tar.gz 61412
diff --git a/net-nntp/newspost/files/newspost-2.1.1-nntp.patch b/net-nntp/newspost/files/newspost-2.1.1-nntp.patch
new file mode 100644
index 000000000000..8779e8f36b47
--- /dev/null
+++ b/net-nntp/newspost/files/newspost-2.1.1-nntp.patch
@@ -0,0 +1,69 @@
+--- newspost-2.1.1.orig/base/nntp.c
++++ newspost-2.1.1/base/nntp.c
+@@ -26,6 +26,10 @@
+ *** Public Routines
+ **/
+
++int _nntp_post(const char *subject, newspost_data *data,
++ const char *buffer, long length,
++ boolean no_ui_updates);
++
+ boolean nntp_logon(newspost_data *data) {
+ char buffer[STRING_BUFSIZE];
+
+@@ -78,6 +82,35 @@
+ int nntp_post(const char *subject, newspost_data *data,
+ const char *buffer, long length,
+ boolean no_ui_updates) {
++ int retval = _nntp_post(subject, data, buffer, length, no_ui_updates);
++
++ if (retval == POSTING_FAILED-64) {
++ /* try log out then back in */
++ ui_nntp_posting_retry();
++ nntp_logoff();
++ socket_close();
++ sleep(5);
++
++ /* create the socket */
++ ui_socket_connect_start(data->address->data);
++ retval = socket_create(data->address->data, data->port);
++ if (retval < 0)
++ return retval;
++ ui_socket_connect_done();
++
++ ui_nntp_logon_start(data->address->data);
++ if (nntp_logon(data) == FALSE)
++ return POSTING_FAILED;
++ ui_nntp_logon_done();
++
++ retval = _nntp_post(subject, data, buffer, length, no_ui_updates);
++ }
++ return retval;
++}
++
++int _nntp_post(const char *subject, newspost_data *data,
++ const char *buffer, long length,
++ boolean no_ui_updates) {
+ char response[STRING_BUFSIZE];
+ const char *pi;
+ long i, chunksize;
+@@ -95,7 +128,7 @@
+ if (strncmp(response, NNTP_PROCEED_WITH_POST, 3) != 0) {
+ /* this shouldn't really happen */
+ ui_nntp_unknown_response(response);
+- return POSTING_FAILED;
++ return POSTING_FAILED-64;
+ }
+
+ buff = buff_add(buff, "From: %s\r\n", data->from->data);
+--- newspost-2.1.1.orig/base/utils.c
++++ newspost-2.1.1/base/utils.c
+@@ -44,7 +44,7 @@
+ }
+
+ Buff * getline(Buff *buff, FILE *file){
+- char c = fgetc(file);
++ int c = fgetc(file);
+ buff = buff_free(buff);
+ while(TRUE){
+ if((c == '\n')
diff --git a/net-nntp/newspost/newspost-2.1.1-r2.ebuild b/net-nntp/newspost/newspost-2.1.1-r2.ebuild
new file mode 100644
index 000000000000..54e5d53c589c
--- /dev/null
+++ b/net-nntp/newspost/newspost-2.1.1-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-nntp/newspost/newspost-2.1.1-r2.ebuild,v 1.1 2007/08/18 22:49:32 philantrop Exp $
+
+inherit eutils
+
+DESCRIPTION="a usenet binary autoposter for unix"
+HOMEPAGE="http://newspost.unixcab.org/"
+SRC_URI="http://newspost.unixcab.org/download/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND=">=sys-apps/sed-4"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/CAN-2005-0101.patch"
+
+ # Should fix some problems with unexpected server replies, cf. bug 185468
+ epatch "${FILESDIR}/${P}-nntp.patch"
+
+ sed -i \
+ -e "s:OPT_FLAGS = :OPT_FLAGS = ${CFLAGS}#:" Makefile \
+ || die "sed Makefile failed"
+
+ # We don't want pre-stripped binaries
+ sed -i -e "s:-strip newspost::" Makefile || die "pre-stripping sed failed"
+}
+
+src_install () {
+ dobin newspost || die "dobin failed"
+ doman man/man1/newspost.1 || die "doman failed"
+ dodoc README CHANGES || die "dodoc failed"
+}