remove atftp dependency on /etc/services, add dependency on libncurses (#384)
authorFelix Fietkau <nbd@openwrt.org>
Wed, 22 Mar 2006 09:30:45 +0000 (09:30 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 22 Mar 2006 09:30:45 +0000 (09:30 +0000)
SVN-Revision: 3444

openwrt/package/Makefile
openwrt/package/atftp/ipkg/atftp.control
openwrt/package/atftp/patches/100-mconfig.patch [new file with mode: 0644]
openwrt/package/atftp/patches/110-services.patch [new file with mode: 0644]
openwrt/package/atftp/patches/mconfig.patch [deleted file]

index 049a47a996b739301ca8d77df50c43854ac45ed7..d5e42ab35ffdc79aad71fa38120c312aeb19ed79 100644 (file)
@@ -295,7 +295,7 @@ $(INSTALL_PACKAGES): base-files-install
 amwall-compile: libamsel-compile
 arpd-compile: libpcap-compile libdnet-compile libevent-compile
 arpwatch-compile: libpcap-compile
-atftp-compile: readline-compile
+atftp-compile: readline-compile ncurses-compile
 avahi-compile: libdaemon-compile expat-compile libgdbm-compile
 bind-compile: openssl-compile
 bitchx-compile: ncurses-compile
index ca4d86a3087e994d72830d27f3e340c8d2e3430d..83b1858c476191dde38fb314c362fb471ce7936f 100644 (file)
@@ -2,4 +2,4 @@ Package: atftp
 Priority: optional
 Section: net
 Description: tftp client
-Depends: libreadline
+Depends: libreadline, libncurses
diff --git a/openwrt/package/atftp/patches/100-mconfig.patch b/openwrt/package/atftp/patches/100-mconfig.patch
new file mode 100644 (file)
index 0000000..552204e
--- /dev/null
@@ -0,0 +1,20 @@
+diff -Nur netkit-tftp-0.17/MCONFIG netkit-tftp-0.17.patched/MCONFIG
+--- netkit-tftp-0.17/MCONFIG   1970-01-01 01:00:00.000000000 +0100
++++ netkit-tftp-0.17.patched/MCONFIG   2005-06-19 21:16:52.422687029 +0200
+@@ -0,0 +1,16 @@
++# Generated by configure (confgen version 2) on Sun Jun 19 21:13:24 CEST 2005
++#
++
++BINDIR=/usr/bin
++SBINDIR=/usr/sbin
++MANDIR=/usr/man
++BINMODE=755
++DAEMONMODE=755
++MANMODE=644
++PREFIX=/usr
++EXECPREFIX=/usr
++INSTALLROOT=
++CC=
++CFLAGS=
++LDFLAGS=
++LIBS=
diff --git a/openwrt/package/atftp/patches/110-services.patch b/openwrt/package/atftp/patches/110-services.patch
new file mode 100644 (file)
index 0000000..0a5972f
--- /dev/null
@@ -0,0 +1,77 @@
+diff -urN atftp.old/tftp.c atftp.dev/tftp.c
+--- atftp.old/tftp.c   2004-03-16 00:55:56.000000000 +0100
++++ atftp.dev/tftp.c   2006-03-22 10:18:54.000000000 +0100
+@@ -409,7 +409,7 @@
+ int set_peer(int argc, char **argv)
+ {
+      struct hostent *host;      /* for host name lookup */
+-     struct servent *sp;        /* server entry for tftp service */
++     int port = htons(69);
+      /* sanity check */
+      if ((argc < 2) || (argc > 3))
+@@ -418,13 +418,6 @@
+           return ERR;
+      }
+-     /* get the server entry */
+-     sp = getservbyname("tftp", "udp");
+-     if (sp == 0) {
+-          fprintf(stderr, "tftp: udp/tftp, unknown service.\n");
+-          return ERR;
+-     }
+-
+      /* look up the host */
+      host = gethostbyname(argv[1]);
+      /* if valid, update s_inn structure */
+@@ -437,7 +430,7 @@
+           Strncpy(data.hostname, host->h_name,
+                   sizeof(data.hostname));
+           data.hostname[sizeof(data.hostname)-1] = 0;
+-          data.sa_peer.sin_port = sp->s_port;
++          data.sa_peer.sin_port = port;
+      } 
+      else
+      {
+@@ -448,17 +441,17 @@
+      /* get the server port */
+      if (argc == 3)
+      {
+-          sp->s_port = htons(atoi(argv[2]));
+-          if (sp->s_port < 0)
++          port = htons(atoi(argv[2]));
++          if (port < 0)
+           {
+                fprintf(stderr, "%s: bad port number.\n", argv[2]);
+                data.connected = 0;
+                return ERR;
+           }
+-          data.sa_peer.sin_port = sp->s_port;
++          data.sa_peer.sin_port = port;
+      }
+      /* copy port number to data structure */
+-     data.port = ntohs(sp->s_port);
++     data.port = ntohs(port);
+      data.connected = 1;
+      return OK;
+diff -urN atftp.old/tftpd.c atftp.dev/tftpd.c
+--- atftp.old/tftpd.c  2004-02-27 03:05:26.000000000 +0100
++++ atftp.dev/tftpd.c  2006-03-22 10:23:20.000000000 +0100
+@@ -230,14 +230,8 @@
+           /* find the port */
+           if (tftpd_port == 0)
+-          {
+-               if ((serv = getservbyname("tftp", "udp")) == NULL)
+-               {
+-                    logger(LOG_ERR, "atftpd: udp/tftp, unknown service");
+-                    exit(1);
+-               }
+-               tftpd_port = ntohs(serv->s_port);
+-          }
++               tftpd_port = htons(69);
++
+           /* initialise sockaddr_in structure */
+           memset(&sa, 0, sizeof(sa));
+           sa.sin_family = AF_INET;
diff --git a/openwrt/package/atftp/patches/mconfig.patch b/openwrt/package/atftp/patches/mconfig.patch
deleted file mode 100644 (file)
index 552204e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -Nur netkit-tftp-0.17/MCONFIG netkit-tftp-0.17.patched/MCONFIG
---- netkit-tftp-0.17/MCONFIG   1970-01-01 01:00:00.000000000 +0100
-+++ netkit-tftp-0.17.patched/MCONFIG   2005-06-19 21:16:52.422687029 +0200
-@@ -0,0 +1,16 @@
-+# Generated by configure (confgen version 2) on Sun Jun 19 21:13:24 CEST 2005
-+#
-+
-+BINDIR=/usr/bin
-+SBINDIR=/usr/sbin
-+MANDIR=/usr/man
-+BINMODE=755
-+DAEMONMODE=755
-+MANMODE=644
-+PREFIX=/usr
-+EXECPREFIX=/usr
-+INSTALLROOT=
-+CC=
-+CFLAGS=
-+LDFLAGS=
-+LIBS=