summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2007-07-19 13:27:18 +0000
committerPeter Volkov <pva@gentoo.org>2007-07-19 13:27:18 +0000
commit38437cb644321224c45ca871420cea6773bee2ac (patch)
treeae78d4047d447e7a4a701ef401d45fa1350dbfaf /net-ftp
parentStable on amd64 wrt bug #172378 (diff)
downloadgentoo-2-38437cb644321224c45ca871420cea6773bee2ac.tar.gz
gentoo-2-38437cb644321224c45ca871420cea6773bee2ac.tar.bz2
gentoo-2-38437cb644321224c45ca871420cea6773bee2ac.zip
Bunch of fixes reported and some fixed in debian: segfault during tftp connect (see debian bug #375365), manpage typo (debian #310347), and put command in tftp now works (debian #88286). Added example files for xinetd, and dodoc now installs README, ChangeLog and BUGS. Took maintenance.
(Portage version: 2.1.3_rc8)
Diffstat (limited to 'net-ftp')
-rw-r--r--net-ftp/netkit-tftp/ChangeLog14
-rw-r--r--net-ftp/netkit-tftp/files/digest-netkit-tftp-0.17-r43
-rw-r--r--net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-connect-segfault.patch32
-rw-r--r--net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-fix-put-zero-size.diff16
-rw-r--r--net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-manpage-typo.patch13
-rw-r--r--net-ftp/netkit-tftp/files/tftp-dgram15
-rw-r--r--net-ftp/netkit-tftp/files/tftp-stream15
-rw-r--r--net-ftp/netkit-tftp/metadata.xml12
-rw-r--r--net-ftp/netkit-tftp/netkit-tftp-0.17-r4.ebuild50
9 files changed, 168 insertions, 2 deletions
diff --git a/net-ftp/netkit-tftp/ChangeLog b/net-ftp/netkit-tftp/ChangeLog
index dc33d4e08689..324d035f6d90 100644
--- a/net-ftp/netkit-tftp/ChangeLog
+++ b/net-ftp/netkit-tftp/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for net-ftp/netkit-tftp
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/netkit-tftp/ChangeLog,v 1.5 2007/05/15 14:03:32 bangert Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/netkit-tftp/ChangeLog,v 1.6 2007/07/19 13:27:18 pva Exp $
+
+*netkit-tftp-0.17-r4 (19 Jul 2007)
+
+ 19 Jul 2007; <pva@gentoo.org>
+ +files/netkit-tftp-0.17-tftp-connect-segfault.patch,
+ +files/netkit-tftp-0.17-tftp-fix-put-zero-size.diff,
+ +files/netkit-tftp-0.17-tftp-manpage-typo.patch, +files/tftp-dgram,
+ +files/tftp-stream, metadata.xml, +netkit-tftp-0.17-r4.ebuild:
+ Bunch of fixes reported and some fixed in debian: segfault during tftp
+ connect (see debian bug #375365), manpage typo (debian #310347), and put
+ command in tftp now works (debian #88286). Added example files for xinetd,
+ and dodoc now installs README, ChangeLog and BUGS. Took maintenance.
15 May 2007; Thilo Bangert <bangert@gentoo.org> metadata.xml:
add <herd>no-herd</herd>
diff --git a/net-ftp/netkit-tftp/files/digest-netkit-tftp-0.17-r4 b/net-ftp/netkit-tftp/files/digest-netkit-tftp-0.17-r4
new file mode 100644
index 000000000000..d9eb6d399074
--- /dev/null
+++ b/net-ftp/netkit-tftp/files/digest-netkit-tftp-0.17-r4
@@ -0,0 +1,3 @@
+MD5 b7262c798e2ff50e29c2ff50dfd8d6a8 netkit-tftp-0.17.tar.gz 23620
+RMD160 18fa9eaa4e31ec9579a8ba8a486a2f0da0b22747 netkit-tftp-0.17.tar.gz 23620
+SHA256 3a43c0010d4e61f412563fd83769d4667d8b8e82903526d21cb9205fe55ad14d netkit-tftp-0.17.tar.gz 23620
diff --git a/net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-connect-segfault.patch b/net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-connect-segfault.patch
new file mode 100644
index 000000000000..c9a2fd3a5555
--- /dev/null
+++ b/net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-connect-segfault.patch
@@ -0,0 +1,32 @@
+Fixes bug reported at debian bugzilla:
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=375365
+
+How to reproduce:
+$ tftp
+tftp> connect
+(to)
+Segmentation fault
+
+Just pressing enter at the "(to)" prompt crashes tftp.
+
+--- ./tftp/main.c.orig 2007-07-19 11:31:55.000000000 +0400
++++ ./tftp/main.c 2007-07-19 12:54:25.000000000 +0400
+@@ -192,12 +192,17 @@
+ {
+ struct hostent *host;
+ size_t len;
++ char *retval;
+
+ if (argc < 2) {
+ strcpy(line, "Connect ");
+ printf("(to) ");
+ len = strlen(line);
+- fgets(line+len, sizeof(line)-len, stdin);
++ retval = fgets(line+len, sizeof(line)-len, stdin);
++ if (isspace((int)*retval)) {
++ printf ("No value supplied. Connecting to localhost.\n");
++ strcpy(line+len, "localhost\n");
++ }
+ makeargv();
+ argc = margc;
+ argv = margv;
diff --git a/net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-fix-put-zero-size.diff b/net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-fix-put-zero-size.diff
new file mode 100644
index 000000000000..8a5c581ef6ad
--- /dev/null
+++ b/net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-fix-put-zero-size.diff
@@ -0,0 +1,16 @@
+--- ./tftp/tftp.c.orig 2007-07-19 14:56:11.000000000 +0400
++++ ./tftp/tftp.c 2007-07-19 15:31:47.000000000 +0400
+@@ -197,9 +197,12 @@
+ }
+ else {
+ amount += size;
++ if (size != SEGSIZE) {
++ break;
++ }
+ }
+ block++;
+- } while (size == SEGSIZE);
++ } while (1);
+ abort:
+ fclose(file);
+ stopclock();
diff --git a/net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-manpage-typo.patch b/net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-manpage-typo.patch
new file mode 100644
index 000000000000..0102450c8849
--- /dev/null
+++ b/net-ftp/netkit-tftp/files/netkit-tftp-0.17-tftp-manpage-typo.patch
@@ -0,0 +1,13 @@
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=310347
+
+--- ./tftp/tftp.1.orig 2007-07-19 13:04:39.000000000 +0400
++++ ./tftp/tftp.1 2007-07-19 13:04:48.000000000 +0400
+@@ -84,7 +84,7 @@
+ protocol, unlike the
+ .Tn FTP
+ protocol,
+-does not maintain connections betweeen transfers; thus, the
++does not maintain connections between transfers; thus, the
+ .Cm connect
+ command does not actually create a connection,
+ but merely remembers what host is to be used for transfers.
diff --git a/net-ftp/netkit-tftp/files/tftp-dgram b/net-ftp/netkit-tftp/files/tftp-dgram
new file mode 100644
index 000000000000..ff2daf69e793
--- /dev/null
+++ b/net-ftp/netkit-tftp/files/tftp-dgram
@@ -0,0 +1,15 @@
+service tftp
+{
+ disable = yes
+ id = tftp
+ wait = yes
+ socket_type = dgram
+
+ user = tftp
+ group = tftp
+ server = /usr/sbin/in.tftpd
+ server_args = /tftpboot
+
+ log_on_success = PID HOST USERID EXIT DURATION
+ log_on_failure = USERID ATTEMPT
+}
diff --git a/net-ftp/netkit-tftp/files/tftp-stream b/net-ftp/netkit-tftp/files/tftp-stream
new file mode 100644
index 000000000000..966154824dff
--- /dev/null
+++ b/net-ftp/netkit-tftp/files/tftp-stream
@@ -0,0 +1,15 @@
+service tftp
+{
+ disable = yes
+ id = tftp
+ wait = no
+ socket_type = stream
+
+ user = tftp
+ group = tftp
+ server = /usr/sbin/in.tftpd
+ server_args = /tftpboot
+
+ log_on_success = PID HOST USERID EXIT DURATION
+ log_on_failure = USERID ATTEMPT
+}
diff --git a/net-ftp/netkit-tftp/metadata.xml b/net-ftp/netkit-tftp/metadata.xml
index 54494c4bb860..1cdcfd79c131 100644
--- a/net-ftp/netkit-tftp/metadata.xml
+++ b/net-ftp/netkit-tftp/metadata.xml
@@ -3,6 +3,16 @@
<pkgmetadata>
<herd>no-herd</herd>
<maintainer>
-<email>maintainer-needed@gentoo.org</email>
+<email>pva@gentoo.org</email>
+<name>Peter Volkov</name>
</maintainer>
+<longdescription>
+ Tftp is the user interface to the Internet TFTP (Trivial File Transfer
+ Protocol), which allows users to transfer files to and from a remote machine.
+ The remote host may be specified on the command line, in which case tftp uses
+ host as the default host for future transfers. Tftpd is a server which
+ supports the Internet Trivial File Transfer Protocol (RFC 783). The TFTP
+ server operates at the port indicated in the `tftp' service description; see
+ services(5). The server is normally started by inetd(8).
+</longdescription>
</pkgmetadata>
diff --git a/net-ftp/netkit-tftp/netkit-tftp-0.17-r4.ebuild b/net-ftp/netkit-tftp/netkit-tftp-0.17-r4.ebuild
new file mode 100644
index 000000000000..b5932938aa27
--- /dev/null
+++ b/net-ftp/netkit-tftp/netkit-tftp-0.17-r4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/netkit-tftp/netkit-tftp-0.17-r4.ebuild,v 1.1 2007/07/19 13:27:18 pva Exp $
+
+inherit eutils
+
+DESCRIPTION="the tftp server included in netkit"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-tftp-0.17.tar.gz"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+
+KEYWORDS="~x86 ~sparc ~ppc ~mips ~amd64 ~ppc64"
+IUSE=""
+LICENSE="BSD"
+SLOT="0"
+
+DEPEND="!virtual/tftp
+ virtual/inetd"
+PROVIDE="virtual/tftp"
+
+src_unpack() {
+ unpack $A
+ cd "${S}"
+
+ # Change default man directory
+ sed -ie 's:MANDIR="$PREFIX/man":MANDIR="$PREFIX/share/man":' configure
+
+ # don't prestrip binaries
+ find -name Makefile -exec sed -ie 's,install -s,install,' \{\} \;
+
+ # Solve QA warning by including string.h
+ epatch ${FILESDIR}/memset.patch
+ epatch ${FILESDIR}/${P}-tftp-connect-segfault.patch
+ epatch ${FILESDIR}/${P}-tftp-manpage-typo.patch
+ epatch ${FILESDIR}/${P}-tftp-fix-put-zero-size.diff
+}
+
+src_compile() {
+ ./configure --prefix=/usr --installroot="${D}" || die
+ emake || die
+}
+
+src_install() {
+ dodir /usr/bin /usr/sbin
+ doman tftp/tftp.1 tftpd/tftpd.8
+ make install || die
+
+ dodoc "${FILESDIR}"/{tftp-dgram,tftp-stream} BUGS ChangeLog README
+ einfo "Take a look at /usr/share/doc/${PF}/tftp-* files"
+ einfo "for sample xinetd configuration files."
+}