Skip to contentSkip to conversation

atftp: new package

PATCH Superseded Ryan Barnett 2 participants 3 messages Jun 20, 2014 – Jun 23, 2014

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atftp: new package

---
 package/Config.in       |    1 +
 package/atftp/Config.in |    9 +++++++++
 package/atftp/atftp.mk  |   22 ++++++++++++++++++++++
 3 files changed, 32 insertions(+)
 create mode 100644 package/atftp/Config.in
 create mode 100644 package/atftp/atftp.mk
package/Config.in +1 -0
index f43e985..cd78ccb 100644
@@ -895,6 +895,7 @@ menu "Networking applications"
 	source "package/argus/Config.in"
 	source "package/arptables/Config.in"
 	source "package/autossh/Config.in"
+	source "package/atftp/Config.in"
 	source "package/avahi/Config.in"
 	source "package/axel/Config.in"
 	source "package/bcusdk/Config.in"
package/atftp/Config.in new file +9 -0
new file mode 100644
index 0000000..65c14d8
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_ATFTP
+	bool "atftp"
+	help
+	  atftp is a client/server implementation of the TFTP
+	  protocol that implements RFCs 1350, 2090, 2347, 2348,
+	  and 2349. The server is multi-threaded and the client
+	  presents a friendly interface using libreadline.
+
+	  http://sourceforge.net/projects/atftp/
package/atftp/atftp.mk new file +22 -0
new file mode 100644
index 0000000..27fa0df
@@ -0,0 +1,22 @@
+################################################################################
+#
+# atftp
+#
+################################################################################
+
+ATFTP_VERSION  = 0.7.1
+ATFTP_SITE = http://sourceforge.net/projects/atftp/files/
+ATFTP_LICENSE = GPLv2
+ATFTP_LICENSE_FILES = LICENSE
+
+ifeq ($(BR2_PACKAGE_READLINE),y)
+ATFTP_DEPENDENCIES += readline
+ATFTP_CONF_OPT += --enable-libreadline
+endif
+
+ifeq ($(BR2_PACKAGE_PCRE),y)
+ATFTP_DEPENDENCIES += pcre
+ATFTP_CONF_OPT += --enable-libpcre
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 atftp: new package

Dear Ryan Barnett,

Thanks, but there are a couple of issues with the package. See below.

package/atftp/Config.in line 2

Quoted 8 lines · Ryan Barnett
package/atftp/Config.in new file +2 -0
new file mode 100644
index 0000000..65c14d8
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_ATFTP
+	bool "atftp"

This package needs IPv6 support and thread support in the toolchain, so you should add the relevant dependencies.

package/atftp/Config.in line 9

Quoted 7 lines
package/atftp/Config.in new file +7 -0
+	help
+	  atftp is a client/server implementation of the TFTP
+	  protocol that implements RFCs 1350, 2090, 2347, 2348,
+	  and 2349. The server is multi-threaded and the client
+	  presents a friendly interface using libreadline.
+
+	  http://sourceforge.net/projects/atftp/

... and comment here.

Quoted 6 lines
package/atftp/atftp.mk new file +0 -0
new file mode 100644
index 0000000..27fa0df

package/atftp/atftp.mk line 9

Quoted 9 lines
package/atftp/atftp.mk new file +9 -0
@@ -0,0 +1,22 @@
+################################################################################
+#
+# atftp
+#
+################################################################################
+
+ATFTP_VERSION  = 0.7.1
+ATFTP_SITE = http://sourceforge.net/projects/atftp/files/
+ATFTP_LICENSE = GPLv2

The license is actually GPLv2+.

package/atftp/atftp.mk line 20

Quoted 11 lines
package/atftp/atftp.mk new file +11 -0
+ATFTP_LICENSE_FILES = LICENSE
+
+ifeq ($(BR2_PACKAGE_READLINE),y)
+ATFTP_DEPENDENCIES += readline
+ATFTP_CONF_OPT += --enable-libreadline
+endif
+
+ifeq ($(BR2_PACKAGE_PCRE),y)
+ATFTP_DEPENDENCIES += pcre
+ATFTP_CONF_OPT += --enable-libpcre
+endif

For both of those cases, it'd be good to have an 'else' clause that does the appropriate --disable-<foo>.

Also, adding --disable-libwrap and --disable-mtftp would be nice, so that these features don't get mistakenly enabled.

Another problem is that the package fails to build on Blackfin (at least Blackfin FLAT), because it doesn't link atftp against libpthread. A patch like this is needed to the Makefile.am:

-atftp_LDADD = $(LIBTERMCAP) $(LIBREADLINE)
+atftp_LDADD = $(LIBTERMCAP) $(LIBREADLINE) $(LIBPTHREAD)

Probably the problem can be reproduce on ARM by doing a pure static build, but I haven't tested.

Can you fix those issues and submit a v2 ?

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 atftp: new package

Thomas,

Quoted 71 lines · Thomas Petazzoni

Dear Ryan Barnett,

Thanks, but there are a couple of issues with the package. See below.

package/atftp/Config.in line 2

Quoted 8 lines · Ryan Barnett
package/atftp/Config.in new file +2 -0
new file mode 100644
index 0000000..65c14d8
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_ATFTP
+     bool "atftp"

This package needs IPv6 support and thread support in the toolchain, so you should add the relevant dependencies.

package/atftp/Config.in line 9

Quoted 7 lines
package/atftp/Config.in new file +7 -0
+     help
+       atftp is a client/server implementation of the TFTP
+       protocol that implements RFCs 1350, 2090, 2347, 2348,
+       and 2349. The server is multi-threaded and the client
+       presents a friendly interface using libreadline.
+
+       http://sourceforge.net/projects/atftp/

... and comment here.

Quoted 6 lines
package/atftp/atftp.mk new file +0 -0
new file mode 100644
index 0000000..27fa0df

package/atftp/atftp.mk line 9

Quoted 9 lines
package/atftp/atftp.mk new file +9 -0
@@ -0,0 +1,22 @@
+################################################################################
+#
+# atftp
+#
+################################################################################
+
+ATFTP_VERSION  = 0.7.1
+ATFTP_SITE = http://sourceforge.net/projects/atftp/files/
+ATFTP_LICENSE = GPLv2

The license is actually GPLv2+.

package/atftp/atftp.mk line 20

Quoted 11 lines
package/atftp/atftp.mk new file +11 -0
+ATFTP_LICENSE_FILES = LICENSE
+
+ifeq ($(BR2_PACKAGE_READLINE),y)
+ATFTP_DEPENDENCIES += readline
+ATFTP_CONF_OPT += --enable-libreadline
+endif
+
+ifeq ($(BR2_PACKAGE_PCRE),y)
+ATFTP_DEPENDENCIES += pcre
+ATFTP_CONF_OPT += --enable-libpcre
+endif

For both of those cases, it'd be good to have an 'else' clause that does the appropriate --disable-<foo>.

Also, adding --disable-libwrap and --disable-mtftp would be nice, so that these features don't get mistakenly enabled.

Another problem is that the package fails to build on Blackfin (at least Blackfin FLAT), because it doesn't link atftp against libpthread. A patch like this is needed to the Makefile.am:

(quoted diff) +1 -1
-atftp_LDADD      = $(LIBTERMCAP) $(LIBREADLINE)
+atftp_LDADD      = $(LIBTERMCAP) $(LIBREADLINE) $(LIBPTHREAD)
Quoted 4 lines

Probably the problem can be reproduce on ARM by doing a pure static build, but I haven't tested.

Can you fix those issues and submit a v2 ?

Yes I will send an updated patch shortly with all of your suggestions.

Thanks,
-Ryan